Skip to content

Commit

Permalink
Force classical version of \genfrac
Browse files Browse the repository at this point in the history
  • Loading branch information
RuixiZhang42 committed Nov 25, 2020
1 parent 684c82f commit 0e94eda
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mtpro2-patch.tex
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,16 @@
used. So ##1 and so on will be gobbled and have no effect.}%
}%
}
% Since mtpro2 is TFM-based, we should force \genfrac to be the
% classical version to avoid (a) bugs across different mathstyles
% (see https://github.com/latex3/latex2e/issues/432) and (b) slow
% processing (see https://github.com/latex3/latex2e/issues/433).
\DeclareRobustCommand{\genfrac}[4]{%
\def\@tempa{#1#2}%
\edef\@tempb{\@nx\@genfrac\@mathstyle{#4}%
\csname @@\ifx @#3@over\else above\fi
\ifx\@tempa\@empty \else withdelims\fi\endcsname}
\@tempb{#1#2#3}}
% https://github.com/latex3/latex2e/issues/160
\patchcmd\math@cr@@@aligned
{\next@ \cr}
Expand Down

0 comments on commit 0e94eda

Please sign in to comment.