Closed u-fischer closed 4 years ago
Hmmm, that is @eg9's fault due to #25: https://tex.stackexchange.com/a/456215/179
Clearly I need more test files! I guess \binom
needs to be patched too.
Hm. @eg9 use of \genfrac in the answer looks wrong
Argument #2 and #3 in the new genfrac are the delimiters, so if there are no delimiters, they should be both empty and the command should start with \genfrac{}{}{}
.
I think you will have to patch \splitfrac
from the mathtools package.
\renewcommand*\splitfrac[2]{%
\genfrac{}{}{}{0pt}%
{\textstyle#1\quad\hfill}%
{\textstyle\hfill\quad\mathstrut#2}%
}
I am a bit confused. In mathstyle.dtx
:
\renewcommand{\binom}{\genfrac{}(){0pt}}
\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
In amsmath.sty
:
\DeclareRobustCommand{\binom}{\genfrac()\z@{}}
\newcommand{\dbinom}{\genfrac(){0pt}0}
\newcommand{\tbinom}{\genfrac(){0pt}1}
I'm reading this right that mathstyle
screws up the order of the arguments. I need to re-add the missing #4 but most importantly redo the logic so it is backwards compatible (I don't want to start patching other packages...)
I'm reading this right that
mathstyle
screws up the order of the arguments.
It is changing it, that's what I think too. But I'm not sure if you can remedy it while keeping the name \genfrac
and the number of arguments (in amsmath it has four arguments, and in mathstyle six) and not clashing with other package trying to use \genfrac.
looks good. I checked also the splitfrac example and it works fine now.
Sorry, I don't understand. The bug was having #4
in that position.
@u-fischer
Hm. @eg9 use of \genfrac in the answer looks wrong
No. The patch works as advertised. If Will wants to fix it differently, it's another pair of shoes.
@eg9 — I shouldn’t have said it was your fault! Definitely not.
Root cause of both problems was mathstyle had a whacky order of arguments and used different syntax for setting the mathstyle. Both fixed now.
This here fails
with
My guess is that the right fix is to insert
#4
into the genfrac definition: