diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathfam256/mathfam256.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/mathfam256/mathfam256.sty | 68 |
1 files changed, 55 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/mathfam256/mathfam256.sty b/Master/texmf-dist/tex/latex/mathfam256/mathfam256.sty index 6b0fb9dc7e2..3b482bf6f72 100644 --- a/Master/texmf-dist/tex/latex/mathfam256/mathfam256.sty +++ b/Master/texmf-dist/tex/latex/mathfam256/mathfam256.sty @@ -1,9 +1,9 @@ % % mathfam256.sty -% 2019/09/14 v0.3 Hironobu Yamashita (aminophen) -% -- bug fix and support LaTeX2e 2019-10-01 -% 2018/01/22 v0.2 Hironobu Yamashita (aminophen) -% -- first CTAN version +% 2020/01/23 v0.5 -- compatibility with amstext +% 2020/01/22 v0.4 -- sync with LaTeX2e 2020-02-02 dev +% 2019/09/14 v0.3 -- bug fix and support LaTeX2e 2019-10-01 +% 2018/01/22 v0.2 -- first CTAN version % 2016/12/26 v0.1 Hironobu Yamashita (aminophen) % 2009/02/20 v0.01 Kazuyoshi Yamamoto (ymt) % @@ -16,7 +16,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{mathfam256} - [2019/09/14 v0.3 Extend math family up to 256] + [2020/01/23 v0.5 Extend math family up to 256] %% engine check \ifx\omathchar\@undefined @@ -100,6 +100,11 @@ %% LaTeX2e 2019/10/01 makes lots of commands robust; %% follow both old and new behavior +%% -- Among the changes in 2019/10/01, +%% "making math delimiters robust with \MakeRobust" +%% was backed out and replaced with "engine protection" +%% in 2020/02/02. +%% (see https://github.com/latex3/latex2e/issues/251) \edef\omfcclvi@reset{% \catcode`\noexpand\&=\the\catcode`\&\relax \catcode`\noexpand\~=\the\catcode`\~\relax @@ -140,12 +145,13 @@ \ifnum#1<\sixt@@n\relax\else\@tempswafalse\fi \ifnum#2<\sixt@@n\relax\else\@tempswafalse\fi \if@tempswa +& \protected \xdef#3{\delimiter"\mathchar@type#4\hexnumber@#1#5\hexnumber@#2#6\relax}% \else +& \protected \xdef#3{\odelimiter"\mathchar@type#4\hexnumber@@#100#5% "\hexnumber@@#200#6\relax}% \fi -& \MakeRobust#3% } \def\set@@mathdelimiter#1#2#3#4#5{% \@tempswatrue @@ -269,9 +275,7 @@ E0\or E1\or E2\or E3\or E4\or E5\or E6\or E7\or E8\or E9\or EA\or EB\or EC\or ED\or EE\or EF\or F0\or F1\or F2\or F3\or F4\or F5\or F6\or F7\or F8\or - F9\or FA\or FB\or FC\or FD\or FE\or FF - \fi -} + F9\or FA\or FB\or FC\or FD\or FE\or FF\fi} %% patch LaTeX2e internal only if newer than (or equal to) 2015/01/01 %% since the error code was introduced at that time @@ -435,15 +439,24 @@ \ifin@ \begingroup \edef\reserved@a{\noexpand\in@ + {\expandafter\@gobble\string\delimiter}{\meaning#1}}% + \reserved@a + \ifin@ + \oset@mathdelimiter{#1}{#2}{#3}{#4}{#5}{#6}% + \@font@info{Redeclaring math delimiter \string#1}% + \else + %%%%% BEGIN -- only for "real" format as of 2019-10-01 which used \MakeRobust + \edef\reserved@a{\noexpand\in@ {\expandafter\@gobble\string\delimiter}% -~ {\meaning#1}}% -& {\expandafter\meaning\csname\expandafter\@gobble\string#1\space\endcsname}}% + {\expandafter\meaning\csname\expandafter\@gobble\string#1\space\endcsname}}% \reserved@a \ifin@ -& \expandafter\let\csname\expandafter\@gobble\string#1\space\endcsname\@undefined + \global % to cancel global assignment done by \MakeRobust + \expandafter\let\csname\expandafter\@gobble\string#1\space\endcsname\@undefined \oset@mathdelimiter{#1}{#2}{#3}{#4}{#5}{#6}% \@font@info{Redeclaring math delimiter \string#1}% \else + %%%%% END \expandafter\ifx \csname\expandafter\@gobble\string#1\endcsname \relax @@ -451,6 +464,9 @@ \else \@latex@error{Command `\string#1' already defined}\@eha \fi + %%%%% BEGIN -- only for "real" format as of 2019-10-01 which used \MakeRobust + \fi + %%%%% END \fi \endgroup \else @@ -483,9 +499,9 @@ \numexpr"1000000*\mathchar@type#2+"10000*\csname sym#3\endcsname+#4% \count\tw@ \numexpr"10000*\csname sym#5\endcsname+#6% +& \protected \xdef#1{\odelimiter\number\count\z@\space \number\count\tw@}% \endgroup -& \MakeRobust#1% } \@onlypreamble\oset@mathdelimiter \def\oset@@mathdelimiter#1#2#3#4#5{% @@ -536,5 +552,31 @@ %% reset \omfcclvi@reset +%% patch: amstext.sty redefines \mathhexbox to use its own \text +\let\omfcclvi@my@mathhexbox\mathhexbox +\def\omfcclvi@patch@mathhexbox{% + \ifx\mathhexbox\omfcclvi@old@mathhexbox + \expandafter\@firstoftwo % known -> info only + \else\ifx\mathhexbox\omfcclvi@my@mathhexbox + \expandafter\expandafter\expandafter\@firstoftwo % known -> info only + \else + \expandafter\expandafter\expandafter\@secondoftwo % unknown -> warning + \fi\fi + \PackageInfo\PackageWarning{mathfam256}{Redefining \string\mathhexbox}% + \let\mathhexbox\omfcclvi@new@mathhexbox + \let\omfcclvi@old@mathhexbox\@undefined + \let\omfcclvi@new@mathhexbox\@undefined + \let\omfcclvi@patch@mathhexbox\@undefined} +\begingroup \catcode`\"=12 +\gdef\omfcclvi@old@mathhexbox#1#2#3{\text{$\m@th\mathchar"#1#2#3$}} +\gdef\omfcclvi@new@mathhexbox#1#2#3{% + \ifnum"#1<\sixt@@n + \text{$\m@th \mathchar"#1#2#3$}% + \else + \text{$\m@th \omathchar"#100#2#3$}% + \fi} +\endgroup +\AtBeginDocument{\ifx\text\@undefined\else \omfcclvi@patch@mathhexbox \fi} + %% all done \endinput |