From 0e94edae74ae85e87ceafcebd35bbdafb25d70f4 Mon Sep 17 00:00:00 2001 From: Ruixi Zhang <39968857+RuixiZhang42@users.noreply.github.com> Date: Wed, 25 Nov 2020 12:00:40 -0500 Subject: [PATCH] Force classical version of \genfrac See https://github.com/latex3/latex2e/issues/432 and https://github.com/latex3/latex2e/issues/433 --- mtpro2-patch.tex | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mtpro2-patch.tex b/mtpro2-patch.tex index 1c426fd..c01f77c 100644 --- a/mtpro2-patch.tex +++ b/mtpro2-patch.tex @@ -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}