summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-07-14 16:40:34 +0000
committerKarl Berry <karl@freefriends.org>2010-07-14 16:40:34 +0000
commit57e485197587d08aa2ca05ce2cc95e8063edd4cc (patch)
treeb718954bc819b66d11005b7bcf266aae7ed63952 /Master/texmf-dist
parentff69d312a2c79a3d20d1084c44d579da6770a0a7 (diff)
mh update (13jul10)
git-svn-id: svn://tug.org/texlive/trunk@19447 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/mh/README4
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn-technotes.pdfbin180771 -> 184926 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn.pdfbin408869 -> 562410 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/empheq.pdfbin276729 -> 356325 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/flexisym.pdfbin139559 -> 262572 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathstyle.pdfbin88049 -> 170155 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathtools.pdfbin383414 -> 412642 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mhsetup.pdfbin249326 -> 249338 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/xfrac.pdfbin559679 -> 464263 bytes
-rw-r--r--Master/texmf-dist/source/latex/mh/breqn.dtx170
-rw-r--r--Master/texmf-dist/source/latex/mh/flexisym.dtx687
-rw-r--r--Master/texmf-dist/source/latex/mh/mathstyle.dtx22
-rw-r--r--Master/texmf-dist/source/latex/mh/mathtools.dtx434
-rw-r--r--Master/texmf-dist/source/latex/mh/xfrac.dtx882
-rw-r--r--Master/texmf-dist/tex/latex/mh/breqn.sty153
-rw-r--r--Master/texmf-dist/tex/latex/mh/cmbase.sym100
-rw-r--r--Master/texmf-dist/tex/latex/mh/flexisym.sty380
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathpazo.sym106
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathptmx.sym105
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathstyle.sty13
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathtools.sty126
-rw-r--r--Master/texmf-dist/tex/latex/mh/msabm.sym6
-rw-r--r--Master/texmf-dist/tex/latex/mh/xfrac.sty542
23 files changed, 2173 insertions, 1557 deletions
diff --git a/Master/texmf-dist/doc/latex/mh/README b/Master/texmf-dist/doc/latex/mh/README
index 787613f36de..33f74bb9607 100644
--- a/Master/texmf-dist/doc/latex/mh/README
+++ b/Master/texmf-dist/doc/latex/mh/README
@@ -1,6 +1,6 @@
The mh bundle
=============
-Morten Hoegholm (c) 2002-2008
+Morten Hoegholm (c) 2002-2010
email: mh.ctan@gmail.com
License: LaTeX Project Public License
@@ -100,4 +100,4 @@ math. The package requires expl3 and xpackages available on CTAN.
===========
-This README file was last revised 2008/08/04.
+This README file was last revised 2010/07/11.
diff --git a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf b/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
index d5150265547..f9dd33b47fe 100644
--- a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
+++ b/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/breqn.pdf b/Master/texmf-dist/doc/latex/mh/breqn.pdf
index 98d730c156d..57f08d2e105 100644
--- a/Master/texmf-dist/doc/latex/mh/breqn.pdf
+++ b/Master/texmf-dist/doc/latex/mh/breqn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/empheq.pdf b/Master/texmf-dist/doc/latex/mh/empheq.pdf
index 2e8368cb24f..59a9aa04fc4 100644
--- a/Master/texmf-dist/doc/latex/mh/empheq.pdf
+++ b/Master/texmf-dist/doc/latex/mh/empheq.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/flexisym.pdf b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
index c6a45d70169..fa5eaebe611 100644
--- a/Master/texmf-dist/doc/latex/mh/flexisym.pdf
+++ b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
index 19d1e97f049..1fe2b23bb9d 100644
--- a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathtools.pdf b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
index 7b3d61d1600..b181422a467 100644
--- a/Master/texmf-dist/doc/latex/mh/mathtools.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
index d4fbb6f8412..8dd85a416e0 100644
--- a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/xfrac.pdf b/Master/texmf-dist/doc/latex/mh/xfrac.pdf
index 194b6fba00f..ce557796a14 100644
--- a/Master/texmf-dist/doc/latex/mh/xfrac.pdf
+++ b/Master/texmf-dist/doc/latex/mh/xfrac.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mh/breqn.dtx b/Master/texmf-dist/source/latex/mh/breqn.dtx
index 1a839415877..1ab39409a40 100644
--- a/Master/texmf-dist/source/latex/mh/breqn.dtx
+++ b/Master/texmf-dist/source/latex/mh/breqn.dtx
@@ -67,7 +67,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: breqn 2008/08/13 v0.98a Breqn (MH)}
+\Msg{* Package: breqn 2008/07/28 v0.98 Breqn (MH)}
\Msg{************************************************************************}
\keepsilent
@@ -128,7 +128,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{breqn.drv}%
- [2008/08/13 v0.98a breqn (MH)]
+ [2008/07/28 v0.98 breqn (MH)]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
@@ -230,7 +230,7 @@ and the derived files
% \fi
%
% \title{The \pkg{breqn} package}
-% \date{2008/08/13 v0.98a}
+% \date{2008/07/28 v0.98}
% \author{Morten H\o gholm \\\texttt{mh.ctan@gmail.com}}
%
% \maketitle
@@ -1008,7 +1008,8 @@ and the derived files
%
% Declare package name and date.
% \begin{macrocode}
-\ProvidesPackage{breqn}[2008/08/13 v0.98a]
+\RequirePackage{expl3}[2009/08/05]
+\ProvidesExplPackage{breqn}{2009/08/07}{0.98a}{Breaking equations}
% \end{macrocode}
%
%
@@ -1049,7 +1050,7 @@ and the derived files
% I don't think so.
% \begin{macrocode}
\@ifpackageloaded{flexisym}{}{%
- \RequirePackage{flexisym}[2007/12/19]
+ \RequirePackage{flexisym}[2009/08/07]
\edef\breqnpopcats{\breqnpopcats
\catcode\number`\^=\number\catcode`\^
\catcode\number`\_=\number\catcode`\_
@@ -1438,11 +1439,18 @@ and the derived files
% Need to patch up this function from flexisym a little, to better
% handle certain constructed symbols like \cs{neq}.
% \begin{macrocode}
+\ExplSyntaxOn
\g@addto@macro\mathchars@reset{%
- \let\@symRel\@secondoftwo \let\@symBin\@secondoftwo
- \let\@symDeL\@secondoftwo \let\@symDeR\@secondoftwo
- \let\@symDeB\@secondoftwo
+ %\let\@symRel\@secondoftwo \let\@symBin\@secondoftwo
+ %\let\@symDeL\@secondoftwo \let\@symDeR\@secondoftwo
+ %\let\@symDeB\@secondoftwo
+ \cs_set_eq:NN \math_csym_Rel:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_Bin:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_DeL:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_DeR:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_DeB:Nn \use_ii:nn
}
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
%
@@ -2054,8 +2062,8 @@ and the derived files
% are alternate definitions of \cs{m@Bin} and \cs{m@Rel},
% activated by \cs{display@setup}.
% \begin{macrocode}
-\let\m@@Bin\m@Bin
-\let\m@@Rel\m@Rel
+%%%%\let\m@@Bin\m@Bin
+%%%%%\let\m@@Rel\m@Rel
\let\EQ@prebin@space\relax
\def\EQ@prebin@space@a{\mskip-\eq@binoffset \keep@glue \mskip\eq@binoffset}
\def\bin@break{\ifnum\lastpenalty=\z@\penalty\prebinoppenalty\fi
@@ -2065,8 +2073,12 @@ and the derived files
\penalty\prerelpenalty
\fi
}
-\def\d@@Bin{\bin@break \m@@Bin}
-\def\d@@Rel{\mark@lhs \rel@break \m@@Rel}
+\ExplSyntaxOn
+%%%\def\d@@Bin{\bin@break \m@@Bin}
+%%%%\def\d@@Rel{\mark@lhs \rel@break \m@@Rel}
+\cs_set:Npn \math_dsym_Bin:Nn {\bin@break\math_bsym_Bin:Nn}
+\cs_set:Npn \math_dsym_Rel:Nn {\mark@lhs \rel@break \math_bsym_Rel:Nn }
+\ExplSyntaxOff
% \end{macrocode}
% The difficulty of dealing properly with the subscripts and
% superscripts sometimes appended to mathbins and mathrels is one of the
@@ -2098,12 +2110,20 @@ and the derived files
%
% More of the same.
% \begin{macrocode}
-\let\m@@symRel\@symRel \def\d@@symRel{\mark@lhs \rel@break \m@@symRel}
-\let\m@@symBin\@symBin \def\d@@symBin{\bin@break \m@@symBin}
-\let\m@@symDel\@symDel
-\let\m@@symDeR\@symDeR
-\let\m@@symDeB\@symDeB
-\let\m@@symDeA\@symDeA
+\ExplSyntaxOn
+%%\let\m@@symRel\@symRel
+%%%\def\d@@symRel{\mark@lhs \rel@break \m@@symRel}
+
+\cs_set_protected:Npn \math_dcsym_Bin:Nn {\bin@break \math_bcsym_Bin:Nn}
+\cs_set_protected:Npn \math_dcsym_Rel:Nn { \mark@lhs \rel@break \math_bcsym_Rel:Nn}
+
+
+%%\let\m@@symBin\@symBin \def\d@@symBin{\bin@break \m@@symBin}
+%%\let\m@@symDel\@symDel
+%%\let\m@@symDeR\@symDeR
+%%\let\m@@symDeB\@symDeB
+%%\let\m@@symDeA\@symDeA
+
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2131,12 +2151,13 @@ and the derived files
% \begin{macrocode}
\def\display@setup{%
\medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \let\m@Bin\d@@Bin \let\m@Rel\d@@Rel
- \let\@symRel\d@@symRel \let\@symBin\d@@symBin
- \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
- \let\m@DeA\d@@DeA
- \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
- \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
+ \math_setup_display_symbols:
+ %%\let\m@Bin\d@@Bin \let\m@Rel\d@@Rel
+ %%\let\@symRel\d@@symRel \let\@symBin\d@@symBin
+ %%\let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
+ %%\let\m@DeA\d@@DeA
+ %%\let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
+ %%\let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
\let\left\eq@left \let\right\eq@right \global\lr@level\z@
\global\eq@wdCond\z@ %BRM: new
% \end{macrocode}
@@ -2162,14 +2183,15 @@ and the derived files
% \begin{macrocode}
\def\dseries@display@setup{%
\medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \let\m@Bin\d@@Bin
-%\let\m@Rel\d@@Rel
-% \let\@symRel\d@@symRel
- \let\@symBin\d@@symBin
- \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
- \let\m@DeA\d@@DeA
- \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
- \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
+ \math_setup_display_symbols:
+%%%% \let\m@Bin\d@@Bin
+%%%\let\m@Rel\d@@Rel
+%%% \let\@symRel\d@@symRel
+%%% \let\@symBin\d@@symBin
+%%% \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
+%%% \let\m@DeA\d@@DeA
+%%% \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
+%%% \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
\let\left\eq@left \let\right\eq@right \global\lr@level\z@
\everyhbox{\everyhbox\@emptytoks
\let\display@setup\relax \textmath@setup \let\textmath@setup\relax
@@ -2183,14 +2205,17 @@ and the derived files
%
% \begin{macrocode}
\def\textmath@setup{%
- \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
- \let\@symRel\m@@symRel \let\@symBin\m@@symBin
- \let\m@DeL\m@@DeL \let\m@DeR\m@@DeR \let\m@DeB\m@@DeB
- \let\m@DeA\m@@DeA
- \let\@symDeL\m@@symDeL \let\@symDeR\m@@symDeR
- \let\@symDeB\m@@symDeB \let\@symDeA\m@@symDeA
+ \math_setup_inline_symbols:
+%%%% \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
+%%%% \let\@symRel\m@@symRel \let\@symBin\m@@symBin
+%%%% \let\m@DeL\m@@DeL \let\m@DeR\m@@DeR \let\m@DeB\m@@DeB
+%%%% \let\m@DeA\m@@DeA
+%%%% \let\@symDeL\m@@symDeL \let\@symDeR\m@@symDeR
+%%%% \let\@symDeB\m@@symDeB \let\@symDeA\m@@symDeA
\let\left\@@left \let\right\@@right
}
+
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5338,21 +5363,29 @@ and the derived files
% \end{macrocode}
%
% It would be nice to have better error checking here if the
-% argument is not a delimiter symbol at all.
+% argument is not a delimiter symbol at all.
+%
+% Ah, a small problem when renaming commands. In the original version,
+% |\delimiter| is hijacked in order to remove the |\after@bidir| (or
+% open or close) instruction following the delimiter declaration.
% \begin{macrocode}
+\ExplSyntaxOn
\def\eq@left{%
- \@ifnext .{\eq@nullleft}{\begingroup \let\delimiter\eq@left@a}%
+ \@ifnext .{\eq@nullleft}{\begingroup \let\math_delimiter:NNnNn \eq@left@a}%
}
\def\eq@right{%
- \@ifnext .{\eq@nullright}{\begingroup \let\delimiter\eq@right@a}%
+ \@ifnext .{\eq@nullright}{\begingroup \let \math_delimiter:NNnNn \eq@right@a}%
}
% \end{macrocode}
% The arguments are: \arg1 delim symbol, \arg2 .
% \begin{macrocode}
-\def\eq@left@a#1 #2{\endgroup\@@left\delimiter#1 \after@open}
-\def\eq@right@a#1 #2{\endgroup
- \@@right\delimiter#1 \after@close \ss@scan{#1}%
+%\def\eq@left@a#1 #2{\endgroup\@@left\delimiter#1\space \after@open}
+\def\eq@left@a#1#2#3#4#5#6{\endgroup
+ \@@left \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@open}
+\def\eq@right@a#1#2#3#4#5#6{\endgroup
+ \@@right \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@close \ss@scan{#1#2{#3}#4{#5}}%
}
+\ExplSyntaxOff
% \end{macrocode}
% The null versions.
% \begin{macrocode}
@@ -5368,7 +5401,7 @@ and the derived files
% \bigg #1->{\hbox {$\left #1\vbox to14.5\p@ {}\right .\n@space $}}
% #1<-(
% \end{literalcode}
- % For paren matching: )
+% ^^AFor paren matching: )
% Like \cs{left}, \cs{biggl} coerces its delimiter to be of
% mathopen type even if its natural inclination is towards closing.
%
@@ -5439,22 +5472,30 @@ and the derived files
% \end{literalcode}
%
% Save the existing meanings of \cs{m@De[LRB]}.
+%
+% Define display variants of DeL, DeR, DeB
% \begin{macrocode}
-\let\m@@DeL\m@DeL \let\m@@DeR\m@DeR \let\m@@DeB\m@DeB
-\def\d@@DeL#1#2#3{%
- \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@open
-}
-\def\d@@DeR#1#2#3{%
- \delimiter"5\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@close
-}
-\def\d@@DeB#1#2#3{%
- \delimiter"0\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@bidir
-}
+\ExplSyntaxOn
+\cs_set:Npn \math_dsym_DeL:Nn #1#2{\math_bsym_DeL:Nn #1{#2}\after@open}
+\cs_set:Npn \math_dsym_DeR:Nn #1#2{\math_bsym_DeR:Nn #1{#2}\after@close}
+\cs_set:Npn \math_dsym_DeB:Nn #1#2{\math_bsym_DeB:Nn #1{#2}\after@bidir}
+
+%%%%%
+%%%%%\let\m@@DeL\m@DeL \let\m@@DeR\m@DeR \let\m@@DeB\m@DeB
+%%%%%\def\d@@DeL#1#2#3{%
+%%%%% \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@open
+%%%%%}
+%%%%%\def\d@@DeR#1#2#3{%
+%%%%% \delimiter"5\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@close
+%%%%%}
+%%%%%\def\d@@DeB#1#2#3{%
+%%%%% \delimiter"0\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@bidir
+%%%%%}
% \end{macrocode}
%%BRM: These weren't defined, but apparently should be.
% Are these the right values???
% \begin{macrocode}
-\let\m@@DeA\m@DeA\let\d@@DeA\m@DeA%
+%%%%%%\let\m@@DeA\m@DeA\let\d@@DeA\m@DeA%
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5483,7 +5524,7 @@ and the derived files
\prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
\advance\prebinoppenalty\zero@bop
\ifnum\eqbreakdepth<\lr@level
- \let\m@Bin\m@@Bin
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn %%%%%%\let\m@Bin\m@@Bin
% \end{macrocode}
% Inside delimiters, add some fillglue before binops so that a broken off
% portion will get thrown flush right. Also shift it slightly
@@ -5501,7 +5542,7 @@ and the derived files
\prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
\advance\prebinoppenalty\zero@bop
\ifnum\eqbreakdepth<\lr@level
- \else \let\m@Bin\d@@Bin
+ \else \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn %%%%%%\let\m@Bin\d@@Bin
\fi
% \end{macrocode}
% When we get back to level 0, no delimiters, remove the stretch
@@ -5509,6 +5550,9 @@ and the derived files
% \begin{macrocode}
\ifnum\lr@level<\@ne \eq@binoffset=\eqbinoffset\relax \fi
}
+
+\ExplSyntaxOff
+
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -5536,7 +5580,7 @@ and the derived files
% The end result is \cs{eq@wdL} => 0.0pt !!! (or at least very small)
% \begin{macrocode}
\let\subsup@flag=\count@
-\def\ss@delim@a#1#2#3#4{\xdef\right@delim@code{\number"#2#3#4}}
+\def\ss@delim@a@new#1#2#3#4#5{\xdef\right@delim@code{\number"#4#5}}
% \end{macrocode}
% The argument of \cs{ss@scan} is an expanded form of a
% right-delimiter macro.
@@ -5550,7 +5594,7 @@ and the derived files
% This part of the code.
% \begin{macrocode}
\begingroup
- \let\delim@a\ss@delim@a \@tempcnta#1\relax
+ \ss@delim@a@new #1%
\endgroup
\subsup@flag\@M \afterassignment\ss@scan@a \let\@let@token=}
\def\ss@scan@a{%
@@ -5569,12 +5613,16 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
+\ExplSyntaxOn
\def\ss@scan@b#1#2{#1{%
% \end{macrocode}
% hack! coff!
% \begin{macrocode}
- \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
+ %%%%%\let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
+ \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
#2}\afterassignment\ss@scan@a \let\@let@token=}%
+\ExplSyntaxOff
% \end{macrocode}
% We need to keep following glue from disappearing
% \mdash \eg , a thickmuskip or medmuskip from a following mathrel or
diff --git a/Master/texmf-dist/source/latex/mh/flexisym.dtx b/Master/texmf-dist/source/latex/mh/flexisym.dtx
index 08aeef1ec7e..d25bcc0a82a 100644
--- a/Master/texmf-dist/source/latex/mh/flexisym.dtx
+++ b/Master/texmf-dist/source/latex/mh/flexisym.dtx
@@ -72,7 +72,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: flexisym 2008/07/23 v0.97 Flexisym (MH)}
+\Msg{* Package: flexisym 2010/07/11 v0.97b Flexisym (MH)}
\Msg{************************************************************************}
\keepsilent
@@ -138,11 +138,12 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{flexisym.drv}%
- [2008/07/23 v0.97 flexisym (MH)]
+ [2010/07/11 v0.97b flexisym (MH)]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
\setcounter{IndexColumns}{2}
+%\providecommand*\meta[1]{\ensuremath\langle\textit{#1}\ensuremath\rangle}
\providecommand*\pkg[1]{\textsf{#1}}
\providecommand*\cls[1]{\textsf{#1}}
\providecommand*\opt[1]{\texttt{#1}}
@@ -162,7 +163,7 @@ and the derived files
% \fi
%
% \title{The \textsf{flexisym} package}
-% \date{2008/07/23 v0.97}
+% \date{2008/08/08 v0.97a}
% \author{Morten H\o gholm \\\texttt{mh.ctan@gmail.com}}
%
% \maketitle
@@ -178,10 +179,11 @@ and the derived files
%
% \begin{macrocode}
%<*package>
-\ProvidesPackage{flexisym}[2008/07/23 v0.97]
-\let\@xp\expandafter \let\@nx\noexpand
+\RequirePackage{expl3}[2009/08/05]
+\ProvidesExplPackage{flexisym}{2009/08/07}{0.97a}{Make math characters macros}
+
\edef\do{%
- \@nx\AtEndOfPackage{%
+ \noexpand\AtEndOfPackage{%
\catcode\number`\"=\number\catcode`\"
\relax
}%
@@ -191,9 +193,12 @@ and the derived files
\let\@sym\@gobble
\DeclareOption{robust}{%
\def\@sym#1{%
- \ifx\protect\@typeset@protect \else\protect#1\@xp\@gobblefour\fi
+ \ifx\protect\@typeset@protect \else\protect#1\exp_after:wN\use_none:nnnn\fi
}%
}
+% \end{macrocode}
+% The math groups (mg) here relate to |\textfont|$n$.
+% \begin{macrocode}
\def\mg@bin{2}% binary operators
\def\mg@rel{2}% relations
%%\def\mg@nre{B}% negated relations
@@ -209,121 +214,379 @@ and the derived files
\def\mg@cal{2}% script/calligraphic
%%\def\mg@frak{5}% Fraktur letters
\def\mg@digit{0}% decimal digits % 1 = oldstyle, 0 = capital
-\expandafter\let\csname MathChar \endcsname\mathchar
-\expandafter\let\csname Delimiter \endcsname\delimiter
-\expandafter\let\csname Radical \endcsname\radical
-\newcommand{\MathChar}{}
-\edef\MathChar{\csname MathChar \endcsname\noexpand\string}
-\newcommand{\Delimiter}{}
-\edef\Delimiter{\csname Delimiter \endcsname\noexpand\string}
-\newcommand{\Radical}{}
-\edef\Radical{\csname Radical \endcsname\noexpand\string}
+% \end{macrocode}
+% This is how we insert mathchars. The command has three arguments:
+% class, fam and slot postion and so it is always given as
+% hexadecimal. This way of separating things should make it easier
+% to get this to work with XeTeX et al.\ which have many more slot
+% positions
+% \begin{macrocode}
+\cs_set_protected:Nn \math_char:NNn {
+ \tex_mathchar:D \intexpr_eval:w " #1#2#3 \intexpr_eval_end:
+}
+% \end{macrocode}
+% Delimiters and radicals are similar except here we have both small
+% and large variant. Radicals have no class.
+% \begin{macrocode}
+\cs_set_protected:Nn \math_delimiter:NNnNn {
+ \tex_delimiter:D \intexpr_eval:w " #1#2#3#4#5 \intexpr_eval_end:
+}
+\cs_set_protected:Nn \math_radical:NnNn {
+ \tex_radical:D \intexpr_eval:w " #1#2#3#4 \intexpr_eval_end:
+}
+\cs_set_protected:Nn \math_accent:NNnn {
+ \tex_mathaccent:D \intexpr_eval:w " #1 #2 #3 \intexpr_eval_end: {#4}
+}
+
\let\sumlimits\displaylimits
\let\intlimits\nolimits
\let\namelimits\displaylimits
-\edef\m@Ord#1#2#3{\csname MathChar \endcsname"0#1#2#3 }
-\edef\m@Var#1#2#3{\csname MathChar \endcsname"7#1#2#3 }
-\edef\m@Bin#1#2#3{\csname MathChar \endcsname"2#1#2#3 }
-\edef\m@Rel#1#2#3{\csname MathChar \endcsname"3#1#2#3 }
-\edef\m@Pun#1#2#3{\csname MathChar \endcsname"6#1#2#3 }
-\edef\m@COs#1#2#3{\csname MathChar \endcsname"1#1#2#3 \sumlimits}
-\edef\m@COi#1#2#3{\csname MathChar \endcsname"1#1#2#3 \intlimits}
-\def\delim@a#1#2#3#4{\ifx\relax#1#2#3#4\else#1\fi #2#3#4}
-\def\delim@b#1#2#3#4{\ifx\relax#1#2#3#4\else#1\fi }
-\def\@tempa{%
- \@nx\@xp\@nx\delim@a\@nx\csname sd@##1##2##3\@nx\endcsname ##1##2##3 }
-\edef\m@DeL#1#2#3{\csname Delimiter \endcsname"4\@tempa}
-\edef\m@DeR#1#2#3{\csname Delimiter \endcsname"5\@tempa}
-\edef\m@DeB#1#2#3{\csname Delimiter \endcsname"0\@tempa}
-\edef\m@DeA#1#2#3{\csname Delimiter \endcsname"3\@tempa}
-\edef\m@Rad#1#2#3{\csname Radical \endcsname"\@tempa}
-\def\do#1#2{\@xp\def\csname sd@#1\endcsname{#2}}
-\do{300}{028}
-\do{301}{029}
-\do{302}{05B}
-\do{303}{05D}
-\do{304}{262}
-\do{305}{263}
-\do{306}{264}
-\do{307}{265}
-\do{308}{266}
-\do{309}{267}
-\do{30A}{268}
-\do{30B}{269}
-\do{30C}{26A}
-\do{30D}{26B}
-\do{30E}{13D}
-\do{30F}{26E}
-\do{340}{37A}
-\do{341}{37B}
-\do{33A}{33A}
-\do{33B}{33B}
-\do{33E}{33E}
-\do{33C}{26A}
-\do{33D}{26B}
-\do{378}{222}
-\do{379}{223}
-\do{33F}{26C}
-\do{37E}{22A}
-\do{37F}{22B}
-\do{377}{26D}
-\do{30F}{26E}
-\def\m@Acc#1#2#3#4{\mathaccent"#1#2#3{#4}}
-\def\@symAcc{\@sym}
+% \end{macrocode}
+% \TeX\ defines eight types of atoms.
+% \begin{enumerate}\addtocounter{enumi}{-1}
+% \item Ordinary
+% \item Operators
+% \item Binary
+% \item Relation
+% \item Open
+% \item Close
+% \item Punctuation
+% \item Inner
+% \end{enumerate}
+% \TeX\ defines eight math classes.
+% \begin{enumerate}\addtocounter{enumi}{-1}
+% \item Ordinary
+% \item Operators
+% \item Binary
+% \item Relation
+% \item Open
+% \item Close
+% \item Punctuation
+% \item Variable family
+% \end{enumerate}
+% flexisym/breqn extends this to types of classes.
+% \begin{enumerate}\addtocounter{enumi}{-1}
+% \item Ordinary: (Ord), Bidirectional delimiters (DeB), Radicals
+% (Rad), Accented items (Acc)
+% \item Operators: Cumulative Operators sum-like (COs), Cumulative
+% Operators integral-like (COi)
+% \item Binary: (Bin)
+% \item Relation: (Rel), Arrow delimiters (DeA)
+% \item Open: (DeL)
+% \item Close (DeR)
+% \item Punctuation: (Pun)
+% \item Variable family: (Var)
+% \end{enumerate}
+%
+% Here's an overview of what we are about to do. Math chars of each
+% type as defined by us need a basic operation for inserting it. We
+% will call that function |\math_bsym_|\meta{type}|:Nn|. Next there
+% are compund symbols for each type which we name
+% |\math_bcsym_|\meta{type}|:Nn|. Also, there is inline mode and
+% display mode which are different. We will call them for
+% |\math_isym_|\meta{type}|:Nn| |\math_icsym_|\meta{type}|:Nn| for
+% inline mode and |\math_dsym_|\meta{type}|:Nn| and
+% |\math_dcsym_|\meta{type}|:Nn|. The code uses the terms
+% |\math_sym_|\meta{type}|:Nn| and |\math_csym_|\meta{type}|:Nn| for
+% the current meaning of things. First up the basic definitions. |#1|
+% is the math group it is from and |#2| is the slot position.
+% \begin{macrocode}
+\cs_new:Npn \math_bsym_Ord:Nn {\math_char:NNn 0 }% \m@Ord
+\cs_new:Npn \math_bsym_Var:Nn {\math_char:NNn 7 }% \m@Var
+\cs_new:Npn \math_bsym_Bin:Nn {\math_char:NNn 2}% \m@Bin
+\cs_new:Npn \math_bsym_Rel:Nn {\math_char:NNn 3 }% \m@Bin
+\cs_new:Npn \math_bsym_Pun:Nn {\math_char:NNn 6 }%\m@Pun
+\cs_new:Nn \math_bsym_COs:Nn { \math_char:NNn 1#1{#2} \sumlimits}% \m@COs
+\cs_new:Nn \math_bsym_COi:Nn { \math_char:NNn 1#1{#2} \intlimits}% \m@COi
+\cs_new:Nn \math_bsym_DeL:Nn { \math_sd_del_aux:Nnn 4 #1{#2} }%\m@DeL
+\cs_new:Nn \math_bsym_DeR:Nn { \math_sd_del_aux:Nnn 5 #1{#2} } %\m@DeR
+\cs_new:Nn \math_bsym_DeB:Nn { \math_sd_del_aux:Nnn 0 #1{#2} }%\m@DeB
+\cs_new:Nn \math_bsym_DeA:Nn { \math_sd_del_aux:Nnn 3 #1{#2} }%\m@DeA
+\cs_new:Nn \math_bsym_Rad:Nn { \math_sd_rad_aux:Nn #1{#2} }%\m@Rad
+\cs_new:Npn \math_bsym_Acc:Nn #1#2#3#4 {\math_accent:NNnn #1#2{#3}{#4}}% name is wrong
+
+% \end{macrocode}
+% Next is somewhat complicated internally. The way it is done is that
+% delimiters and radicals need information about the smallest version
+% of the symbol. If this smallest delimiter (SD) is defined, then use
+% it. We have these functions to help us return the number. Extract
+% the numbers to use and stick a function in front of it.
+%
+% Code changed because now we require the smallest delimiter to be
+% defined (it may be the same, no problem in that). So the two
+% arguments present in |\math_bsym_DeL:Nn| are the location of
+% extensible version (where the font will do the rest for us
+% automatically). For each delimiter, a pointer is defined using the
+% extensible characters family and slot as name and value equal to
+% family and position of the smallest version. For |(| in standard
+% \LaTeX\ this is |{del}{00}| and |{OT1}{28}| respectively. Hence,
+% |\math_bsym_DeL:Nn \mg@del {00}| must expand to
+% |\math_delimiter:NNnNn 4 \mg@OT1 {28}\mg@del{00}|. So first expand
+% away to get to the smallest version. Then call next function which
+% shuffles the arguments around.
+% \begin{macrocode}
+\cs_set:Npn \math_sd_del_aux:Nnn #1#2#3{
+ \exp_args:Nf \math_sd_del_auxi:nN {\use:c{sd@#2#3}} #1 #2{#3}
+}
+\cs_set:Npn \math_sd_del_auxi:nN #1#2{ \math_delimiter:NNnNn #2 #1 }
+% \end{macrocode}
+% Same for radicals.
+% \begin{macrocode}
+\cs_set:Npn \math_sd_rad_aux:Nn #1#2{
+ \exp_args:Nf \math_sd_rad_auxi:n {\use:c{sd@#1#2}} #1 {#2}
+}
+\cs_set:Npn \math_sd_rad_auxi:n #1{ \math_radical:NnNn #1 }
+
+
+% \cs_set:Npn \math_sd_aux:nn #1#2 {
+% %\exp_args:Nnf \use:nn { #1} { \math_sd_auxi:Nn #2 }
+% \exp_args:Nnf \use:nn { #1} { \use:c{sd@\use:nn#2} }
+% }
+% \cs_set:Npn \math_sd_auxi:Nn #1#2 {
+% \cs_if_free:cTF {sd@#1#2}
+% { #1{#2} }
+% { \use:c{sd@#1#2} }
+% }
+% \end{macrocode}
+% compound symbols here
+% \begin{macrocode}
+\cs_set_protected:Npn \math_bcsym_Ord:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symOrd
+\cs_set_protected:Npn \math_bcsym_Var:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symVar
+\cs_set_protected:Npn \math_bcsym_Bin:Nn #1#2{\@symtype\mathbin{\OrdSymbol{#2}}}%\@symBin
+\cs_set_protected:Npn \math_bcsym_Rel:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symRel
+\cs_set_protected:Npn \math_bcsym_Pun:Nn #1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}%\@symPun
+\cs_set_protected:Npn \math_bcsym_COi:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\intlimits}}%\@symCOi
+\cs_set_protected:Npn \math_bcsym_COs:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\sumlimits}}%\@symCOs
+\cs_set_protected:Npn \math_bcsym_DeL:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symDeL
+\cs_set_protected:Npn \math_bcsym_DeR:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symDeR
+\cs_set_protected:Npn \math_bcsym_DeB:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symDeB
+\cs_set_protected:Npn \math_bcsym_DeA:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symDeA
+\cs_set_protected:Npn \math_bcsym_Acc:Nn {\@sym}%\@symAcc FIX!
+% These three?
+\cs_set_protected:Npn \math_bcsym_Ope:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symVar
+\cs_set_protected:Npn \math_bcsym_Clo:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symVar
+\cs_set_protected:Npn \math_bcsym_Inn:Nn #1#2{\@symtype\mathinner{\OrdSymbol{#2}}}%\@symVar
+
\let\@symtype\@firstofone
-\def\@symOrd#1#2{\@symtype\mathord{\OrdSymbol{#2}}}
-\def\@symVar{\@symOrd}
-\def\@symBin#1#2{\@symtype\mathbin{\OrdSymbol{#2}}}
-\def\@symRel#1#2{\@symtype\mathrel{\OrdSymbol{#2}}}
-\def\@symPun#1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}
-\def\@symCOi#1#2{\@symtype{\mathop{\OrdSymbol{#2}}\intlimits}}
-\def\@symCOs#1#2{\@symtype{\mathop{\OrdSymbol{#2}}\sumlimits}}
-\def\@symOpe#1#2{\@symtype\mathopen{\OrdSymbol{#2}}}
-\def\@symClo#1#2{\@symtype\mathclose{\OrdSymbol{#2}}}
-\def\@symDeL#1#2{\@symtype\mathopen{\OrdSymbol{#2}}}
-\def\@symDeR#1#2{\@symtype\mathclose{\OrdSymbol{#2}}}
-\def\@symDeB#1#2{\@symtype\mathord{\OrdSymbol{#2}}}
-\def\@symInn#1#2{\@symtype\mathinner{\OrdSymbol{#2}}}
-\def\@xnce#1{\@xp\@nx\csname#1\endcsname}
\let\sym@global\global
+% \end{macrocode}
+%
+%
+%
+%
+% The inline variants, using the basic operations. Currently we do not
+% do anything to inline math.
+% \begin{macrocode}
+\cs_new:Npn \math_isym_Ord:Nn {\math_bsym_Ord:Nn }% \m@Ord
+\cs_new:Npn \math_isym_Var:Nn {\math_bsym_Var:Nn }% \m@Var
+\cs_new:Npn \math_isym_Bin:Nn {\math_bsym_Bin:Nn}% \m@Bin
+\cs_new:Npn \math_isym_Rel:Nn {\math_bsym_Rel:Nn }% \m@Bin
+\cs_new:Npn \math_isym_Pun:Nn {\math_bsym_Pun:Nn }%\m@Pun
+\cs_new:Npn \math_isym_COs:Nn {\math_bsym_COs:Nn}% \m@COs
+\cs_new:Npn \math_isym_COi:Nn {\math_bsym_COi:Nn}% \m@COi
+\cs_new:Npn \math_isym_DeL:Nn {\math_bsym_DeL:Nn}%\m@DeL
+\cs_new:Npn \math_isym_DeR:Nn{ \math_bsym_DeR:Nn}%\m@DeR
+\cs_new:Npn \math_isym_DeB:Nn{ \math_bsym_DeB:Nn }%\m@DeB
+\cs_new:Npn \math_isym_DeA:Nn { \math_bsym_DeA:Nn }%\m@DeA
+\cs_new:Npn \math_isym_Rad:Nn { \math_bsym_Rad:Nn}%\m@Rad
+\cs_new:Npn \math_isym_Acc:Nn {\math_bsym_DeL:Nn}% name is wrong
+% inline compound
+\cs_set_protected:Npn \math_icsym_Ord:Nn {\math_bcsym_Ord:Nn}
+\cs_set_protected:Npn \math_icsym_Var:Nn {\math_bcsym_Var:Nn}
+\cs_set_protected:Npn \math_icsym_Bin:Nn {\math_bcsym_Bin:Nn}
+\cs_set_protected:Npn \math_icsym_Rel:Nn {\math_bcsym_Rel:Nn}
+\cs_set_protected:Npn \math_icsym_Pun:Nn {\math_bcsym_Pun:Nn}
+\cs_set_protected:Npn \math_icsym_COi:Nn {\math_bcsym_COi:Nn}
+\cs_set_protected:Npn \math_icsym_COs:Nn {\math_bcsym_COs:Nn}
+\cs_set_protected:Npn \math_icsym_DeL:Nn {\math_bcsym_DeL:Nn}
+\cs_set_protected:Npn \math_icsym_DeR:Nn {\math_bcsym_DeR:Nn}
+\cs_set_protected:Npn \math_icsym_DeB:Nn {\math_bcsym_DeB:Nn}
+\cs_set_protected:Npn \math_icsym_DeA:Nn {\math_bcsym_DeA:Nn}
+\cs_set_protected:Npn \math_icsym_Acc:Nn {\math_bcsym_Acc:Nn}
+\cs_set_protected:Npn \math_icsym_Ope:Nn {\math_bcsym_Ope:Nn}
+\cs_set_protected:Npn \math_icsym_Clo:Nn {\math_bcsym_Clo:Nn}
+\cs_set_protected:Npn \math_icsym_Inn:Nn {\math_bcsym_Inn:Nn}
+% \end{macrocode}
+%
+% The display variants, using the basic operations. Currently we do
+% not do anything to inline math.
+% \begin{macrocode}
+\cs_new:Npn \math_dsym_Ord:Nn {\math_bsym_Ord:Nn }
+\cs_new:Npn \math_dsym_Var:Nn {\math_bsym_Var:Nn }
+\cs_new:Npn \math_dsym_Bin:Nn {\math_bsym_Bin:Nn}
+\cs_new:Npn \math_dsym_Rel:Nn {\math_bsym_Rel:Nn }
+\cs_new:Npn \math_dsym_Pun:Nn {\math_bsym_Pun:Nn }
+\cs_new:Npn \math_dsym_COs:Nn {\math_bsym_COs:Nn}
+\cs_new:Npn \math_dsym_COi:Nn {\math_bsym_COi:Nn}
+\cs_new:Npn \math_dsym_DeL:Nn {\math_bsym_DeL:Nn}
+\cs_new:Npn \math_dsym_DeR:Nn{ \math_bsym_DeR:Nn}
+\cs_new:Npn \math_dsym_DeB:Nn{ \math_bsym_DeB:Nn }
+\cs_new:Npn \math_dsym_DeA:Nn { \math_bsym_DeA:Nn }
+\cs_new:Npn \math_dsym_Rad:Nn { \math_bsym_Rad:Nn}
+\cs_new:Npn \math_dsym_Acc:Nn {\math_bsym_DeL:Nn}
+% inline compound
+\cs_set_protected:Npn \math_dcsym_Ord:Nn {\math_bcsym_Ord:Nn}
+\cs_set_protected:Npn \math_dcsym_Var:Nn {\math_bcsym_Var:Nn}
+\cs_set_protected:Npn \math_dcsym_Bin:Nn {\math_bcsym_Bin:Nn}
+\cs_set_protected:Npn \math_dcsym_Rel:Nn {\math_bcsym_Rel:Nn}
+\cs_set_protected:Npn \math_dcsym_Pun:Nn {\math_bcsym_Pun:Nn}
+\cs_set_protected:Npn \math_dcsym_COi:Nn {\math_bcsym_COi:Nn}
+\cs_set_protected:Npn \math_dcsym_COs:Nn {\math_bcsym_COs:Nn}
+\cs_set_protected:Npn \math_dcsym_DeL:Nn {\math_bcsym_DeL:Nn}
+\cs_set_protected:Npn \math_dcsym_DeR:Nn {\math_bcsym_DeR:Nn}
+\cs_set_protected:Npn \math_dcsym_DeB:Nn {\math_bcsym_DeB:Nn}
+\cs_set_protected:Npn \math_dcsym_DeA:Nn {\math_bcsym_DeA:Nn}
+\cs_set_protected:Npn \math_dcsym_Acc:Nn {\math_bcsym_Acc:Nn}
+\cs_set_protected:Npn \math_dcsym_Ope:Nn {\math_bcsym_Ope:Nn}
+\cs_set_protected:Npn \math_dcsym_Clo:Nn {\math_bcsym_Clo:Nn}
+\cs_set_protected:Npn \math_dcsym_Inn:Nn {\math_bcsym_Inn:Nn}
+% \end{macrocode}
+% Almost ready now! Now just need two commands to initialize these
+% settings.
+%
+% \begin{macrocode}
+\cs_set:Npn \math_setup_inline_symbols:{
+ \cs_set_eq:NN \math_sym_Ord:Nn \math_isym_Ord:Nn
+ \cs_set_eq:NN \math_sym_Var:Nn \math_isym_Var:Nn
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
+ \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
+ \cs_set_eq:NN \math_sym_Pun:Nn \math_isym_Pun:Nn
+ \cs_set_eq:NN \math_sym_COs:Nn \math_isym_COs:Nn
+ \cs_set_eq:NN \math_sym_COi:Nn \math_isym_COi:Nn
+ \cs_set_eq:NN \math_sym_DeL:Nn \math_isym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeR:Nn \math_isym_DeR:Nn
+ \cs_set_eq:NN \math_sym_DeB:Nn \math_isym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeA:Nn \math_isym_DeA:Nn
+ \cs_set_eq:NN \math_sym_Rad:Nn \math_isym_Rad:Nn
+ \cs_set_eq:NN \math_sym_Acc:Nn \math_isym_DeL:Nn
+ \cs_set_eq:NN \math_csym_Ord:Nn \math_icsym_Ord:Nn
+ \cs_set_eq:NN \math_csym_Var:Nn \math_icsym_Var:Nn
+ \cs_set_eq:NN \math_csym_Bin:Nn \math_icsym_Bin:Nn
+ \cs_set_eq:NN \math_csym_Rel:Nn \math_icsym_Rel:Nn
+ \cs_set_eq:NN \math_csym_Pun:Nn \math_icsym_Pun:Nn
+ \cs_set_eq:NN \math_csym_COi:Nn \math_icsym_COi:Nn
+ \cs_set_eq:NN \math_csym_COs:Nn \math_icsym_COs:Nn
+ \cs_set_eq:NN \math_csym_DeL:Nn \math_icsym_DeL:Nn
+ \cs_set_eq:NN \math_csym_DeR:Nn \math_icsym_DeR:Nn
+ \cs_set_eq:NN \math_csym_DeB:Nn \math_icsym_DeB:Nn
+ \cs_set_eq:NN \math_csym_DeA:Nn \math_icsym_DeA:Nn
+ \cs_set_eq:NN \math_csym_Acc:Nn \math_icsym_Acc:Nn
+ \cs_set_eq:NN \math_csym_Ope:Nn \math_icsym_Ope:Nn
+ \cs_set_eq:NN \math_csym_Clo:Nn \math_icsym_Clo:Nn
+ \cs_set_eq:NN \math_csym_Inn:Nn \math_icsym_Inn:Nn
+}
+
+\cs_set:Npn \math_setup_display_symbols:{
+ \cs_set_eq:NN \math_sym_Ord:Nn \math_dsym_Ord:Nn
+ \cs_set_eq:NN \math_sym_Var:Nn \math_dsym_Var:Nn
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn
+ \cs_set_eq:NN \math_sym_Rel:Nn \math_dsym_Rel:Nn
+ \cs_set_eq:NN \math_sym_Pun:Nn \math_dsym_Pun:Nn
+ \cs_set_eq:NN \math_sym_COs:Nn \math_dsym_COs:Nn
+ \cs_set_eq:NN \math_sym_COi:Nn \math_dsym_COi:Nn
+ \cs_set_eq:NN \math_sym_DeL:Nn \math_dsym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeR:Nn \math_dsym_DeR:Nn
+ \cs_set_eq:NN \math_sym_DeB:Nn \math_dsym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeA:Nn \math_dsym_DeA:Nn
+ \cs_set_eq:NN \math_sym_Rad:Nn \math_dsym_Rad:Nn
+ \cs_set_eq:NN \math_sym_Acc:Nn \math_dsym_DeL:Nn
+ \cs_set_eq:NN \math_csym_Ord:Nn \math_dcsym_Ord:Nn
+ \cs_set_eq:NN \math_csym_Var:Nn \math_dcsym_Var:Nn
+ \cs_set_eq:NN \math_csym_Bin:Nn \math_dcsym_Bin:Nn
+ \cs_set_eq:NN \math_csym_Rel:Nn \math_dcsym_Rel:Nn
+ \cs_set_eq:NN \math_csym_Pun:Nn \math_dcsym_Pun:Nn
+ \cs_set_eq:NN \math_csym_COi:Nn \math_dcsym_COi:Nn
+ \cs_set_eq:NN \math_csym_COs:Nn \math_dcsym_COs:Nn
+ \cs_set_eq:NN \math_csym_DeL:Nn \math_dcsym_DeL:Nn
+ \cs_set_eq:NN \math_csym_DeR:Nn \math_dcsym_DeR:Nn
+ \cs_set_eq:NN \math_csym_DeB:Nn \math_dcsym_DeB:Nn
+ \cs_set_eq:NN \math_csym_DeA:Nn \math_dcsym_DeA:Nn
+ \cs_set_eq:NN \math_csym_Acc:Nn \math_dcsym_Acc:Nn
+ \cs_set_eq:NN \math_csym_Ope:Nn \math_dcsym_Ope:Nn
+ \cs_set_eq:NN \math_csym_Clo:Nn \math_dcsym_Clo:Nn
+ \cs_set_eq:NN \math_csym_Inn:Nn \math_dcsym_Inn:Nn
+}
+% \end{macrocode}
+% Phew, that was it.
+%
+% Well, almost. We need to set them up for use properly. Should they
+% be added to |\everymath|? Probably, for math within
+% displays. However, this is a lot of extra processing which we could
+% tackle in the display setup.
+% \begin{macrocode}
+\math_setup_inline_symbols:
+% \end{macrocode}
+%
+% Need an active character for a second. Don't rely on |~| being
+% active!
+% \begin{macrocode}
+\edef\tmp{\catcode\z@=\the\catcode\z@}
+\catcode\z@=\active
\def\DeclareFlexSymbol#1#2#3#4{%
\begingroup
- \edef\@tempb{\@nx\@sym\@nx#1\@xnce{m@#2}\@xnce{mg@#3}#4}%
- \ifcat\@nx#1\relax
+ \cs_set:Npx\@tempb{\exp_not:N\@sym\exp_not:N#1\exp_not:c{math_sym_#2:Nn}\exp_not:c{mg@#3}{#4}}%
+ \ifcat\exp_not:N#1\relax
\sym@global\let#1\@tempb
\else
\sym@global\mathcode`#1="8000\relax
- \lccode`\~=`#1\relax
- \lowercase{\sym@global\let~\@tempb}%
+ \lccode\z@=`#1\relax
+ \lowercase{\sym@global\let^^@\@tempb}% zero char
\fi
\endgroup
}
+\tmp % restore catcode
+\cs_set:Npn \DeclareFlexDelimiter #1#2#3#4#5#6{
+ \DeclareFlexSymbol{#1}{#2}{#3}{#4}
+ \cs_gset:cpx{sd@\use:c{mg@#3}#4}{\exp_not:c{mg@#5}{#6}}
+}
+
+% \end{macrocode}
+% |\DeclareFlexCompoundSymbol{\cdots}{Inn}{\cdotp\cdotp\cdotp}|
+% |\def\@symInn#1#2{\@symtype\mathinner{\OrdSymbol{#2}}}|
+% |\@symtype \mathinner{\OrdSymbol{\cdtop\cdotp\cdotp}}|
+% \begin{macrocode}
\def\DeclareFlexCompoundSymbol#1#2#3{%
- \@xp\DeclareRobustCommand\@xp#1\@xp{\csname @sym#2\endcsname#1{#3}}%
+ \exp_args:NNo \DeclareRobustCommand#1{\csname math_csym_#2:Nn\endcsname#1{#3}}%
\sym@global\let#1#1\relax
}
\DeclareRobustCommand\textchar{\text@char\textfont}
\DeclareRobustCommand\scriptchar{\text@char\scriptfont}%
-\def\text@char@a{\?\endgroup}%
-\def\text@char@sym#1#2#3{%
+% \end{macrocode}
+% Simplified the next bit because now the slot is read as one argument
+% so no afterassignment and what have you. Just drop the char
+% directly.
+% \begin{macrocode}
+\def\text@char@sym#1#2#3#4{% #3=fam, #4=slot
\begingroup
- \let\@sym\relax % defense against infinite loops
- \the\text@script@char#3%
- \afterassignment\text@char@a
- \chardef\?="%
+ \cs_set_eq:NN \@sym \prg_do_nothing: % defense against infinite loops
+% \end{macrocode}
+% the next line will result in |\scriptfont|\meta{num}, where |#3|
+% provides the \meta{num}.
+% \begin{macrocode}
+ \the\text@script@char#3%
+ \char"#4\endgroup
}
-\def\text@char#1#2{\begingroup\check@mathfonts
- \let\text@script@char#1\let\@sym\text@char@sym
- \let\@symtype\@secondoftwo \let\OrdSymbol\@firstofone
- \let\ifmmode\iftrue \everymath{$\@gobble}%$
- \def\mkern{\muskip\z@}\let\mskip\mkern
- \ifcat\relax\noexpand#2#2%
+\edef\tmp{\catcode\z@=\the\catcode\z@}
+\catcode\z@=\active
+\def\text@char#1#2{\begingroup
+ \check@mathfonts
+ \cs_set_eq:NN \text@script@char#1
+ \cs_set_eq:NN \@sym\text@char@sym
+ \cs_set_eq:NN \@symtype\use_ii:nn
+ \cs_set_eq:NN\OrdSymbol\use:n
+ \cs_set_eq:NN\ifmmode\iftrue
+ \everymath{$\use_none:n}%$
+ \def\mkern{\muskip\z@}
+ \cs_set_eq:NN\mskip\mkern
+ \ifcat\relax\noexpand#2% true if #2 is a cs.
+ #2%
\else
- \lccode`\~=\expandafter`\string#2\relax
- \lowercase{~}%
+ \lccode\z@=\expandafter`\string#2\relax
+ \lowercase{^^@}%
\fi
\endgroup
}
+\tmp % restore catcode
\providecommand\textprime{}
\DeclareRobustCommand\textprime{\leavevmode
\raise.8ex\hbox{\text@char\scriptfont\prime}%
@@ -334,40 +597,47 @@ and the derived files
\ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
}%
}
+% \end{macrocode}
+% Arrow fills. changed to 7mu as in amsmath
+% \begin{macrocode}
\@ifundefined{rightarrowfill@}{}{%
\def\rightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\copy\z@\mkern-6mu\cleaders
+ $#1\copy\z@\mkern-7mu\cleaders
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
\mkern-6mu\OrdSymbol{\rightarrow}$}
\def\leftarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
$#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
\hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
- \mkern-6mu\box\z@$}
+ \mkern-7mu\box\z@$}
\def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
$#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
\mkern-6mu\OrdSymbol{\rightarrow}$}
}
-\def\binrel@sym#1#2#3#4#5{%
+% \end{macrocode}
+% hey, this looks like a simple case switch...
+% \begin{macrocode}
+\def\binrel@sym#1#2#3#4{%
\xdef\binrel@@##1{%
- \ifx\m@Ord#2\@nx\@symOrd
- \else\ifx\m@Var#2\@nx\@symVar
- \else\ifx\m@COs#2\@nx\@symCOs
- \else\ifx\m@COi#2\@nx\@symCOi
- \else\ifx\m@Bin#2\@nx\@symBin
- \else\ifx\m@Rel#2\@nx\@symRel
- \else\ifx\m@Pun#2\@nx\@symPun
- \else\@nx\@symErr \fi\fi\fi\fi\fi\fi\fi
- ?{\@nx\OrdSymbol{##1}}}%
+ \ifx\math_sym_Ord:Nn #2 \math_csym_Ord:Nn
+ \else\ifx\math_sym_Var:Nn#2 \math_csym_Var:Nn
+ \else\ifx\math_sym_COs:Nn#2 \math_csym_COs:Nn
+ \else\ifx\math_sym_COi:Nn#2 \math_csym_COi:Nn
+ \else\ifx\math_sym_Bin:Nn#2 \math_csym_Bin:Nn
+ \else\ifx\math_sym_Rel:Nn#2 \math_csym_Rel:Nn
+ \else\ifx\math_sym_Pun:Nn#2 \math_csym_Pun:Nn
+ \else\exp_not:N\@symErr \fi\fi\fi\fi\fi\fi\fi
+ ?{\exp_not:N\OrdSymbol{##1}}}%
}
+
\def\binrel@a{%
- \def\@symOrd##1##2{\gdef\binrel@@####1{\@symOrd##1{\OrdSymbol{####1}}}}%
- \def\@symVar##1##2{\gdef\binrel@@####1{\@symVar##1{\OrdSymbol{####1}}}}%
- \def\@symCOs##1##2{\gdef\binrel@@####1{\@symCOs##1{\OrdSymbol{####1}}}}%
- \def\@symCOi##1##2{\gdef\binrel@@####1{\@symCOi##1{\OrdSymbol{####1}}}}%
- \def\@symBin##1##2{\gdef\binrel@@####1{\@symBin##1{\OrdSymbol{####1}}}}%
- \def\@symRel##1##2{\gdef\binrel@@####1{\@symRel##1{\OrdSymbol{####1}}}}%
- \def\@symPun##1##2{\gdef\binrel@@####1{\@symPun##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Ord:Nn##1##2{\gdef\binrel@@####1{\math_sym_Ord:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Var:Nn##1##2{\gdef\binrel@@####1{\math_sym_Var:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_COs:Nn##1##2{\gdef\binrel@@####1{\math_sym_COs:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_COi:Nn##1##2{\gdef\binrel@@####1{\math_sym_COi:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Bin:Nn##1##2{\gdef\binrel@@####1{\math_sym_Bin:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Rel:Nn##1##2{\gdef\binrel@@####1{\math_sym_Rel:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Pun:Nn##1##2{\gdef\binrel@@####1{\math_sym_Pun:Nn##1{\OrdSymbol{####1}}}}%
}
\def\binrel@#1{%
\setbox\z@\hbox{$%
@@ -377,26 +647,43 @@ and the derived files
}
\def\@symextension{sym}
\newcommand\usesymbols[1]{%
- \@for\@tempb:=#1\do{%
- \@xp\@onefilewithoptions\@xp{\@tempb}[][]\@symextension
+ \clist_map_variable:nNn{#1}\@tempb{%
+ \exp_args:No\@onefilewithoptions{\@tempb}[][]\@symextension
}%
}
+% Need to introduce \ProvidesExplFile somehow
\newcommand\ProvidesSymbols[1]{\ProvidesFile{#1.sym}}
-\DeclareRobustCommand{\not}[1]{\@symRel\not{\OrdSymbol{\notRel#1}}}
+\DeclareRobustCommand{\not}[1]{\math_csym_Rel:Nn\not{\OrdSymbol{\notRel#1}}}
\DeclareRobustCommand{\OrdSymbol}[1]{%
\begingroup\mathchars@reset#1\endgroup
}
\def\mathchars@reset{\let\@sym\@sym@ord \let\@symtype\@symtype@ord
\let\OrdSymbol\relax}
\def\@symtype@ord#1#{}% a strange sort of \@gobble
-\def\@sym@ord#1#2{\@xp\@sym@ord@a\string#2\@nil}%
+\def\@sym@ord#1#2{\exp_after:wN\@sym@ord@a\string#2\@nil}%
+% \end{macrocode}
+% Read delimited argument here. We want to find first character of
+% DeA, Bin, etc. and the control sequence checked agains is |\m@DeL|,
+% |\m@Pun|, etc. The lccode trick makes the . into an @ with catcode
+% 12. This is what results when the code is called with
+% |\string|. Beware of this when we change internal names for math
+% groups! If a Delimiter is found, insert it with class 0 but use the
+% smallest version available. Otherwise just insert math char of class
+% 0. The code here is not pretty and it indicates it should be tackled
+% differently!
+% \begin{macrocode}
\begingroup
-\lccode`\.=`\@ \lowercase{\endgroup
-\def\@sym@ord@a#1.}#2#3\@nil#4#5#6{%
- \csname MathChar \endcsname"0%
- \if D#2\@xp\delim@b\csname sd@#4#5#6\endcsname#4#5#6
- \else #4#5#6
- \fi
+\lccode`\.=`\_ \lowercase{\endgroup
+\def\@sym@ord@a#1.#2.}#3#4\@nil#5#6{%
+ \if D#3
+ %\math_ord_delim_aux:Nn #5{#6}
+ \math_sd_del_aux:Nnn 0 #5{#6}% check if this works!
+ \else
+ \math_char:NNn 0 #5{#6}
+ \fi
+}
+\cs_set:Nn \math_ord_delim_aux:Nn {
+ \math_sd_aux:nn { \math_char:NNn 0 } {#1{#2}}
}
% \end{macrocode}
%
@@ -454,18 +741,22 @@ and the derived files
% \begin{macrocode}
\AtBeginDocument{%
\def\newmcodes@{%
- \mathcode `\'39\mathcode `\*42\mathcode `\."613A
- \ifnum\mathcode`\-=45
+ \mathcode `\'39\space
+ \mathcode `\*42\space
+ \mathcode `\."613A\space
+ \ifnum\mathcode`\-=45\space
\else
% \end{macrocode}
% The extra check. Don't do anything if \texttt{-} is math active.
% \begin{macrocode}
- \ifnum\mathcode`\-=32768
+ \ifnum\mathcode`\-=32768\space
\else
\mathchardef \std@minus \mathcode `\-\relax
\fi
\fi
- \mathcode `\-45 \mathcode `\/47\mathcode `\:"603A\relax
+ \mathcode `\-45\space
+ \mathcode `\/47\space
+ \mathcode `\:"603A\space\relax
}%
}
% \end{macrocode}
@@ -516,25 +807,41 @@ and the derived files
%
%
% Default mathgroup setup.
+% \changes{v0.3}{2010/07/11}{fixed bugs regarding capital greek
+% letters in mathpazo and mathptmx}
% \begin{macrocode}
%<*cmbase|mathpazo|mathptmx>
%<cmbase>\ProvidesSymbols{cmbase}[2007/12/19 v0.92]
-%<mathpazo>\ProvidesSymbols{mathpazo}[2007/12/19 v0.2]
-%<mathptmx>\ProvidesSymbols{mathptmx}[2007/12/19 v0.2]
-\@xp\xdef\csname mg@OT1\endcsname{\hexnumber@\symoperators}
-\@xp\xdef\csname mg@OML\endcsname{\hexnumber@\symletters}
-\@xp\xdef\csname mg@OMS\endcsname{\hexnumber@\symsymbols}
-\@xp\xdef\csname mg@OMX\endcsname{\hexnumber@\symlargesymbols}
-\gdef\mg@bin{\mg@OMS}
-\gdef\mg@del{\mg@OMX}
-\xdef\mg@digit{\@xp\@nx\csname mg@OT1\endcsname}
-\gdef\mg@latin{\mg@OML}
-\global\let\mg@Latin\mg@latin
-\global\let\mg@greek\mg@latin
-\global\let\mg@Greek\mg@digit
-\global\let\mg@rel\mg@bin
-\global\let\mg@ord\mg@bin
-\global\let\mg@cop\mg@del
+%<mathpazo>\ProvidesSymbols{mathpazo}[2010/07/11 v0.3]
+%<mathptmx>\ProvidesSymbols{mathptmx}[2010/07/11 v0.3]
+\ExplSyntaxOn
+\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
+\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
+\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
+\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
+\cs_gset:Npx\mg@bin{\mg@OMS}
+\cs_gset:Npx\mg@del{\mg@OMX}
+\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
+\cs_gset:Npn\mg@latin{\mg@OML}
+\cs_gset_eq:NN\mg@Latin\mg@latin
+\cs_gset_eq:NN\mg@greek\mg@latin
+%<cmbase|mathptmx>\cs_gset_eq:NN\mg@Greek\mg@digit
+% \end{macrocode}
+% Mathpazo takes the upper case greeks from the letter font if
+% slantedGreek is in effect, but from \emph{upright} if not. Mathptmx
+% also takes the slanted greek from the letter font.
+% \begin{macrocode}
+%<mathpazo>\@ifpackagewith{mathpazo}{slantedGreek}{%
+%<mathpazo> \cs_gset_eq:NN\mg@Greek\mg@latin
+%<mathpazo>}{%
+%<mathpazo> \cs_gset:cpx{mg@Greek}{\hexnumber@\symupright}
+%<mathpazo>}
+%<mathptmx>\@ifpackagewith{mathptmx}{slantedGreek}{%
+%<mathptmx> \cs_gset_eq:NN\mg@Greek\mg@latin
+%<mathptmx>}{}
+\cs_gset_eq:NN\mg@rel\mg@bin
+\cs_gset_eq:NN\mg@ord\mg@bin
+\cs_gset_eq:NN\mg@cop\mg@del
% \end{macrocode}
%
%
@@ -554,7 +861,7 @@ and the derived files
% uppercase Greek letters class 0 (nonvariable) instead of 7
% (variable), to eliminate the glaring inconsistency with lowercase
% Greek. (In plain \TeX , \verb"{\bf\Delta}" works, while
-% \verb"{\bf\delta}" doesn't. ) Let us try to make them both
+% \verb"{\bf\delta}" doesn't.) Let us try to make them both
% variable (fonts permitting) instead of nonvariable.
% \begin{macrocode}
\DeclareFlexSymbol{\Gamma} {Var}{Greek}{00}
@@ -810,7 +1117,7 @@ and the derived files
\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\def\cdotp{\mathpunct{\cdotOrd}}
+\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
% \end{macrocode}
% Symbols from the 128-character \fn{cmex} encoding.
% \verb"COs" stands for `cumulative operator
@@ -848,32 +1155,33 @@ and the derived files
% \begin{verbatim}
% \sd@GXX
% \end{verbatim}
-% where G is the mathgroup and XX is the hexadecimal glyph position.
-% \begin{macrocode}
-\DeclareFlexSymbol{\rangle}{DeR}{del}{0B}
-\DeclareFlexSymbol{\langle}{DeL}{del}{0A}
-\DeclareFlexSymbol{\rbrace}{DeR}{del}{09}
-\DeclareFlexSymbol{\lbrace}{DeL}{del}{08}
-\DeclareFlexSymbol{\rceil}{DeR}{del}{07}
-\DeclareFlexSymbol{\lceil}{DeL}{del}{06}
-\DeclareFlexSymbol{\rfloor}{DeR}{del}{05}
-\DeclareFlexSymbol{\lfloor}{DeL}{del}{04}
-\DeclareFlexSymbol{(}{DeL}{del}{00}
-\DeclareFlexSymbol{)}{DeR}{del}{01}
-\DeclareFlexSymbol{[}{DeL}{del}{02}
-\DeclareFlexSymbol{]}{DeR}{del}{03}
-\DeclareFlexSymbol{\lVert}{DeL}{del}{0D}
-\DeclareFlexSymbol{\rVert}{DeR}{del}{0D}
-\DeclareFlexSymbol{\lvert}{DeL}{del}{0C}
-\DeclareFlexSymbol{\rvert}{DeR}{del}{0C}
-\DeclareFlexSymbol{\Vert}{DeB}{del}{0D}
-\DeclareFlexSymbol{\vert}{DeB}{del}{0C}
+% where G is the mathgroup and XX is the hexadecimal glyph
+% position. |\DeclareFlexDelimiter| does that for us.
+% \begin{macrocode}
+\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
+\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
+\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
+\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
+\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
+\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
+\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
+\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
+\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
+\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
+\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
+\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
+\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
% \end{macrocode}
% Maybe make the vert bars mathord instead of delimiter, to discourage
% poor usage.
% \begin{macrocode}
-\DeclareFlexSymbol{|}{DeB}{del}{0C}
-\DeclareFlexSymbol{/}{DeB}{del}{0E}
+\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
% \end{macrocode}
%
%
@@ -882,20 +1190,20 @@ and the derived files
% The DeA delimiter type is a special case used only for these
% arrows.
% \begin{macrocode}
-\DeclareFlexSymbol{\lmoustache}{DeL}{del}{40}
-\DeclareFlexSymbol{\rmoustache}{DeR}{del}{41}
-\DeclareFlexSymbol{\lgroup}{DeL}{del}{3A}
-\DeclareFlexSymbol{\rgroup}{DeR}{del}{3B}
-\DeclareFlexSymbol{\bracevert}{DeB}{del}{3E}
-\DeclareFlexSymbol{\arrowvert}{DeB}{del}{3C}
-\DeclareFlexSymbol{\Arrowvert}{DeB}{del}{3D}
-\DeclareFlexSymbol{\uparrow}{DeA}{del}{78}
-\DeclareFlexSymbol{\downarrow}{DeA}{del}{79}
-\DeclareFlexSymbol{\updownarrow}{DeA}{del}{3F}
-\DeclareFlexSymbol{\Uparrow}{DeA}{del}{7E}
-\DeclareFlexSymbol{\Downarrow}{DeA}{del}{7F}
-\DeclareFlexSymbol{\Updownarrow}{DeA}{del}{77}
-\DeclareFlexSymbol{\backslash}{DeB}{del}{0F}
+\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
+\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
+\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
+\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
+\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
+\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
+\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
+\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
+\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
+\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
+\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
+\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
+\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
+\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
% \end{macrocode}
%
%
@@ -916,7 +1224,7 @@ and the derived files
% For \cs{surd}, the interior symbol gets math class 1
% (cumulative operator) to make the glyph vertically centered on the
% math axis, but the desired horizontal spacing is the spacing for a
-% mathord. (Couldn't it just be class mathopen, though? )
+% mathord. (Couldn't it just be class mathopen, though?)
% \begin{macrocode}
\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
\DeclareFlexCompoundSymbol{\surd}{Ord}{\mathop{\surdOrd}}
@@ -1024,6 +1332,7 @@ and the derived files
% \end{macrocode}
% Done.
% \begin{macrocode}
+\ExplSyntaxOff
%</cmbase|mathpazo|mathptmx>
% \end{macrocode}
% Various synonyms such as \cs{le} for \cs{leq} and
@@ -1037,13 +1346,14 @@ and the derived files
% \begin{macrocode}
%<*msabm>
\ProvidesSymbols{msabm}[2001/09/08 v0.91]
+\ExplSyntaxOn
% \end{macrocode}
% \begin{macrocode}
\RequirePackage{amsfonts}\relax
% \end{macrocode}
% \begin{macrocode}
-\@xp\xdef\csname mg@MSA\endcsname{\hexnumber@\symAMSa}%
-\@xp\xdef\csname mg@MSB\endcsname{\hexnumber@\symAMSb}%
+\cs_gset:cpx{mg@MSA}{\hexnumber@\symAMSa}%
+\cs_gset:cpx{mg@MSB}{\hexnumber@\symAMSb}%
% \end{macrocode}
% \begin{macrocode}
\DeclareFlexSymbol{\boxdot} {Bin}{MSA}{00}
@@ -1280,6 +1590,7 @@ and the derived files
% \begin{macrocode}
%%\DeclareFlexSymbol{\hbar} {Ord}{MSB}{7E}
\DeclareFlexSymbol{\backepsilon} {Rel}{MSB}{7F}
+\ExplSyntaxOff
%</msabm>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex/mh/mathstyle.dtx b/Master/texmf-dist/source/latex/mh/mathstyle.dtx
index 39e11e2f80f..2b069d39239 100644
--- a/Master/texmf-dist/source/latex/mh/mathstyle.dtx
+++ b/Master/texmf-dist/source/latex/mh/mathstyle.dtx
@@ -67,7 +67,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mathstyle 2008/08/13 v0.86 Mathstyle (MH)}
+\Msg{* Package: mathstyle 2008/11/25 v0.88 Mathstyle (MH)}
\Msg{************************************************************************}
\keepsilent
@@ -128,7 +128,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mathstyle.drv}%
- [2008/08/13 v0.86 mathstyle (MH)]
+ [2008/11/25 v0.88 mathstyle (MH)]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
@@ -141,7 +141,7 @@ and the derived files
% \fi
%
% \title{The \textsf{mathstyle} package}
-% \date{2008/08/13 v0.86}
+% \date{2008/08/13 v0.87}
% \author{Morten H\o gholm \\\texttt{mh.ctan@gmail.com}}
%
%
@@ -206,7 +206,7 @@ and the derived files
%
% \begin{macrocode}
%<*package>
-\ProvidesPackage{mathstyle}[2008/07/23 v0.85]
+\ProvidesPackage{mathstyle}[2008/11/25 v0.88]
% \end{macrocode}
% \begin{macro}{\@saveprimitive}
% A straight copy from \pkg{breqn}, see implementation details
@@ -287,9 +287,6 @@ and the derived files
\lowercase{\endgroup
\let\@@superscript=^ \let\@@subscript=_
}%
-% \end{macrocode}
-% Also need version with catcode 12.
-% \begin{macrocode}
\begingroup \catcode`\^=12\relax \catcode`\_=12\relax % just in case
\lowercase{\endgroup
\let\@@superscript@other=^ \let\@@subscript@other=_
@@ -386,7 +383,7 @@ and the derived files
\or
\@@scriptstyle
\or
- \@@scriptscripstyle
+ \@@scriptscriptstyle
\fi}
% \end{macrocode}
% Finally, we declare the package options.
@@ -394,15 +391,18 @@ and the derived files
\DeclareOption{mathactivechars}{%
\catcode`\^=12\relax
\catcode`\_=12\relax
-\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax }}
+\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax}%
+}
\DeclareOption{activechars}{%
\catcode`\^=13\relax
\catcode`\_=13\relax
-\AtBeginDocument{\catcode`\_=12\relax \catcode`\_=13\relax }}
+\AtBeginDocument{\catcode`\^=13\relax \catcode`\_=13\relax}%
+}
\DeclareOption{noactivechars}{%
\catcode`\^=7\relax
\catcode`\_=8\relax
-\AtBeginDocument{\catcode`\_=7\relax \catcode`\_=8\relax }}
+\AtBeginDocument{\catcode`\^=7\relax \catcode`\_=8\relax}%
+}
\ExecuteOptions{mathactivechars}
\ProcessOptions\relax
% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex/mh/mathtools.dtx b/Master/texmf-dist/source/latex/mh/mathtools.dtx
index 3b43779df59..5af5ac8c1a0 100644
--- a/Master/texmf-dist/source/latex/mh/mathtools.dtx
+++ b/Master/texmf-dist/source/latex/mh/mathtools.dtx
@@ -66,7 +66,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mathtools 2008/08/01 v1.06 (MH)}
+\Msg{* Package: mathtools 20010/07/11 v1.08 (MH)}
\Msg{************************************************************************}
\keepsilent
@@ -76,7 +76,7 @@
This is a generated file.
-Copyright (C) 2002-2007 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2002-2010 by Morten Hoegholm <mh.ctan@gmail.com>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -126,7 +126,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mathtools.drv}%
- [2008/08/01 v1.06 mathematical typesetting tools (MH)]
+ [2010/07/11 v1.08 mathematical typesetting tools (MH)]
\documentclass{ltxdoc}
\IfFileExists{fourier.sty}{\usepackage{fourier}}{}
\addtolength\marginparwidth{-25pt}
@@ -139,7 +139,7 @@ and the derived files
\providecommand*\email[1]{\href{mailto:#1}{\texttt{#1}}}
\providecommand*\mode[1]{\texttt{[#1]}}
\providecommand*\file[1]{\texttt{#1}}
-\usepackage{xcolor,varioref}
+\usepackage{xcolor,varioref,amssymb}
\makeatletter
\newcommand*\thinfbox[2][black]{\fboxsep0pt\textcolor{#1}{\rulebox{{\normalcolor#2}}}}
\newcommand*\thinboxed[2][black]{\thinfbox[#1]{\ensuremath{\displaystyle#2}}}
@@ -259,7 +259,7 @@ and the derived files
%
% \GetFileInfo{mathtools.drv}
%
-% \CheckSum{2004}
+% \CheckSum{2311}
%
% \title{The \pkg{mathtools} package\thanks{This file has version number
% \fileversion, last revised \filedate.}}
@@ -826,14 +826,26 @@ and the derived files
% \cs{refeq} to reference your equations.
%
% When using \key{showonlyrefs} it might be usefull to be able to
-% actually add a few equation numbers without having to actually
-% refer to them.
+% actually add a few equation numbers without directly refering to
+% them.
% \begin{codesyntax}
% \SpecialUsageIndex{\noeqref}\cs{noeqref}\marg{label,label,\dots}
% \end{codesyntax}
% \FeatureRequest{Rasmus Villemoes}{2008/03/26}
% The syntax is somewhat similar to \cs{nocite}.
%
+% \medskip\noindent\textbf{BUG:} Currently there is a bug between
+% \key{showonlyrefs} and the \pkg{ntheorem} package, then the
+% \pkg{ntheorem} option \key{thmmarks} is active. The shown equation
+% numbers may come out wrong (seems to be multiplied by 2). The
+% easiest fix is to add the following line
+% \begin{verbatim}
+% \usepackage[overload,ntheorem]{empheq}
+% \end{verbatim}
+% before loading \pkg{ntheorem}. The \pkg{empheq} package fixes some
+% problems with \pkg{ntheorem} and lets \pkg{mathtools} get correct
+% access to the equation numbers again.
+%
% \subsection{Extensible symbols}
%
% The number of horizontally extensible symbols in standard \LaTeX{}
@@ -989,6 +1001,7 @@ and the derived files
% the original definitions of \cs{overbrace} and \cs{underbrace}.
%
%
+%
%
% \subsection{New mathematical building blocks}
%
@@ -1137,7 +1150,22 @@ and the derived files
% \cs{end}\arg{dcases}\\
% \SpecialEnvIndex{dcases*}
% \cs{begin}\arg{dcases*} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
-% \cs{end}\arg{dcases*}
+% \cs{end}\arg{dcases*}\\
+% \SpecialEnvIndex{rcases}
+% \cs{begin}\arg{rcases}\texttt{~~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{math\_column}}
+% \cs{end}\arg{rcases}\\
+% \SpecialEnvIndex{rcases*}
+% \cs{begin}\arg{rcases*}\texttt{~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
+% \cs{end}\arg{rcases*}\\
+% \SpecialEnvIndex{drcases}
+% \cs{begin}\arg{drcases}\texttt{~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{math\_column}}
+% \cs{end}\arg{drcases}\\
+% \SpecialEnvIndex{drcases*}
+% \cs{begin}\arg{drcases*} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
+% \cs{end}\arg{drcases*}\\
+% \SpecialEnvIndex{cases*}
+% \cs{begin}\arg{cases*}\texttt{~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
+% \cs{end}\arg{cases*}
% \end{codesyntax}
% \FeatureRequest{Lars Madsen}{2004/07/01}
% Anyone who have tried to use an integral in the regular
@@ -1184,7 +1212,9 @@ and the derived files
% \int x-3\, dx & Integral is display style
% \end{dcases*}
% \]
-%
+% The environments \env{rcases}, \env{rcases*}, \env{drcases} and
+% \env{drcases*} are equivalent to \env{cases} and \env{dcases}, but
+% here the brace is placed on the right instead of on the left.
%
% \subsubsection{Emulating indented lines in alignments}
% \begin{codesyntax}
@@ -1231,6 +1261,36 @@ and the derived files
% & + \framebox[4cm][c]{ last part}
% \end{align*}
%
+% \subsubsection{Boxing a single line in an alignment}
+%
+% The \texttt{amsmath} package provie the \cs{boxed} macro to box
+% material in math mode. But this of course will not work if the box
+% should cross an alignment point. We provide a macro that can.
+% \hskip1sp
+% \marginpar{%
+% \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
+% \strut Evolved from a request by\\Merciadri Luca\\
+% 2010/06/28\\on comp.text.tex%
+% }
+% }%
+% \begin{codesyntax}
+% \SpecialEnvIndex{\Aboxed}\cs{Aboxed}\marg{left hand side
+% \quad\texttt{\textnormal{\&}}\quad right hand side}
+% \end{codesyntax}
+% Example
+% \begin{verbatim}
+% \begin{align*}
+% \Aboxed{ f(x) & = \int h(x)\, dx} \\
+% & = g(x)
+% \end{align*}
+% \end{verbatim}
+% Resulting in:
+% \begin{align*}
+% \Aboxed{ f(x) & = \int h(x)\, dx} \\
+% & = g(x)
+% \end{align*}
+%
+%
% \subsubsection{Adding arrows between lines in an alignment}
%
% \begin{codesyntax}
@@ -1375,7 +1435,43 @@ and the derived files
% \]
% \end{itemize}
%
-%
+% \begin{codesyntax}
+% \SpecialUsageIndex{\DeclarePairedDelimiterX}
+% \cs{DeclarePairedDelimiterX}\marg{cmd}\oarg{num args}\marg{left_delim}\marg{right_delim}\texttt{\%}\\
+% \marg{normal replacement code}\marg{starred replacement code}
+% \end{codesyntax}
+% \ProvidedBy{Lars Madsen}{2010/06/15}
+% Sometimes \cs{DeclarePairedDelimiter} just is not enough,
+% especially if one wants to hide syntax inside the macro. For
+% example one might want to implement an inner product taking two
+% arguments such that the separator symbol can be hidden inside the
+% macro itself (e.g.\ if a journal style require a semi-colon instead
+% of a comma). Therefore we have the generalized
+% \cs{DeclarePairedDelimiterX}.
+% In this setting \verb|\DeclarePairedDelimiter\abs\lvert\rvert| is
+% the same as
+% \begin{verbatim}
+% \DeclarePairedDelimiterX\abs[1]\lvert\rvert{#2}{#1}
+% \end{verbatim}
+% OK, this need some explanation: \oarg{num args} is required, and
+% should be 1--8 arguments. The starred and non-starred replacement
+% code is a bit special. The starred macro takes \meta{num args},
+% mandatory arguments, so \texttt{\#1}\dots refers to these
+% arguments. But the non-starred version also have the optional
+% argument which corresponds to \texttt{\#1}, so the mandatory
+% arguments start at \texttt{\#2} and stops at \meta{num args} plus one.
+% \begin{verbatim}
+% \DeclarePairedDelimiterX\innerp[2]{\langle}{\rangle}{#2,#3}{#1,#2}
+% \end{verbatim}
+% Inside the starred replacement one can use \cs{middle} to scale and
+% inner delimiter to the same height as the outer. In the non-starred,
+% we get the optional argument in \texttt{\#1} so we can use that if
+% needed. As an example let us define a bra-ket:
+% \begin{verbatim}
+% \DeclarePairedDelimiterX\braket[2]{\langle}{\rangle}%
+% {#2\,#1\vert\,#3}{#1\,\middle\vert\,#2}
+% \end{verbatim}
+%
%
% \subsection{Special symbols}
%
@@ -1433,6 +1529,14 @@ and the derived files
% In this case the command \cs{ordinarycolon} typesets an~\ldots\
% ordinary colon (what a surprise).
%
+% \medskip
+% \noindent\textbf{Warning:} \texttt{centercolon} \emph{does not}
+% work with languages that make use of an active colon, most notably
+% French. Sadly the \texttt{babel} package does not distinguish
+% between text and math when it comes to active characters. Nor does
+% it provide any hooks to deal with math. So currently no general
+% solution exists for this problem.
+%
% \begin{codesyntax}
% \SpecialUsageIndex{\coloneqq}\cs{coloneqq}\texttt{~~~~~}
% \SpecialUsageIndex{\Coloneqq}\cs{Coloneqq}\texttt{~~~~~}
@@ -1467,6 +1571,45 @@ and the derived files
% a \coloneqq b \quad c \Colonapprox d \quad e \dblcolon f
% \]
%
+%
+%
+% \subsubsection{A few missing symbols}
+%
+% Most provided math font sets are missing the symbols \cs{nuparrow}
+% and \cs{ndownarrow} (i.e.\ negated up- and downarrow) plus a `big'
+% version of \cs{times}. Therefore we will provide constructed
+% versions of these whenever they are not already available.
+% \begin{codesyntax}
+% \SpecialUsageIndex{\nuparrow}\cs{nuparrow}\\
+% \SpecialUsageIndex{\ndownarrow}\cs{ndownarrow}\\
+% \SpecialUsageIndex{\bigtimes}\cs{bigtimes}
+% \end{codesyntax}
+%
+% \emph{Note:} that these symbols are constructed via
+% features from the \pkg{graphicx} package, and thus may not display
+% correctly in most DVI previewers. Also note that \cs{nuparrow} and
+% \cs{ndownarrow} are constructed via \cs{nrightarrow} and
+% \cs{nleftarrrow} respectively, so these needs to be
+% present. Usually this is done via \pkg{amssymb}, but some packages
+% may be incompatible with \pkg{amssymb} so the user will have to
+% load \pkg{amssymb} or a similar package, that provides
+% \cs{nrightarrow} and \cs{nleftarrow}, themselves.
+%
+% With those requirements in place, we have
+% \begin{verbatim}
+% \[
+% \lim_{a\ndownarrow 0} f(a) \neq \bigtimes_n X_n \qquad
+% \frac{ \bigtimes_{k=1}^7 B_k \nuparrow \Omega }{2}
+% \]
+% \end{verbatim}
+% \[
+% \lim_{a\ndownarrow 0} f(a) \neq \bigtimes_n X_n \qquad
+% \frac{ \bigtimes_{k=1}^7 B_k \nuparrow \Omega }{2}
+% \]
+%
+%
+%
+%
% \section{A tribute to Michael J.~Downes}
%
% Michael J.~Downes (1958--2003) was one of the major architects
@@ -1874,10 +2017,10 @@ and the derived files
% \begin{macrocode}
%<*package>
\ProvidesPackage{mathtools}%
- [2008/08/01 v1.06 mathematical typesetting tools (MH)]
+ [2010/07/11 v1.08 mathematical typesetting tools (MH)]
% \end{macrocode}
% \begin{macrocode}
-\RequirePackage{keyval,calc}
+\RequirePackage{keyval,calc,graphicx}
\RequirePackage{mhsetup}[2007/12/03]
\MHInternalSyntaxOn
% \end{macrocode}
@@ -2920,17 +3063,82 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\DeclarePairedDelimiterX}
+% \changes{v1.08}{2010/06/10}{Added \cs{DeclarePairedDelimiterX}}
+% It has turned out that it is convenient to have a more general
+% version of \cs{DeclarePairedDelimiter}. In this version the user
+% can specify the number of arguments the created macro has, and they
+% can specify the code for the inner part of the macro. Other than
+% that the code is fairly similar to \cs{DeclarePairedDelimiter}
+% \begin{macrocode}
+\def\MHempty{}
+\def\DeclarePairedDelimiterX#1[#2]#3#4#5#6{%
+ \@ifdefinable{#1}{
+% \end{macrocode}
+% The constructor takes six arguments, the name of the macro, the
+% number of arguments (1-8), the left and right delimiter, the inner
+% code for the `normal' macro, and the inner code for the starred
+% macro. First we verify that the number of arguments fit.
+% \begin{macrocode}
+ \ifnum#2>8\relax
+ \PackageError{mathtools}{No~ more~ than~ 8~ arguments}{}
+ \else
+ \ifnum#2<1\relax
+ \PackageError{mathtools}{Macro~ need~ 1~ or~ more~ arguments}{}
+ \fi
+ \fi
+% \end{macrocode}
+% We store the number of arguments in a temp counter. The starred
+% macro has this exact number of arguments, whereas the un-starred
+% also have the optional argument.
+% \begin{macrocode}
+ % store the argument number in a temp counter
+ \@tempcnta=#2
+ \@xp\@xp\@xp
+ \newcommand
+ \@xp\csname MT_delim_\MH_cs_to_str:N #1 _star:\endcsname
+ [\@tempcnta]
+ {
+ \left#3 #6 \right#4
+ }
+ \advance\@tempcnta by 1
+ \@xp\@xp\@xp
+ \newcommand
+ \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
+% \end{macrocode}
+% Here we do things a little differently than with
+% \cs{DeclarePairedDelimiter}. The optional argument have \cs{MHempty}
+% as the default. This is locally changed when we scale the
+% delimiters, such that it can eat the l/r if needed.
+% \begin{macrocode}
+ [\@tempcnta][\MHempty]
+ {
+ \mathopen{\let\MHempty\@gobble\@nameuse {\MH_cs_to_str:N ##1 l} #3}
+ #5
+ \mathclose{\let\MHempty\@gobble\@nameuse {\MH_cs_to_str:N ##1 r} #4}
+ }
+ \DeclareRobustCommand{#1}{
+ \@ifstar
+ {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
+ {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{A \texttt{\textbackslash displaystyle} \env{cases} environment}
%
% \begin{macro}{\MT_start_cases:nnn}
% We define a single command that does all the hard work.
+% \changes{v1.08}{2010/06/10}{made \cs{MT_start_cases:nnnn} more general}
% \begin{macrocode}
-\def\MT_start_cases:nnn #1#2#3{ % #1=sep,#2=preamble,#3=delim
+\def\MT_start_cases:nnnn #1#2#3#4{ % #1=sep,#2=lpreamble,#3=rpreamble,#4=delim
\RIfM@\else
\nonmatherr@{\begin{\@currenvir}}
\fi
\MH_group_align_safe_begin:
- \left#3
+ \left#4
\vcenter \bgroup
\Let@ \chardef\dspbrk@context\@ne \restore@math@cr
\let \math@cr@@\AMS@math@cr@@
@@ -2942,8 +3150,8 @@ and the derived files
% the separation between the columns. It could be a \cs{quad} or
% something entirely different.
% \begin{macrocode}
- \strut@$\m@th \displaystyle{##}$\hfil &#1\strut@
- #2
+ \strut@#2 &#1\strut@
+ #3
\crcr
}
% \end{macrocode}
@@ -2960,28 +3168,46 @@ and the derived files
% \begin{macro}{\newcases}
% \begin{macro}{\renewcases}
% Easy creation of new \env{cases}-like environments.
+% \changes{v1.08}{2010/06/10}{changed to match the change in \cs{MT_start_cases:nnnn}}
% \begin{macrocode}
-\newcommand*\newcases[5]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right
+\newcommand*\newcases[6]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right
\newenvironment{#1}
- {\MT_start_cases:nnn {#2}{#3}{#4}}
- {\MH_end_cases:\right#5}
+ {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
+ {\MH_end_cases:\right#6}
}
-\newcommand*\renewcases[5]{
+\newcommand*\renewcases[6]{
\renewenvironment{#1}
- {\MT_start_cases:nnn {#2}{#3}{#4}}
- {\MH_end_cases:\right#5}
+ {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
+ {\MH_end_cases:\right#6}
}
% \end{macrocode}
% \begin{environment}{dcases}
% \begin{environment}{dcases*}
+% \begin{environment}{rcases}
+% \begin{environment}{rcases*}
+% \begin{environment}{drcases}
+% \begin{environment}{drcases*}
+% \begin{environment}{cases*}
% \env{dcases} is a traditional cases with display style math in
% both columns, while \env{dcases*} has text in the second column.
+% \changes{v1.08}{2010/06/10}{changed to match the change in
+% \cs{newcases} plus added rcases and drcases}
% \begin{macrocode}
-\newcases{dcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
-\newcases{dcases*}{\quad}{{##}\hfil}{\lbrace}{.}
+\newcases{dcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
+\newcases{dcases*}{\quad}{$\m@th\displaystyle{##}$\hfil}{{##}\hfil}{\lbrace}{.}
+\newcases{rcases}{\quad}{$\m@th{##}$\hfil}{$\m@th{##}$\hfil}{.}{\rbrace}
+\newcases{rcases*}{\quad}{$\m@th{##}$\hfil}{{##}\hfil}{.}{\rbrace}
+\newcases{drcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{.}{\rbrace}
+\newcases{drcases*}{\quad}{$\m@th\displaystyle{##}$\hfil}{{##}\hfil}{.}{\rbrace}
+\newcases{cases*}{\quad}{$\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{.}
% \end{macrocode}
% \end{environment}
% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
+% \end{environment}
% \end{macro}
% \end{macro}
%
@@ -3353,13 +3579,13 @@ and the derived files
% \begin{macro}{\MoveEqLeft}
% \changes{v1.05}{2008/06/05}{Added \cs{MoveEqLeft} (daleif)}
% \changes{v1.05b}{2008/06/18}{We don't need \cs{setlength} here
-% (daleif), after discussion about \cs{global} and \cs{setlength} on
-% ctt}
-% This is a very simple macro, we `pull' a line in an alignment
-% backwards in order to simulate that all subsequent lines have been
-% indented. Note that simply using \verb+\kern-2m+ after the
-% \verb+&+ is not enough, then the alignemnt environment never
-% detects that there are anything in the cell before the \verb+&+.
+% (daleif), after discussion about \cs{global} and \cs{setlength}
+% on ctt} This is a very simple macro, we `move' a line in an
+% alignment backwards in order to simulate that all subsequent lines
+% have been indented. Note that simply using \verb+\kern-2m+ after
+% the \verb+&+ is not enough, then the alignemnt environment never
+% detects that there is anything (though simulated) in the cell
+% before the \verb+&+.
% \begin{macrocode}
\newcommand\MoveEqLeft[1][2]{%
\global\@tempdima=#1em%
@@ -3369,6 +3595,34 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\Aboxed}
+% \changes{v1.08}{2010/06/29}{Added \cs{Aboxed}}
+% The idea from \cs{MoveEqLeft} can be used for other things. Here we
+% create a macro that will allow a user to box a single line in an
+% alignment.
+% \begin{macrocode}
+\newcommand\Aboxed[1]{\@Aboxed#1\ENDDNE}
+% \end{macrocode}
+% Idea: get the left and right part
+% typeset them in a \cs{boxed} AFTER an \& and pull it backwards
+% but in order to get the horizontal placement to work. As with
+% \cs{MoveEqLeft} we need to set some appropriate space to the left
+% of the \&
+% \begin{macrocode}
+\def\@Aboxed#1&#2\ENDDNE{%
+ \settowidth\@tempdima{$\displaystyle#1{}$}%
+ \addtolength\@tempdima{\fboxsep}%
+ \addtolength\@tempdima{\fboxrule}%
+ \global\@tempdima=\@tempdima
+ \kern\@tempdima
+ &
+ \kern-\@tempdima
+ \boxed{#1#2}
+}
+% \end{macrocode}
+%
+% \end{macro}
+%
% \begin{macro}{\ArrowBetweenLines}
% \changes{v1.05}{2008/06/05}{Added \cs{ArrowBetweenLines} as it
% belongs here and not just in my \LaTeX book (daleif)}
@@ -3384,7 +3638,19 @@ and the derived files
{\ArrowBetweenLines@auxII{#1}[\Updownarrow]}}
\def\ArrowBetweenLines@auxII#1[#2]{%
\ifnum0=`{\fi \iffalse}\fi
- \crcr
+% \end{macrocode}
+% It turns out that for some reason the \cs{crcr} (next) removes the
+% automatic equation number replacement. The replacement hack seems to
+% the trick, though I have no idea why \cs{crcr} broke things (/daleif).
+% \changes{v1.08}{2010/06/15}{fixed eq num replacement bug}
+% \begin{macrocode}
+% \crcr
+ \expandafter\in@\expandafter{\@currenvir}%
+ {alignedat,aligned,gathered}%
+ \ifin@ \else
+ \notag
+ \fi%
+ \\
\noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}%
\noalign{\expandafter\in@\expandafter{\@currenvir}%
{alignedat,aligned,gathered}%
@@ -3396,7 +3662,111 @@ and the derived files
% \end{macrocode}
% \end{macro}
%
+% \section{A few extra symbols}
+%
+% Most math font sets are missing three symbols: \cs{nuparrow},
+% \cs{ndownarrow} and \cs{bigtimes}. We provide \emph{simulated}
+% versions of these symbols in case they are missing.
+%
+% \subsection{Negated up- and down arrows}
+%
+% Note that the \cs{nuparrow} and the \cs{ndownarrow} are made from
+% \cs{nrightarrow} and \cs{nleftarrow}, so these have to be
+% present. If they are not, we throw an error at use. The
+% implementation details are due to Enrico Gregorio
+% (\url{http://groups.google.com/group/comp.text.tex/msg/689cc8bd604fdb51}),
+% the basic idea is to reflect and rotate existing negated
+% arrows. Note that the reflection and rotation will not show up i
+% most DVI previewers.
+% \begin{macro}{\MH_nrotarrow:NN}
+% \changes{v1.07}{2008/08/11}{Added support for \cs{nuparrow} and \cs{ndownaddow}}
+% First a common construction macro.
+% \begin{macrocode}
+\def\MH_nrotarrow:NN #1#2{%
+ \setbox0=\hbox{$\m@th#1\uparrow$}\dimen0=\dp0
+ \setbox0=\hbox{%
+ \reflectbox{\rotatebox[origin=c]{90}{$\m@th#1\mkern2.22mu #2$}}}%
+ \dp0=\dimen0 \box0 \mkern2.3965mu
+}
+% \end{macrocode}
+% \end{macro}
+% The negated arrows are then made using this macro on respectively
+% \cs{nrightarrow} and \cs{nleftarrow}
+% \begin{macro}{\MH_nuparrow:}
+% \begin{macro}{\MH_ndownarrow:}
+% \begin{macrocode}
+\def\MH_nuparrow: {%
+ \mathrel{\mathpalette\MH_nrotarrow:NN\nrightarrow} }
+\def\MH_ndownarrow: {%
+ \mathrel{\mathpalette\MH_nrotarrow:NN\nleftarrow} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\nuparrow}
+% \begin{macro}{\ndownarrow}
+% Next we provide \cs{nuparrow} and \cs{ndownarrow} at begin
+% document. Since they depend on \cs{nrightarrow} and
+% \cs{nleftarrow} we test for these and let the macros throw an
+% error if they are missing.
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{nrightarrow}{%
+ \providecommand\nuparrow{%
+ \PackageError{mathtools}{\string\nuparrow\space~ is~
+ constructed~ from~ \string\nrightarrow,~ which~ is~ not~
+ provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
+ }}{ \providecommand\nuparrow{\MH_nuparrow:}}
+ \@ifundefined{nleftarrow}{%
+ \providecommand\ndownarrow{%
+ \PackageError{mathtools}{\string\ndownarrow\space~ is~
+ constructed~ from~ \string\nleftarrow,~ which~ is~ not~
+ provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
+ }}{ \providecommand\ndownarrow{\MH_ndownarrow:}} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+% \subsection{Providing bigtimes}
+%
+% The idea is to use the original \cs{times} and then scale it
+% accordingly. Again the implementation details have been improved by
+% Enrico Gregorio
+% (\url{http://groups.google.com/group/comp.text.tex/msg/9685c9405df2ff94}).
%
+% \begin{macro}{\MH_bigtimes_scaler:N}
+% \begin{macro}{\MH_bigtimes_inner:}
+% \begin{macro}{\MH_csym_bigtimes:}
+% \changes{v1.07}{2008/08/11}{Added support for \cs{bigtimes}}
+% \begin{macrocode}
+\def\MH_bigtimes_scaler:N #1{%
+ \vcenter{\hbox{#1$\m@th\mkern-2mu\times\mkern-2mu$}}}
+% \end{macrocode}
+% This is then combined with \cs{mathchoice} to form the inner parts
+% of the macro
+% \begin{macrocode}
+\def\MH_bigtimes_inner: {
+ \mathchoice{\MH_bigtimes_scaler:N \huge} % display style
+ {\MH_bigtimes_scaler:N \LARGE} % text style
+ {\MH_bigtimes_scaler:N {}} % script style
+ {\MH_bigtimes_scaler:N \footnotesize} % script script style
+}
+% \end{macrocode}
+% And thus the internal prepresentaion of the \cs{bigtimes} macro.
+% \begin{macrocode}
+\def\MH_csym_bigtimes: {\mathop{\MH_bigtimes_inner:}\displaylimits}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \begin{macro}{\bigtimes}
+% In the end we provide \cs{bigtimes} if otherwise not defined.
+% \begin{macrocode}
+\AtBeginDocument{
+ \providecommand\bigtimes{\MH_csym_bigtimes:}
+}
+% \end{macrocode}
+% \end{macro}
%
% \section{Macros by other people}
%
diff --git a/Master/texmf-dist/source/latex/mh/xfrac.dtx b/Master/texmf-dist/source/latex/mh/xfrac.dtx
index f70ba65582c..0a4b2e3ad59 100644
--- a/Master/texmf-dist/source/latex/mh/xfrac.dtx
+++ b/Master/texmf-dist/source/latex/mh/xfrac.dtx
@@ -1,12 +1,14 @@
% \iffalse meta-comment
%
-% Copyright (C) 2004, 2008-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2004, 2008, 2009 by Morten Hoegholm <mh.ctan@gmail.com>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
-% version 1.3c of this license or (at your option) any later
+% version 1.3 of this license or (at your option) any later
% version. The latest version of this license is in
% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
@@ -64,7 +66,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: xfrac 2009/08/10 v0.3 textstyle fractions (MH)}
+\Msg{* Package: xfrac 2009/08/10 v0.2a textstyle fractions (MH)}
\Msg{************************************************************************}
\keepsilent
@@ -74,13 +76,15 @@
This is a generated file.
-Copyright (C) 2004, 2008-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2004, 2008, 2009 by Morten Hoegholm <mh.ctan@gmail.com>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
-version 1.3c of this license or (at your option) any later
+version 1.3 of this license or (at your option) any later
version. The latest version of this license is in
http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
@@ -122,7 +126,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{xfrac.drv}%
- [2010/02/02 v0.3 Text style fractions]
+ [2009/08/10 v0.2a textstyle fractions (MH)]
\RequirePackage{fix-cm}
\documentclass{ltxdoc}
@@ -170,7 +174,7 @@ and the derived files
\providecommand*\pkg[1]{\textsf{#1}}
\newcommand*\switch[2]{{\fontfamily{#1}\selectfont #2}}
-\usepackage{lmodern}
+
\begin{document}
\catcode`\_=12
\DocInput{xfrac.dtx}
@@ -180,10 +184,6 @@ and the derived files
%
% \GetFileInfo{xfrac.drv}
% \CheckSum{249}
-%
-% \changes{v0.3}{2010/02/02}{Update to new \pkg{xtemplate} system}
-% \changes{v0.3}{2010/02/02}{Include custom values for
-% \pkg{lmodern}}
%
% \changes{v0.2a}{2009/08/10}{Update for new version of expl3}
%
@@ -491,36 +491,36 @@ and the derived files
%
% \begin{TemplateDescription}{xfrac}{text}
%
-% \TemplateKey{numerator-font}{tokenlist}
+% \TemplateKey{numerator-font}{n}
% {Font family specification to use for the numerator.}
% {\cs{f@family}}
%
-% \TemplateKey{numerator-format}{function 1 arg}
+% \TemplateKey{numerator-format}{f1}
% {Action to be taken on the numerator.}
% {Process argument unchanged}
%
-% \TemplateKey{slash-symbol}{tokenlist}
+% \TemplateKey{slash-symbol}{n}
% {The separator symbol. If not specified the default value will be
% used instead.}
% {Solidus (\cs{textfractionsolidus})}
%
-% \TemplateKey{slash-symbol-font}{tokenlist}
+% \TemplateKey{slash-symbol-font}{n}
% {Font family specification to use for the separator symbol.}
% {\cs{f@family}}
%
-% \TemplateKey{slash-symbol-format}{function 1 arg}
+% \TemplateKey{slash-symbol-format}{f1}
% {Action to be taken on the separator symbol.}
% {Process argument unchanged}
%
-% \TemplateKey{denominator-font}{tokenlist}
+% \TemplateKey{denominator-font}{n}
% {Font family specification to use for the denominator.}
% {\cs{f@family}}
%
-% \TemplateKey{denominator-format}{function 1 arg}
+% \TemplateKey{denominator-format}{f1}
% {Action to be taken on the denominator.}
% {Process argument unchanged}
%
-% \TemplateKey{h-scale}{tokenlist}
+% \TemplateKey{h-scale}{n}
% {Factor by which the numerator and denominator should be
% horizontally scaled. It should only be used if the real superior
% and inferior fonts are not available. For instance Stempel
@@ -528,12 +528,12 @@ and the derived files
% by a factor of 1.1.}
% {1}
%
-% \TemplateKey{v-scale}{tokenlist}
+% \TemplateKey{v-scale}{n}
% {Same as \key{h-scale} only vertically. Probably not of much use
% but added for completetion.}
% {1}
%
-% \TemplateKey{scale-factor}{tokenlist}
+% \TemplateKey{scale-factor}{n}
% {Fraction of the size of \key{slash-symbol}. Used for setting the
% font size of numerator and denominator. Usually a value of app.\
% \sfrac{5}{6} produces fine results. It should only be used if the
@@ -541,50 +541,54 @@ and the derived files
% Stempel Garamond looks better if the factor is 0.9.}
% {0.83333}
%
-% \TemplateKey{scale-relative}{choice}
+% \TemplateKey{scale-relative}{s}
% {If set to `true' the font size of the numerator and denominator
% is scaled with respect to the height of the \key{slash-symbol}. If
% set to `false' the font is scaled with respect to the total height
% of the \key{slash-symbol}.}
% {true}
%
-% \TemplateKey{scaling}{choice}
+% \TemplateKey{scaling}{s}
% {If set to `true' the fonts are allowed to scale. If set to
% `false' they are not. See the `Janson' example for an application.}
% {true}
%
-% \TemplateKey{numerator-top-sep}{length}
+% \TemplateKey{numerator-top-sep}{L}
% {Dimension specifying the space between the top of the
% \key{slash-symbol} and the top of the numerator. If not specified,
% the depth of the solidus will be used, because this value will
% make the fraction look even.}
% {Unspecified}
%
-% \TemplateKey{numerator-bot-sep}{length}
+% \TemplateKey{numerator-bot-sep}{L}
% {Dimension specifying the lift of the numerator from the
% baseline.}
% {Unspecified}
%
-% \TemplateKey{denominator-bot-sep}{length}
+% \TemplateKey{denominator-bot-sep}{L}
% {Dimension specifying the lift of the denominator from the
% baseline.}
% {Unspecified}
%
-% \TemplateKey{slash-right-kern}{length}
+% \TemplateKey{slash-right-kern}{L}
% {Dimension specifying the kerning between the \key{slash-symbol}
-% and the numerator.}
+% and the numerator. If specified in terms of font specific
+% dimensions such as \texttt{em} it is better to use
+% \cs{DelayEvaluation}.}
% {\texttt{0pt}}
%
-% \TemplateKey{slash-left-kern}{length}
+% \TemplateKey{slash-left-kern}{L}
% {Dimension specifying the kerning between the \key{slash-symbol}
-% and the denominator.}
+% and the denominator. If specified in terms of font specific
+% dimensions such as \texttt{em} it is better to use
+% \cs{DelayEvaluation}.}
% {\texttt{0pt}}
%
-% \TemplateKey{math-mode}{choice}
+% \TemplateKey{math-mode}{s}
% {Are we in math mode or not?}
% {false}
%
-% \TemplateKey{phantom}{tokenlist}
+% \TemplateKey{phantom}{n}
% {A character that suits the common cases. As we would mostly want
% to use numbers in text mode we choose a `tall' number, while in
% math it is somewhat different.}
@@ -601,24 +605,24 @@ and the derived files
%
% \begin{TemplateDescription}{xfrac}{math}
%
-% \TemplateKey{numerator-font}{tokenlist}
+% \TemplateKey{numerator-font}{n}
% {Font family specification to use for the numerator.}
% {\cs{number}\cs{fam}}
%
-% \TemplateKey{slash-symbol}{tokenlist}
+% \TemplateKey{slash-symbol}{n}
% {The separator symbol. If not specified the default value will be
% used instead.}
% {Virgule ($/$)}
%
-% \TemplateKey{slash-symbol-font}{tokenlist}
+% \TemplateKey{slash-symbol-font}{n}
% {Font family specification to use for the separator symbol.}
% {\cs{number}\cs{fam}}
%
-% \TemplateKey{denominator-font}{tokenlist}
+% \TemplateKey{denominator-font}{n}
% {Font family specification to use for the denominator.}
% {\cs{number}\cs{fam}}
%
-% \TemplateKey{scale-factor}{tokenlist}
+% \TemplateKey{scale-factor}{n}
% {Fraction of the size of \key{slash-symbol}. In math mode we
% cannot rely on the fonts to be able to scale, but giving a default
% scale of 0.7 fits into the regular size changing scheme---the
@@ -627,47 +631,47 @@ and the derived files
% That's close enough.}
% {0.7}
%
-% \TemplateKey{scale-relative}{choice}
+% \TemplateKey{scale-relative}{s}
% {If set to `true' the font size of the numerator and denominator
% is scaled with respect to the height of the \key{slash-symbol}. If
% set to `false' the font is scaled with respect to the total height
% of the \key{slash-symbol}.}
% {false}
%
-% \TemplateKey{scaling}{choice}
+% \TemplateKey{scaling}{s}
% {If set to `true' the fonts are allowed to scale. If set to
% `false' they are not. See the `plainmath' example for an application.}
% {true}
%
-% \TemplateKey{numerator-top-sep}{length}
+% \TemplateKey{numerator-top-sep}{L}
% {Dimension specifying the space between the top of the
% \key{slash-symbol} and the top of the numerator. If not specified,
% the depth of the virgule will be used, because this value will
% make the fraction look even.}
% {\texttt{0pt}}
%
-% \TemplateKey{denominator-bot-sep}{length}
+% \TemplateKey{denominator-bot-sep}{L}
% {Dimension specifying the lift of the denominator from the
% baseline.}
% {\texttt{0pt}}
%
-% \TemplateKey{slash-right-mkern}{tokenlist}
+% \TemplateKey{slash-right-mkern}{n}
% {Same as \key{slash-right-kern} but for math mode only and should
% be specified in \texttt{mu} units. This is because \pkg{calc}
% can't use mu-expressions.}
% {\texttt{-2mu}}
%
-% \TemplateKey{slash-left-mkern}{tokenlist}
+% \TemplateKey{slash-left-mkern}{n}
% {Same as \key{slash-left-kern} but for math mode only and should
% be specified in \texttt{mu} units. This is because \pkg{calc}
% can't use mu-expressions.}
% {\texttt{-1mu}}
%
-% \TemplateKey{math-mode}{choice}
+% \TemplateKey{math-mode}{s}
% {Are we in math mode or not?}
% {true}
%
-% \TemplateKey{phantom}{tokenlist}
+% \TemplateKey{phantom}{n}
% {A character that suits the common cases. In math we have a high
% risk of using a parenthesis, so we choose that. Text mode is
% another story.}
@@ -681,588 +685,354 @@ and the derived files
% and \key{slash-right-kern} have no meaning in this template.
%
% \end{TemplateDescription}
-%
+%
+%
+%
% \StopEventually{}
%
-%\section{Implementation}
+% \section{Implementation}
%
-% \begin{macrocode}
-%<*package>
-% \end{macrocode}
-%
-% The usual lead-off: provides an experimental package!
+% \changes{v0.10b}{2004/04/07}{Now uses \cs{InternalSyntaxOn}}
+% \changes{v0.2}{2008/08/04}{Now uses \cs{ProvidesExplPackage}}
+% We set up the programming interface. We need the
+% \pkg{template} and \pkg{xparse} packages from the
+% experimental code, more precisely from the `xbase' bundle. The
+% other packages are well-known.
% \begin{macrocode}
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{xfrac}{2010/02/02}{0.3}{Text fractions}
+\ProvidesExplPackage{xfrac}{2009/08/10}{0.2a}{Text fractions}
% \end{macrocode}
%
-% Some support is needed: a bit wider than the normal \pkg{xpackage}
-% stuff, but not by much.
% \begin{macrocode}
-\RequirePackage { amstext , graphicx , l3keys2e , textcomp , xtemplate }
-% \end{macrocode}
+\RequirePackage{textcomp,graphicx,amstext}
+\RequirePackage{template}[2008/08/03]
+\RequirePackage{xparse}[2008/08/03]
+% \end{macrocode}
+% With v0.10b the new internal syntax using |_| and |:| was
+% introduced. Starting from v0.2 the expl3 code base is used and,
+% hence, also its programming setup. White space is ignored as well,
+% so any |@|-signs in the code are remnants of old \LaTeX{} coding
+% conventions.
%
-%\begin{macro}{\l_xfrac_cm_std_bool}
-% There is one option to support.
+% An option:
% \begin{macrocode}
-\keys_define:nn { xfrac } {
- cm-recommended .choice:,
- cm-recommended /
- false .code:n =
- { \bool_set_true:N \l_xfrac_cm_std_bool },
- cm-recommended /
- true .code:n =
- { \bool_set_false:N \l_xfrac_cm_std_bool },
- cm-recommended .default:n = { true },
- cm-standard .bool_set:N = \l_xfrac_cm_std_bool
-}
-\ProcessKeysOptions { xfrac }
+\bool_new:N \g_cm_recommended_bool
+\DeclareOption{cm-recommended}
+ { \bool_gset_true:N \g_cm_recommended_bool }
+\DeclareOption{cm-standard}
+ { \bool_gset_false:N \g_cm_recommended_bool }
+\ExecuteOptions{cm-recommended}
+\ProcessOptions\relax
% \end{macrocode}
-%\end{macro}
%
-%\begin{macro}{\l_xfrac_slash_box}
-%\begin{macro}{\l_xfrac_tmp_box}
-% In keeping with the \LaTeX3 philosophy, rather than use generic
-% scratch boxes and get confused, \pkg{xfrac} reserves its own named
-% working space.
+% \begin{macro}{\l_xfrac_temp_box}
+% \begin{macro}{\l_xfrac_slash_box}
+% We use two box registers. We could probably get away with using
+% scratch boxes, but this feels safer. Anyway we're all using
+% \eTeX{} now so why not?
% \begin{macrocode}
+\box_new:N \l_xfrac_temp_box
\box_new:N \l_xfrac_slash_box
-\box_new:N \l_xfrac_tmp_box
% \end{macrocode}
-%\end{macro}
-%\end{macro}
+% \end{macro}
+% \end{macro}
%
-%\begin{macro}{\xfrac_tmp:w}
-% Used for the raised boxes: weird as it does not take an argument
-% but the \cs{raisebox} does.
+% \subsection{The Templates}
+% Then we declare the template.
% \begin{macrocode}
-\cs_new:Npn \xfrac_tmp:w { }
+\DeclareTemplateType{xfrac}{3}
% \end{macrocode}
-%\end{macro}
-%
-%\subsection{Initialisation of variables}
-%
-% Variables used in templates have to be set up: there is not
-% much to say about these, other than that they must exist.
-%
-%\begin{macro}{\l_xfrac_denominator_bot_sep_dim}
-%\begin{macro}{\l_xfrac_numerator_bot_sep_dim}
-%\begin{macro}{\l_xfrac_numerator_top_sep_dim}
-%\begin{macro}{\l_xfrac_slash_left_sep_dim}
-%\begin{macro}{\l_xfrac_slash_right_sep_dim}
-% Fixed lengths.
+% The template type `text'. Make two separate templates: text and
+% math!! It is okay they share keys but it just gets too complicated
+% within the template declaration.
% \begin{macrocode}
-\dim_new:N \l_xfrac_denominator_bot_sep_dim
-\dim_new:N \l_xfrac_numerator_bot_sep_dim
-\dim_new:N \l_xfrac_numerator_top_sep_dim
-\dim_new:N \l_xfrac_slash_left_sep_dim
-\dim_new:N \l_xfrac_slash_right_sep_dim
+\DeclareTemplate{xfrac}{text}{3}{
+ numerator-font = n [\f@family] \xfrac_numeratorfont:,
+ numerator-format = f1 [#1] \xfrac_numeratorformat:n,
+ slash-symbol = n [\textfractionsolidus]
+ \xfrac_slashsymbol:,
+ slash-symbol-font = n [\f@family] \xfrac_slashsymbolfont:,
+ slash-symbol-format = f1 [#1] \xfrac_slashsymbolformat:n,
+ denominator-font = n [\f@family] \xfrac_denominatorfont:,
+ denominator-format = f1 [#1] \xfrac_denominatorformat:n,
+ h-scale = n [1] \xfrac_hscale:,
+ v-scale = n [1] \xfrac_vscale:,
+ scale-factor = n [.83333] \xfrac_scalefactor:,
+ scale-relative = s [true]
+ { \cs_set:Npn \xfrac_relscale: {\box_ht:N\l_xfrac_slash_box}}
+ { \cs_set:Npn \xfrac_relscale: {
+ \dim_eval:n { \box_ht:N\l_xfrac_temp_box + \box_dp:N\l_xfrac_temp_box }} },
+ scaling = s [true]
+ {\cs_set:Npn\xfrac_fontscale: {
+ \fontsize{\xfrac_scalefactor: \xfrac_relscale:}{\c_zero_dim}\selectfont}}
+ { \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing: },
% \end{macrocode}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%
-%\begin{macro}{\l_xfrac_denominator_font_tl}
-%\begin{macro}{\l_xfrac_hscale_tl}
-%\begin{macro}{\l_xfrac_numerator_font_tl}
-%\begin{macro}{\l_xfrac_phantom_tl }
-%\begin{macro}{\l_xfrac_scale_factor_tl}
-%\begin{macro}{\l_xfrac_slash_left_msep_tl}
-%\begin{macro}{\l_xfrac_slash_right_msep_tl}
-%\begin{macro}{\l_xfrac_slash_symbol_tl}
-%\begin{macro}{\l_xfrac_slash_symbol_font_tl}
-%\begin{macro}{\l_xfrac_vscale_tl}
-% Token lists, which include floating-point numbers and math(s)
-% skips.
+% Here comes some fake lengths. I've decided to call them with the
+% suffix |_fdim|, so that I will remember to use them right.
% \begin{macrocode}
-\tl_new:N \l_xfrac_denominator_font_tl
-\tl_new:N \l_xfrac_hscale_tl
-\tl_new:N \l_xfrac_numerator_font_tl
-\tl_new:N \l_xfrac_phantom_tl
-\tl_new:N \l_xfrac_scale_factor_tl
-\tl_new:N \l_xfrac_slash_left_msep_tl
-\tl_new:N \l_xfrac_slash_right_msep_tl
-\tl_new:N \l_xfrac_slash_symbol_tl
-\tl_new:N \l_xfrac_slash_symbol_font_tl
-\tl_new:N \l_xfrac_vscale_tl
+ numerator-top-sep = L [\c_max_dim] \l_xfrac_numeratortopsep_fdim,
+ numerator-bot-sep = L [\c_max_dim] \l_xfrac_numeratorbotsep_fdim,
+ denominator-bot-sep = L [\c_max_dim] \l_xfrac_denominatorbotsep_fdim,
+ slash-right-kern = L [0pt] \l_xfrac_slashrightsep_fdim,
+ slash-left-kern = L [0pt] \l_xfrac_slashleftsep_fdim,
% \end{macrocode}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%
-%\begin{macro}{\xfrac_fontscale:}
-%\begin{macro}{\xfrac_math:n}
-%\begin{macro}{\xfrac_denominator_font_change:}
-%\begin{macro}{\xfrac_denominator_format:n}
-%\begin{macro}{\xfrac_numerator_font_change:}
-%\begin{macro}{\xfrac_numerator_format:n}
-%\begin{macro}{\xfrac_relscale:}
-%\begin{macro}{\xfrac_slash_symbol_font_change:}
-%\begin{macro}{\xfrac_slash_symbol_format:n}
-%\begin{macro}{\xfrac_text_or_math:n}
-% Functions, either things which are calculated `on the fly'
-% (no argument required) or are functions taking one argument in the
-% code.
+% As calc can't handle |\muskip|s, I've made them of type `n' and
+% added the suffix |_fmu| to indicate `fake mu skip'.
% \begin{macrocode}
-\cs_new_nopar:Npn \xfrac_fontscale:
-\cs_new:Npn \xfrac_math:n #1 { }
-\cs_new_nopar:Npn \xfrac_denominator_font_change: { }
-\cs_new:Npn \xfrac_denominator_format:n #1 { }
-\cs_new_nopar:Npn \xfrac_numerator_font_change: { }
-\cs_new:Npn \xfrac_numerator_format:n #1 { }
-\cs_new_nopar:Npn \xfrac_relscale: { }
-\cs_new_nopar:Npn \xfrac_slash_symbol_font_change: { }
-\cs_new:Npn \xfrac_slash_symbol_format:n #1 { }
-\cs_new:Npn \xfrac_text_or_math:n #1 { }
+ slash-right-mkern = n [-2mu] \l_xfrac_slashrightmsep_fmu,
+ slash-left-mkern = n [-1mu] \l_xfrac_slashleftmsep_fmu,
+ math-mode = s [false] { \cs_set_eq:NN \xfrac_math: \ensuremath }
+ { \cs_set_eq:NN \xfrac_math: \use:n },
+ phantom = n [8] \xfrac_phantom:,
+}{
+ \DoParameterAssignments
+ \mode_if_math:TF{
+ \cs_set_eq:NN \xfrac_textormath: \text
+ \cs_set:Npx \xfrac_slashfontchange: {\tex_fam:D \xfrac_slashsymbolfont: }
+ \cs_set:Npx \xfrac_numeratorfontchange: {\tex_fam:D \xfrac_numeratorfont: }
+ \cs_set:Npx \xfrac_denominatorfontchange: {\tex_fam:D \xfrac_denominatorfont: }
+ }{
+ \cs_set_eq:NN \xfrac_textormath: \mbox
+ \cs_set:Npn\xfrac_slashfontchange: {
+ \fontfamily{\xfrac_slashsymbolfont: }\selectfont}
+ \cs_set:Npn\xfrac_numeratorfontchange: {
+ \fontfamily{\xfrac_numeratorfont: }\selectfont}
+ \cs_set:Npn\xfrac_denominatorfontchange: {
+ \fontfamily{\xfrac_denominatorfont: }\selectfont}
+ }
+ \xfrac_textormath: {
% \end{macrocode}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%\end{macro}
-%
-%\subsection{The template}
-%
-% There is only one object type in \pkg{xfrac}, rather unimaginatively
-% named \texttt{xfrac}.
+% \changes{v0.11a}{2004/08/24}{Added \cs{m@th}}
% \begin{macrocode}
-\DeclareObjectType { xfrac } { 3 }
+ \m@th
+ \sbox\l_xfrac_temp_box {\xfrac_math: {\vphantom{(}}}
+ \sbox\l_xfrac_slash_box {
+ \xfrac_math: {
+ \xfrac_slashsymbolformat:n {
+ \xfrac_math: {
+ \xfrac_slashfontchange:
+ \IfValueTF{#2}{#2}{\xfrac_slashsymbol: }
+ }
+ }
+ }
+ }
+ \dim_compare:nNnTF \l_xfrac_numeratortopsep_fdim = \c_max_dim
+ {
+ \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim
+ {
% \end{macrocode}
-%
-% A single template interface is used for both text and math(s), which
-% does make a few things a little complex later.
+% Both unspecified.
% \begin{macrocode}
-\DeclareTemplateInterface { xfrac } { text } { 3 } {
- denominator-bot-sep : length = \c_max_dim ,
- denominator-font : tokenlist = \f@family ,
- denominator-format : function 1 = #1 ,
- h-scale : tokenlist = 1 ,
- math-mode : choice { false , true }
- = false ,
- numerator-font : tokenlist = \f@family ,
- numerator-format : function 1 = #1 ,
- numerator-bot-sep : length = \c_max_dim ,
- numerator-top-sep : length = \c_max_dim ,
- phantom : tokenlist = 8 ,
- scale-factor : tokenlist = 0.83333 ,
- scale-relative : choice { false , true }
- = true ,
- scaling : choice { false , true }
- = true ,
- slash-left-kern : length = 0 pt ,
- slash-left-mkern : tokenlist = -2 mu ,
- slash-right-kern : length = 0 pt ,
- slash-right-mkern : tokenlist = -1 mu ,
- slash-symbol : tokenlist = \textfractionsolidus ,
- slash-symbol-font : tokenlist = \f@family ,
- slash-symbol-format : function 1 = #1 ,
- v-scale : tokenlist = 1 ,
-}
+ \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box
+ -\box_dp:N\l_xfrac_slash_box-\height}}
+ }{
% \end{macrocode}
-%
-% Most of the variable binding is quite simple: of course, the choices
-% are a little more complicated. That is particularly true where
-% these have to set up `on the fly' functions.
+% Use only bottom specification.
% \begin{macrocode}
-\DeclareTemplateCode { xfrac } { text } { 3 }
- {
- denominator-bot-sep = \l_xfrac_denominator_bot_sep_dim ,
- denominator-font = \l_xfrac_denominator_font_tl ,
- denominator-format = \xfrac_denominator_format:n ,
- h-scale = \l_xfrac_hscale_tl ,
- math-mode =
- {
- false = \cs_set_eq:NN \xfrac_math:n \use:n,
- true = \cs_set_eq:NN \xfrac_math:n \ensuremath
- },
- numerator-font = \l_xfrac_numerator_font_tl ,
- numerator-format = \xfrac_numerator_format:n ,
- numerator-bot-sep = \l_xfrac_numerator_bot_sep_dim ,
- numerator-top-sep = \l_xfrac_numerator_top_sep_dim ,
- phantom = \l_xfrac_phantom_tl ,
- scale-factor = \l_xfrac_scale_factor_tl ,
- scale-relative =
- {
- false =
- \cs_set_nopar:Npn \xfrac_relscale:
- {
- \dim_eval:n
- {
- \box_ht:N \l_xfrac_tmp_box
- + \box_dp:N \l_xfrac_tmp_box
- }
- },
- true =
- \cs_set_nopar:Npn \xfrac_relscale:
- { \box_ht:N \l_xfrac_slash_box }
- },
- scaling =
- {
- false = \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing:,
- true =
- \cs_set_nopar:Npn \xfrac_fontscale:
- {
- \fontsize { \l_xfrac_scale_factor_tl \xfrac_relscale: }
- { \c_zero_dim }
- \selectfont
- }
- },
- slash-left-kern = \l_xfrac_slash_left_sep_dim ,
- slash-left-mkern = \l_xfrac_slash_left_msep_tl ,
- slash-right-kern = \l_xfrac_slash_right_sep_dim ,
- slash-right-mkern = \l_xfrac_slash_right_msep_tl ,
- slash-symbol = \l_xfrac_slash_symbol_tl ,
- slash-symbol-font = \l_xfrac_slash_symbol_font_tl ,
- slash-symbol-format = \xfrac_slash_symbol_format:n ,
- v-scale = \l_xfrac_vscale_tl
- }
+ \cs_set:Npn\xfrac_next: {\raisebox{\l_xfrac_numeratorbotsep_fdim }}
+ }
+ }
+ {
% \end{macrocode}
-% The implementation part starts with applying all of the settings
-% from above. The first part of the set up is then to determine
-% whether the surroundings are text or math(s), and react accordingly.
+% Use only top specification.
% \begin{macrocode}
- {
- \AssignTemplateKeys
- \mode_if_math:TF
+ \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim
{
- \cs_set_eq:NN \xfrac_text_or_math:n \text
- \cs_set_nopar:Npx \xfrac_denominator_font_change:
- { \tex_fam:D \l_xfrac_denominator_font_tl }
- \cs_set_nopar:Npx \xfrac_numerator_font_change:
- { \tex_fam:D \l_xfrac_numerator_font_tl }
- \cs_set_nopar:Npx \xfrac_slash_symbol_font_change:
- { \tex_fam:D \l_xfrac_slash_symbol_font_tl }
- }
- {
- \cs_set_eq:NN \xfrac_text_or_math:n \mbox
- \cs_set_nopar:Npn \xfrac_denominator_font_change:
- {
- \fontfamily { \l_xfrac_denominator_font_tl }
- \selectfont
- }
- \cs_set_nopar:Npn \xfrac_numerator_font_change:
- {
- \fontfamily { \l_xfrac_numerator_font_tl }
- \selectfont
- }
- \cs_set_nopar:Npn \xfrac_slash_symbol_font_change:
- {
- \fontfamily { \l_xfrac_slash_symbol_font_tl }
- \selectfont
+ \cs_set:Npn\xfrac_next: {
+ \raisebox{
+ \box_ht:N\l_xfrac_slash_box - \l_xfrac_numeratortopsep_fdim
+ - \height
}
+ }
}
-% \end{macrocode}
-%\changes{v0.11a}{2004/08/24}{Added \cs{m@th}}
-% Everything is now either inside \cs{text} or an \cs{mbox}, depending
-% upon the surroundings. First, there are some boxes to set up.
-% \begin{macrocode}
- \xfrac_text_or_math:n
{
- \m@th
- \hbox_set:Nn \l_xfrac_tmp_box
- { \xfrac_math:n { \vphantom { ( ) } } }
- \hbox_set:Nn \l_xfrac_slash_box
- {
- \xfrac_math:n
- {
- \xfrac_slash_symbol_format:n
- {
- \xfrac_math:n
- {
- \xfrac_slash_symbol_font_change:
- \IfNoValueTF {#2}
- { \l_xfrac_slash_symbol_tl } {#2}
- }
- }
- }
- }
% \end{macrocode}
-% Check on the numerator separator dimensions. The code starts with the
-% assumption that neither has been given, as this can then be used to
-% set up a default, which is also used when both values are set
-% erroneously.
+% Over-specification.
% \begin{macrocode}
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- {
- \box_ht:N \l_xfrac_slash_box
- - \box_dp:N \l_xfrac_slash_box
- - \height
- }
- }
- \dim_compare:nNnTF
- { \l_xfrac_numerator_top_sep_dim } = { \c_max_dim }
- {
- \dim_compare:nNnF
- { \l_xfrac_numerator_bot_sep_dim } = { \c_max_dim }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- { \dim_use:N \l_xfrac_numerator_bot_sep_dim }
- }
- }
- }
- {
- \dim_compare:nNnTF
- { \l_xfrac_numerator_bot_sep_dim } = { \c_max_dim }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- {
- \box_ht:N \l_xfrac_slash_box
- - \dim_use:N \l_xfrac_numerator_top_sep_dim
- - \height
- }
- }
- }
- {
- \msg_error:nn { xfrac }
- { over-specified-numerator-sep }
- }
- }
+ \PackageError{xfrac}
+ {You~ have~ specified~ both~ numerator-top-sep~ and~
+ numerator-bot-sep}
+ {I~ will~ pretend~ you~ didn't~ specify~ any~ of ~them}
+ \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box
+ -\box_dp:N\l_xfrac_slash_box-\height}}
+ }
+ }
% \end{macrocode}
-% Typeset the numerator.
+% Typeset the numerator
% \begin{macrocode}
- \xfrac_tmp:w
- {
- \xfrac_fontscale:
- \xfrac_numerator_format:n
- {
- \scalebox { \l_xfrac_hscale_tl } [ \l_xfrac_vscale_tl ]
- {
- \xfrac_math:n
- {
- \xfrac_numerator_font_change:
- {
- \vphantom { \l_xfrac_phantom_tl }
- #1
- }
- }
- }
- }
- }
- \xfrac_math:n
- { % THIS IS JUST WRONG!
- \mode_if_math:TF
- { \tex_mskip:D \l_xfrac_slash_right_msep_tl }
- { \tex_hskip:D \l_xfrac_slash_right_sep_dim }
- }
+ \xfrac_next: {
+ \xfrac_fontscale:
+ \xfrac_numeratorformat:n {
+ \scalebox{\xfrac_hscale: }[\xfrac_vscale: ]
+ { \xfrac_math:{ \xfrac_numeratorfontchange:
+ {\vphantom{\xfrac_phantom: }#1} } }
+ }
+ }
+ \xfrac_math: { % THIS IS JUST WRONG!
+ \mode_if_math:TF { \mskip \l_xfrac_slashrightmsep_fmu }
+ {\hskip \l_xfrac_slashrightsep_fdim}
+ }
% \end{macrocode}
-% Typeset the separator.
+% Typeset the separator
% \begin{macrocode}
- \box_use:N \l_xfrac_slash_box
- \xfrac_math:n
- {
- \mode_if_math:TF
- { \tex_mskip:D \l_xfrac_slash_left_msep_tl }
- { \tex_hskip:D \l_xfrac_slash_left_sep_dim }
- }
+ \usebox\l_xfrac_slash_box
+ \xfrac_math: {
+ \mode_if_math:TF {
+ \mskip \l_xfrac_slashleftmsep_fmu
+ }{
+ \hskip \l_xfrac_slashleftsep_fdim
+ } }
% \end{macrocode}
-% Typeset the denominator.
+% Typeset the denominator
% \begin{macrocode}
- \dim_compare:nNnTF
- { \l_xfrac_denominator_bot_sep_dim } = { \c_max_dim }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- { \raisebox { - \box_dp:N \l_xfrac_slash_box } }
- }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- { \dim_use:N \l_xfrac_denominator_bot_sep_dim }
- }
- }
- \xfrac_tmp:w
- {
- \xfrac_fontscale:
- \xfrac_denominator_format:n
- {
- \scalebox { \l_xfrac_hscale_tl } [ \l_xfrac_vscale_tl ]
- {
- \xfrac_math:n
- {
- \xfrac_denominator_font_change:
- {
- \vphantom { \l_xfrac_phantom_tl }
- #3
- }
- }
- }
- }
- }
- }
+ \dim_compare:nNnTF \l_xfrac_denominatorbotsep_fdim=\c_max_dim
+ { \raisebox{-\box_dp:N \l_xfrac_slash_box} }
+ {
+ \raisebox{\l_xfrac_denominatorbotsep_fdim}
+ }
+ {
+ \xfrac_fontscale:
+ \xfrac_denominatorformat:n {
+ \scalebox{\xfrac_hscale:}[\xfrac_vscale:]
+ { \xfrac_math: { \xfrac_denominatorfontchange:
+ {\vphantom{\xfrac_phantom: }#3} } }
+ }
+ }
}
+}
% \end{macrocode}
-%
-% Since math(s) and text mode are wildly different entities we define a
-% separate template for each. You already saw the `text'
-% template, and here is the `math' template.
+%
+% Since math and text mode are wildly different entities we define a
+% separate template for each. You already saw the `text' template,
+% and here is the `math' template.
% \begin{macrocode}
-\DeclareRestrictedTemplate { xfrac } { text } { math } {
- numerator-font = \number \fam ,
- slash-symbol = / ,
- slash-symbol-font = \number \fam ,
- denominator-font = \number \fam ,
- scale-factor = 0.7 ,
- scale-relative = false ,
- scaling = true ,
- numerator-top-sep = 0 pt ,
- denominator-bot-sep = 0 pt ,
- math-mode = true ,
- phantom = (
+\DeclareRestrictedTemplate{xfrac}{math}{text}{
+ numerator-font = \number\fam,
+ slash-symbol = /,
+ slash-symbol-font = \number\fam,
+ denominator-font = \number\fam,
+ scale-factor = 0.7,
+ scale-relative = false,
+ scaling = true,
+ numerator-top-sep = 0pt,
+ denominator-bot-sep = 0pt,
+ math-mode = true,
+ phantom = (,
}
% \end{macrocode}
-%
-%\subsection{The standard instances}
%
-% For the default instances we just use the relevant templates with
-% the default settings.
-%
+% \subsection{The Default Instances}
+%
+% For the default instances we just use the relevant templates with
+% the default settings.
+%
% The default `text' instance.
% \begin{macrocode}
-\DeclareInstance { xfrac } { default } { text } { }
+\DeclareInstance{xfrac}{default}{text}{ }
% \end{macrocode}
-%
-% The default `math(s)' instance.
+% The default `math' instance.
% \begin{macrocode}
-\DeclareInstance { xfrac } { mathdefault } { math } { }
+\DeclareInstance{xfrac}{mathdefault}{math}{ }
% \end{macrocode}
% \begin{macrocode}
-\DeclareCollectionInstance { plainmath } { xfrac } { mathdefault }
- { math }{
- denominator-bot-sep = 0 pt ,
- numerator-bot-sep = 0 pt ,
- numerator-top-sep = \c_max_dim ,
- scale-factor = 1 ,
- scale-relative = false ,
- scaling = true ,
- slash-right-mkern = 0mu ,
- slash-left-mkern = 0mu
+\DeclareCollectionInstance{plainmath}{xfrac}{mathdefault}{math}{
+ denominator-bot-sep=0pt,
+ numerator-bot-sep=0pt,
+ numerator-top-sep=\c_max_dim,
+ scale-factor = 1,
+ scale-relative = false,
+ scaling = true,
+ slash-right-mkern=0mu,
+ slash-left-mkern=0mu,
}
% \end{macrocode}
-%
-% Default Computer Modern setup. Far from optimal, but better than
-% nothing.
+% Default Computer Modern setup. Far from optimal, but better than
+% nothing.
% \begin{macrocode}
-\DeclareInstance { xfrac } { cmr } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.2 ex ,
- slash-left-kern = -0.1 em ,
- slash-right-kern = -0.1 em
+\DeclareInstance{xfrac}{cmr}{text}{
+ denominator-bot-sep=0pt,
+ numerator-top-sep=\DelayEvaluation{.2ex},
+ slash-left-kern=\DelayEvaluation{-.1em},
+ slash-right-kern=\DelayEvaluation{-.1em},
}
-\DeclareInstance { xfrac } { cmss } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.2 ex ,
- slash-left-kern = -0.1 em ,
- slash-right-kern = -0.1 em
+\DeclareInstance{xfrac}{cmss}{text}{
+ denominator-bot-sep=0pt,
+ numerator-top-sep=\DelayEvaluation{.2ex},
+ slash-left-kern=\DelayEvaluation{-.1em},
+ slash-right-kern=\DelayEvaluation{-.1em},
}
-\DeclareInstance { xfrac } { cmtt } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.2 ex ,
- slash-left-kern = -0.1 em ,
- slash-right-kern = -0.1 em
+\DeclareInstance{xfrac}{cmtt}{text}{
+ denominator-bot-sep=0pt,
+ numerator-top-sep=\DelayEvaluation{.2ex},
+ slash-left-kern=\DelayEvaluation{-.1em},
+ slash-right-kern=\DelayEvaluation{-.1em},
}
% \end{macrocode}
-%
-% We can do better for the Computer Modern fonts. For cmr and cmss
-% we choose Times, and for cmtt use Palatino.
+% We can do better for the Computer Modern fonts. For the roman
+% family we choose Times.
% \begin{macrocode}
-\bool_if:NF \l_xfrac_cm_std_bool
- {
- \DeclareInstance { xfrac } { cmr } { text }
- { slash-symbol-font = ptm }
- \DeclareInstance { xfrac } { cmss } { text }
- { slash-symbol-font = ptm }
- \DeclareInstance { xfrac } { cmtt } { text }
- { slash-symbol-font = ppl }
- }
+\DeclareCollectionInstance{cm-recommended}{xfrac}{cmr}{text}{
+ slash-symbol-font = ptm,
+}
% \end{macrocode}
-%
-% Things works slightly better with Latin Modern.
+% Times also blends well with `cmss'.
% \begin{macrocode}
-\DeclareInstance { xfrac } { lmr } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.1 ex ,
- slash-left-kern = -0.15 em ,
- slash-right-kern = -0.15 em
+\DeclareCollectionInstance{cm-recommended}{xfrac}{cmss}{text}{
+ slash-symbol-font = ptm,
}
-\DeclareInstance { xfrac } { lmss } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0 pt ,
- slash-left-kern = -0.15 em ,
- slash-right-kern = -0.15 em
-}
-\DeclareInstance { xfrac } { lmtt } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0 pt ,
- slash-left-kern = -0.15 em ,
- slash-right-kern = -0.15 em
+% \end{macrocode}
+% For `cmtt' we choose the Palatino solidus as it is slightly
+% thicker than Times.
+% \begin{macrocode}
+\DeclareCollectionInstance{cm-recommended}{xfrac}{cmtt}{text}{
+ slash-symbol-font = ppl,
}
% \end{macrocode}
+% If we used the \texttt{cm-recommended} setup we activate it.
+% \begin{macrocode}
+\bool_if:NT \g_cm_recommended_bool
+ {\UseCollection{xfrac}{cm-recommended}}
+% \end{macrocode}
%
-%\subsection{Messages}
+% \subsection{The User Command}
%
-% Just the one.
-% \begin{macrocode}
-\msg_new:nnnn { xfrac } { over-specified-numerator-sep }
- {You have specified both numerator-top-sep and numerator-bot-sep}
- {I will pretend that you didn't specify either of them}
-% \end{macrocode}
-%
-%\subsection{The user command}
-%
-% Currently there is just a single user command. \cs{sfrac} takes
-% two mandatory arguments: numerator and denominator. It can take an
-% optional argument between the mandatory specifying the separator
-% like this:
-%\begin{verbatim}
-% \sfrac{7}[/]{12}
-%\end{verbatim}
-% It also has an optional argument that comes before the first
-% mandatory argument. If used it will use that instance instead of
-% the auto-detected one, so a user who has defined the instance
-% `cmr2' may use
-%\begin{verbatim}
-% \sfrac[cmr2]{7}{12}
-%\end{verbatim}
-% and get the settings from `cmr2' instead of the settings of
-% the current font family.
+% Currently there is just a single user command. \cs{sfrac} takes
+% two mandatory arguments: numerator and denominator. It can take an
+% optional argument between the mandatory specifying the separator
+% like this:
+% \begin{verbatim}
+% \sfrac{7}[/]{12}
+% \end{verbatim}
+% It also has an optional argument that comes before the first
+% mandatory argument. If used it will use that instance instead of
+% the auto-detected one, so a user who has defined the instance
+% `cmr2' may use
+% \begin{verbatim}
+% \sfrac[cmr2]{7}{12}
+% \end{verbatim}
+% and get the settings from `cmr2' instead of the settings of the
+% current font family.
% \begin{macrocode}
-\NewDocumentCommand \sfrac { o m o m } {
+\DeclareDocumentCommand \sfrac {o mom}{
\mode_if_math:TF
- {
- \IfInstanceExistTF { xfrac } { mathfam \number \fam }
- { \UseInstance { xfrac } { mathfam \number \fam } }
- { \UseInstance { xfrac } { mathdefault } }
- {#2} {#3} {#4}
- }
- {
- \IfInstanceExistTF { xfrac } {#1}
- { \UseInstance { xfrac } {#1} }
- {
- \IfInstanceExistTF { xfrac } { \f@family }
- { \UseInstance { xfrac } { \f@family } }
- { \UseInstance { xfrac } { default } }
- }
- {#2} {#3} {#4}
+{
+ \cs_set:Npx \xfrac_next: {mathfam\number\fam}
+ \IfExistsInstanceTF{xfrac}{\xfrac_next: }
+ {\UseInstance{xfrac}{\xfrac_next: }}
+ {\UseInstance{xfrac}{mathdefault}}
+ {#2}{#3}{#4}
+}
+{
+ \IfExistsInstanceTF{xfrac}{#1}
+ {\UseInstance{xfrac}{#1}{#2}{#3}{#4}}
+ {\IfExistsInstanceTF{xfrac}{\f@family}
+ {\UseInstance{xfrac}{\f@family}}
+ {\UseInstance{xfrac}{default}}
+ {#2}{#3}{#4}
}
+ }
}
-% \end{macrocode} \ No newline at end of file
+% \end{macrocode}
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/tex/latex/mh/breqn.sty b/Master/texmf-dist/tex/latex/mh/breqn.sty
index 77b761ad0db..ef00e99ed98 100644
--- a/Master/texmf-dist/tex/latex/mh/breqn.sty
+++ b/Master/texmf-dist/tex/latex/mh/breqn.sty
@@ -28,7 +28,8 @@
%% breqn.sty, breqn.pdf, breqn.ins, breqn.drv.
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{breqn}[2008/08/13 v0.98a]
+\RequirePackage{expl3}[2009/08/05]
+\ProvidesExplPackage{breqn}{2009/08/07}{0.98a}{Breaking equations}
\edef\breqnpopcats{%
\catcode\number`\"=\number\catcode`\"
\relax}
@@ -39,7 +40,7 @@
}
\ProcessOptions\relax
\@ifpackageloaded{flexisym}{}{%
- \RequirePackage{flexisym}[2007/12/19]
+ \RequirePackage{flexisym}[2009/08/07]
\edef\breqnpopcats{\breqnpopcats
\catcode\number`\^=\number\catcode`\^
\catcode\number`\_=\number\catcode`\_
@@ -118,11 +119,18 @@
\long\gdef\&m#1#2{#1\csname &#2\endcsname{#1}}
\endgroup
\@xp\let\csname\string &q\endcsname\@gobble
+\ExplSyntaxOn
\g@addto@macro\mathchars@reset{%
- \let\@symRel\@secondoftwo \let\@symBin\@secondoftwo
- \let\@symDeL\@secondoftwo \let\@symDeR\@secondoftwo
- \let\@symDeB\@secondoftwo
-}
+ %\let\@symRel\@secondoftwo \let\@symBin\@secondoftwo
+ %\let\@symDeL\@secondoftwo \let\@symDeR\@secondoftwo
+ %\let\@symDeB\@secondoftwo
+ \cs_set_eq:NN \math_csym_Rel:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_Bin:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_DeL:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_DeR:Nn \use_ii:nn
+ \cs_set_eq:NN \math_csym_DeB:Nn \use_ii:nn
+}
+\ExplSyntaxOff
\def\eq@cons#1#2{%
\begingroup \let\@elt\relax \xdef#1{\@elt{#2}#1}\endgroup
}
@@ -291,8 +299,8 @@
\mskip\thickmuskip \@@vadjust{\penalty\tw@}\penalty-\@Mi\@@vadjust{}%
}
\newcommand\hiderel[1]{\mathrel{\advance\lr@level\@ne#1}}
-\let\m@@Bin\m@Bin
-\let\m@@Rel\m@Rel
+%%%%\let\m@@Bin\m@Bin
+%%%%%\let\m@@Rel\m@Rel
\let\EQ@prebin@space\relax
\def\EQ@prebin@space@a{\mskip-\eq@binoffset \keep@glue \mskip\eq@binoffset}
\def\bin@break{\ifnum\lastpenalty=\z@\penalty\prebinoppenalty\fi
@@ -302,22 +310,34 @@
\penalty\prerelpenalty
\fi
}
-\def\d@@Bin{\bin@break \m@@Bin}
-\def\d@@Rel{\mark@lhs \rel@break \m@@Rel}
-\let\m@@symRel\@symRel \def\d@@symRel{\mark@lhs \rel@break \m@@symRel}
-\let\m@@symBin\@symBin \def\d@@symBin{\bin@break \m@@symBin}
-\let\m@@symDel\@symDel
-\let\m@@symDeR\@symDeR
-\let\m@@symDeB\@symDeB
-\let\m@@symDeA\@symDeA
+\ExplSyntaxOn
+%%%\def\d@@Bin{\bin@break \m@@Bin}
+%%%%\def\d@@Rel{\mark@lhs \rel@break \m@@Rel}
+\cs_set:Npn \math_dsym_Bin:Nn {\bin@break\math_bsym_Bin:Nn}
+\cs_set:Npn \math_dsym_Rel:Nn {\mark@lhs \rel@break \math_bsym_Rel:Nn }
+\ExplSyntaxOff
+\ExplSyntaxOn
+%%\let\m@@symRel\@symRel
+%%%\def\d@@symRel{\mark@lhs \rel@break \m@@symRel}
+
+\cs_set_protected:Npn \math_dcsym_Bin:Nn {\bin@break \math_bcsym_Bin:Nn}
+\cs_set_protected:Npn \math_dcsym_Rel:Nn { \mark@lhs \rel@break \math_bcsym_Rel:Nn}
+
+%%\let\m@@symBin\@symBin \def\d@@symBin{\bin@break \m@@symBin}
+%%\let\m@@symDel\@symDel
+%%\let\m@@symDeR\@symDeR
+%%\let\m@@symDeB\@symDeB
+%%\let\m@@symDeA\@symDeA
+
\def\display@setup{%
\medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \let\m@Bin\d@@Bin \let\m@Rel\d@@Rel
- \let\@symRel\d@@symRel \let\@symBin\d@@symBin
- \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
- \let\m@DeA\d@@DeA
- \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
- \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
+ \math_setup_display_symbols:
+ %%\let\m@Bin\d@@Bin \let\m@Rel\d@@Rel
+ %%\let\@symRel\d@@symRel \let\@symBin\d@@symBin
+ %%\let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
+ %%\let\m@DeA\d@@DeA
+ %%\let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
+ %%\let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
\let\left\eq@left \let\right\eq@right \global\lr@level\z@
\global\eq@wdCond\z@ %BRM: new
\everyhbox{\everyhbox\@emptytoks
@@ -329,12 +349,15 @@
}
\def\dseries@display@setup{%
\medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \let\m@Bin\d@@Bin
- \let\@symBin\d@@symBin
- \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
- \let\m@DeA\d@@DeA
- \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
- \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
+ \math_setup_display_symbols:
+%%%% \let\m@Bin\d@@Bin
+%%%\let\m@Rel\d@@Rel
+%%% \let\@symRel\d@@symRel
+%%% \let\@symBin\d@@symBin
+%%% \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
+%%% \let\m@DeA\d@@DeA
+%%% \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
+%%% \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
\let\left\eq@left \let\right\eq@right \global\lr@level\z@
\everyhbox{\everyhbox\@emptytoks
\let\display@setup\relax \textmath@setup \let\textmath@setup\relax
@@ -345,14 +368,17 @@
\displaystyle
}
\def\textmath@setup{%
- \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
- \let\@symRel\m@@symRel \let\@symBin\m@@symBin
- \let\m@DeL\m@@DeL \let\m@DeR\m@@DeR \let\m@DeB\m@@DeB
- \let\m@DeA\m@@DeA
- \let\@symDeL\m@@symDeL \let\@symDeR\m@@symDeR
- \let\@symDeB\m@@symDeB \let\@symDeA\m@@symDeA
+ \math_setup_inline_symbols:
+%%%% \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
+%%%% \let\@symRel\m@@symRel \let\@symBin\m@@symBin
+%%%% \let\m@DeL\m@@DeL \let\m@DeR\m@@DeR \let\m@DeB\m@@DeB
+%%%% \let\m@DeA\m@@DeA
+%%%% \let\@symDeL\m@@symDeL \let\@symDeR\m@@symDeR
+%%%% \let\@symDeB\m@@symDeB \let\@symDeA\m@@symDeA
\let\left\@@left \let\right\@@right
}
+
+\ExplSyntaxOff
\@ifundefined{@displaytrue}{%
\@xp\newif\csname if@display\endcsname
\everydisplay\@xp{\the\everydisplay \@displaytrue}%
@@ -1453,19 +1479,21 @@
\@saveprimitive\left\@@left
\@saveprimitive\right\@@right
\newcount\lr@level
+\ExplSyntaxOn
\def\eq@left{%
- \@ifnext .{\eq@nullleft}{\begingroup \let\delimiter\eq@left@a}%
+ \@ifnext .{\eq@nullleft}{\begingroup \let\math_delimiter:NNnNn \eq@left@a}%
}
\def\eq@right{%
- \@ifnext .{\eq@nullright}{\begingroup \let\delimiter\eq@right@a}%
+ \@ifnext .{\eq@nullright}{\begingroup \let \math_delimiter:NNnNn \eq@right@a}%
}
-\def\eq@left@a#1 #2{\endgroup\@@left\delimiter#1 \after@open}
-\def\eq@right@a#1 #2{\endgroup
- \@@right\delimiter#1 \after@close \ss@scan{#1}%
+\def\eq@left@a#1#2#3#4#5#6{\endgroup
+ \@@left \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@open}
+\def\eq@right@a#1#2#3#4#5#6{\endgroup
+ \@@right \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@close \ss@scan{#1#2{#3}#4{#5}}%
}
+\ExplSyntaxOff
\def\eq@nullleft#1{\@@left#1\after@open}
\def\eq@nullright#1{\@@right#1\after@close}
- % For paren matching: )
\def\delim@reset{%
\let\after@open\relax \let\after@close\relax
\let\left\@@left \let\right\@@right
@@ -1504,18 +1532,24 @@
%%\def\Biggm{\mathrel\Bigg}
%%\def\bigggm{\mathrel\biggg}
%%\def\Bigggm{\mathrel\Biggg}
-\let\m@@DeL\m@DeL \let\m@@DeR\m@DeR \let\m@@DeB\m@DeB
-\def\d@@DeL#1#2#3{%
- \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@open
-}
-\def\d@@DeR#1#2#3{%
- \delimiter"5\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@close
-}
-\def\d@@DeB#1#2#3{%
- \delimiter"0\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@bidir
-}
+\ExplSyntaxOn
+\cs_set:Npn \math_dsym_DeL:Nn #1#2{\math_bsym_DeL:Nn #1{#2}\after@open}
+\cs_set:Npn \math_dsym_DeR:Nn #1#2{\math_bsym_DeR:Nn #1{#2}\after@close}
+\cs_set:Npn \math_dsym_DeB:Nn #1#2{\math_bsym_DeB:Nn #1{#2}\after@bidir}
+
+%%%%%
+%%%%%\let\m@@DeL\m@DeL \let\m@@DeR\m@DeR \let\m@@DeB\m@DeB
+%%%%%\def\d@@DeL#1#2#3{%
+%%%%% \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@open
+%%%%%}
+%%%%%\def\d@@DeR#1#2#3{%
+%%%%% \delimiter"5\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@close
+%%%%%}
+%%%%%\def\d@@DeB#1#2#3{%
+%%%%% \delimiter"0\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@bidir
+%%%%%}
%%BRM: These weren't defined, but apparently should be.
-\let\m@@DeA\m@DeA\let\d@@DeA\m@DeA%
+%%%%%%\let\m@@DeA\m@DeA\let\d@@DeA\m@DeA%
\let\after@bidir\@empty
\mathchardef\zero@bop=888 \relax
\mathchardef\bop@incr=4444 \relax
@@ -1524,7 +1558,7 @@
\prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
\advance\prebinoppenalty\zero@bop
\ifnum\eqbreakdepth<\lr@level
- \let\m@Bin\m@@Bin
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn %%%%%%\let\m@Bin\m@@Bin
\else
\eq@binoffset=\eqbinoffset
\advance\eq@binoffset\lr@level\eqdelimoffset plus1fill\relax
@@ -1537,17 +1571,20 @@
\prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
\advance\prebinoppenalty\zero@bop
\ifnum\eqbreakdepth<\lr@level
- \else \let\m@Bin\d@@Bin
+ \else \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn %%%%%%\let\m@Bin\d@@Bin
\fi
\ifnum\lr@level<\@ne \eq@binoffset=\eqbinoffset\relax \fi
}
+
+\ExplSyntaxOff
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\let\subsup@flag=\count@
-\def\ss@delim@a#1#2#3#4{\xdef\right@delim@code{\number"#2#3#4}}
+\def\ss@delim@a@new#1#2#3#4#5{\xdef\right@delim@code{\number"#4#5}}
\def\ss@scan#1{%
\begingroup
- \let\delim@a\ss@delim@a \@tempcnta#1\relax
+ \ss@delim@a@new #1%
\endgroup
\subsup@flag\@M \afterassignment\ss@scan@a \let\@let@token=}
\def\ss@scan@a{%
@@ -1563,9 +1600,13 @@
\fi\fi\fi\fi\fi\fi
\breqn@next\@let@token
}
+\ExplSyntaxOn
\def\ss@scan@b#1#2{#1{%
- \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
+ %%%%%\let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
+ \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
#2}\afterassignment\ss@scan@a \let\@let@token=}%
+\ExplSyntaxOff
\def\ss@finish{%
\@@vadjust{\penalty\thr@@}%
\penalty\right@delim@code \penalty-\subsup@flag \keep@glue
diff --git a/Master/texmf-dist/tex/latex/mh/cmbase.sym b/Master/texmf-dist/tex/latex/mh/cmbase.sym
index 82dfd15f5e3..386127d32f8 100644
--- a/Master/texmf-dist/tex/latex/mh/cmbase.sym
+++ b/Master/texmf-dist/tex/latex/mh/cmbase.sym
@@ -29,20 +29,21 @@
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
%%
\ProvidesSymbols{cmbase}[2007/12/19 v0.92]
-\@xp\xdef\csname mg@OT1\endcsname{\hexnumber@\symoperators}
-\@xp\xdef\csname mg@OML\endcsname{\hexnumber@\symletters}
-\@xp\xdef\csname mg@OMS\endcsname{\hexnumber@\symsymbols}
-\@xp\xdef\csname mg@OMX\endcsname{\hexnumber@\symlargesymbols}
-\gdef\mg@bin{\mg@OMS}
-\gdef\mg@del{\mg@OMX}
-\xdef\mg@digit{\@xp\@nx\csname mg@OT1\endcsname}
-\gdef\mg@latin{\mg@OML}
-\global\let\mg@Latin\mg@latin
-\global\let\mg@greek\mg@latin
-\global\let\mg@Greek\mg@digit
-\global\let\mg@rel\mg@bin
-\global\let\mg@ord\mg@bin
-\global\let\mg@cop\mg@del
+\ExplSyntaxOn
+\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
+\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
+\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
+\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
+\cs_gset:Npx\mg@bin{\mg@OMS}
+\cs_gset:Npx\mg@del{\mg@OMX}
+\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
+\cs_gset:Npn\mg@latin{\mg@OML}
+\cs_gset_eq:NN\mg@Latin\mg@latin
+\cs_gset_eq:NN\mg@greek\mg@latin
+\cs_gset_eq:NN\mg@Greek\mg@digit
+\cs_gset_eq:NN\mg@rel\mg@bin
+\cs_gset_eq:NN\mg@ord\mg@bin
+\cs_gset_eq:NN\mg@cop\mg@del
\DeclareFlexSymbol{!} {Pun}{OT1}{21}
\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
@@ -268,7 +269,7 @@
\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\def\cdotp{\mathpunct{\cdotOrd}}
+\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
@@ -283,40 +284,40 @@
\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
\DeclareFlexSymbol{\oint}{COi}{cop}{48}
\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-\DeclareFlexSymbol{\rangle}{DeR}{del}{0B}
-\DeclareFlexSymbol{\langle}{DeL}{del}{0A}
-\DeclareFlexSymbol{\rbrace}{DeR}{del}{09}
-\DeclareFlexSymbol{\lbrace}{DeL}{del}{08}
-\DeclareFlexSymbol{\rceil}{DeR}{del}{07}
-\DeclareFlexSymbol{\lceil}{DeL}{del}{06}
-\DeclareFlexSymbol{\rfloor}{DeR}{del}{05}
-\DeclareFlexSymbol{\lfloor}{DeL}{del}{04}
-\DeclareFlexSymbol{(}{DeL}{del}{00}
-\DeclareFlexSymbol{)}{DeR}{del}{01}
-\DeclareFlexSymbol{[}{DeL}{del}{02}
-\DeclareFlexSymbol{]}{DeR}{del}{03}
-\DeclareFlexSymbol{\lVert}{DeL}{del}{0D}
-\DeclareFlexSymbol{\rVert}{DeR}{del}{0D}
-\DeclareFlexSymbol{\lvert}{DeL}{del}{0C}
-\DeclareFlexSymbol{\rvert}{DeR}{del}{0C}
-\DeclareFlexSymbol{\Vert}{DeB}{del}{0D}
-\DeclareFlexSymbol{\vert}{DeB}{del}{0C}
-\DeclareFlexSymbol{|}{DeB}{del}{0C}
-\DeclareFlexSymbol{/}{DeB}{del}{0E}
-\DeclareFlexSymbol{\lmoustache}{DeL}{del}{40}
-\DeclareFlexSymbol{\rmoustache}{DeR}{del}{41}
-\DeclareFlexSymbol{\lgroup}{DeL}{del}{3A}
-\DeclareFlexSymbol{\rgroup}{DeR}{del}{3B}
-\DeclareFlexSymbol{\bracevert}{DeB}{del}{3E}
-\DeclareFlexSymbol{\arrowvert}{DeB}{del}{3C}
-\DeclareFlexSymbol{\Arrowvert}{DeB}{del}{3D}
-\DeclareFlexSymbol{\uparrow}{DeA}{del}{78}
-\DeclareFlexSymbol{\downarrow}{DeA}{del}{79}
-\DeclareFlexSymbol{\updownarrow}{DeA}{del}{3F}
-\DeclareFlexSymbol{\Uparrow}{DeA}{del}{7E}
-\DeclareFlexSymbol{\Downarrow}{DeA}{del}{7F}
-\DeclareFlexSymbol{\Updownarrow}{DeA}{del}{77}
-\DeclareFlexSymbol{\backslash}{DeB}{del}{0F}
+\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
+\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
+\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
+\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
+\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
+\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
+\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
+\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
+\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
+\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
+\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
+\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
+\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
+\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
+\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
+\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
+\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
+\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
+\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
+\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
+\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
+\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
+\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
+\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
+\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
+\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
+\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
@@ -363,6 +364,7 @@
\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
\mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
\def\Relbar{\mathchar"3D }
+\ExplSyntaxOff
\endinput
%%
%% End of file `cmbase.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/flexisym.sty b/Master/texmf-dist/tex/latex/mh/flexisym.sty
index 4603c90e1db..b370beb1744 100644
--- a/Master/texmf-dist/tex/latex/mh/flexisym.sty
+++ b/Master/texmf-dist/tex/latex/mh/flexisym.sty
@@ -28,10 +28,11 @@
%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
%%
-\ProvidesPackage{flexisym}[2008/07/23 v0.97]
-\let\@xp\expandafter \let\@nx\noexpand
+\RequirePackage{expl3}[2009/08/05]
+\ProvidesExplPackage{flexisym}{2009/08/07}{0.97a}{Make math characters macros}
+
\edef\do{%
- \@nx\AtEndOfPackage{%
+ \noexpand\AtEndOfPackage{%
\catcode\number`\"=\number\catcode`\"
\relax
}%
@@ -41,7 +42,7 @@
\let\@sym\@gobble
\DeclareOption{robust}{%
\def\@sym#1{%
- \ifx\protect\@typeset@protect \else\protect#1\@xp\@gobblefour\fi
+ \ifx\protect\@typeset@protect \else\protect#1\exp_after:wN\use_none:nnnn\fi
}%
}
\def\mg@bin{2}% binary operators
@@ -59,121 +60,234 @@
\def\mg@cal{2}% script/calligraphic
%%\def\mg@frak{5}% Fraktur letters
\def\mg@digit{0}% decimal digits % 1 = oldstyle, 0 = capital
-\expandafter\let\csname MathChar \endcsname\mathchar
-\expandafter\let\csname Delimiter \endcsname\delimiter
-\expandafter\let\csname Radical \endcsname\radical
-\newcommand{\MathChar}{}
-\edef\MathChar{\csname MathChar \endcsname\noexpand\string}
-\newcommand{\Delimiter}{}
-\edef\Delimiter{\csname Delimiter \endcsname\noexpand\string}
-\newcommand{\Radical}{}
-\edef\Radical{\csname Radical \endcsname\noexpand\string}
+\cs_set_protected:Nn \math_char:NNn {
+ \tex_mathchar:D \intexpr_eval:w " #1#2#3 \intexpr_eval_end:
+}
+\cs_set_protected:Nn \math_delimiter:NNnNn {
+ \tex_delimiter:D \intexpr_eval:w " #1#2#3#4#5 \intexpr_eval_end:
+}
+\cs_set_protected:Nn \math_radical:NnNn {
+ \tex_radical:D \intexpr_eval:w " #1#2#3#4 \intexpr_eval_end:
+}
+\cs_set_protected:Nn \math_accent:NNnn {
+ \tex_mathaccent:D \intexpr_eval:w " #1 #2 #3 \intexpr_eval_end: {#4}
+}
+
\let\sumlimits\displaylimits
\let\intlimits\nolimits
\let\namelimits\displaylimits
-\edef\m@Ord#1#2#3{\csname MathChar \endcsname"0#1#2#3 }
-\edef\m@Var#1#2#3{\csname MathChar \endcsname"7#1#2#3 }
-\edef\m@Bin#1#2#3{\csname MathChar \endcsname"2#1#2#3 }
-\edef\m@Rel#1#2#3{\csname MathChar \endcsname"3#1#2#3 }
-\edef\m@Pun#1#2#3{\csname MathChar \endcsname"6#1#2#3 }
-\edef\m@COs#1#2#3{\csname MathChar \endcsname"1#1#2#3 \sumlimits}
-\edef\m@COi#1#2#3{\csname MathChar \endcsname"1#1#2#3 \intlimits}
-\def\delim@a#1#2#3#4{\ifx\relax#1#2#3#4\else#1\fi #2#3#4}
-\def\delim@b#1#2#3#4{\ifx\relax#1#2#3#4\else#1\fi }
-\def\@tempa{%
- \@nx\@xp\@nx\delim@a\@nx\csname sd@##1##2##3\@nx\endcsname ##1##2##3 }
-\edef\m@DeL#1#2#3{\csname Delimiter \endcsname"4\@tempa}
-\edef\m@DeR#1#2#3{\csname Delimiter \endcsname"5\@tempa}
-\edef\m@DeB#1#2#3{\csname Delimiter \endcsname"0\@tempa}
-\edef\m@DeA#1#2#3{\csname Delimiter \endcsname"3\@tempa}
-\edef\m@Rad#1#2#3{\csname Radical \endcsname"\@tempa}
-\def\do#1#2{\@xp\def\csname sd@#1\endcsname{#2}}
-\do{300}{028}
-\do{301}{029}
-\do{302}{05B}
-\do{303}{05D}
-\do{304}{262}
-\do{305}{263}
-\do{306}{264}
-\do{307}{265}
-\do{308}{266}
-\do{309}{267}
-\do{30A}{268}
-\do{30B}{269}
-\do{30C}{26A}
-\do{30D}{26B}
-\do{30E}{13D}
-\do{30F}{26E}
-\do{340}{37A}
-\do{341}{37B}
-\do{33A}{33A}
-\do{33B}{33B}
-\do{33E}{33E}
-\do{33C}{26A}
-\do{33D}{26B}
-\do{378}{222}
-\do{379}{223}
-\do{33F}{26C}
-\do{37E}{22A}
-\do{37F}{22B}
-\do{377}{26D}
-\do{30F}{26E}
-\def\m@Acc#1#2#3#4{\mathaccent"#1#2#3{#4}}
-\def\@symAcc{\@sym}
+\cs_new:Npn \math_bsym_Ord:Nn {\math_char:NNn 0 }% \m@Ord
+\cs_new:Npn \math_bsym_Var:Nn {\math_char:NNn 7 }% \m@Var
+\cs_new:Npn \math_bsym_Bin:Nn {\math_char:NNn 2}% \m@Bin
+\cs_new:Npn \math_bsym_Rel:Nn {\math_char:NNn 3 }% \m@Bin
+\cs_new:Npn \math_bsym_Pun:Nn {\math_char:NNn 6 }%\m@Pun
+\cs_new:Nn \math_bsym_COs:Nn { \math_char:NNn 1#1{#2} \sumlimits}% \m@COs
+\cs_new:Nn \math_bsym_COi:Nn { \math_char:NNn 1#1{#2} \intlimits}% \m@COi
+\cs_new:Nn \math_bsym_DeL:Nn { \math_sd_del_aux:Nnn 4 #1{#2} }%\m@DeL
+\cs_new:Nn \math_bsym_DeR:Nn { \math_sd_del_aux:Nnn 5 #1{#2} } %\m@DeR
+\cs_new:Nn \math_bsym_DeB:Nn { \math_sd_del_aux:Nnn 0 #1{#2} }%\m@DeB
+\cs_new:Nn \math_bsym_DeA:Nn { \math_sd_del_aux:Nnn 3 #1{#2} }%\m@DeA
+\cs_new:Nn \math_bsym_Rad:Nn { \math_sd_rad_aux:Nn #1{#2} }%\m@Rad
+\cs_new:Npn \math_bsym_Acc:Nn #1#2#3#4 {\math_accent:NNnn #1#2{#3}{#4}}% name is wrong
+
+\cs_set:Npn \math_sd_del_aux:Nnn #1#2#3{
+ \exp_args:Nf \math_sd_del_auxi:nN {\use:c{sd@#2#3}} #1 #2{#3}
+}
+\cs_set:Npn \math_sd_del_auxi:nN #1#2{ \math_delimiter:NNnNn #2 #1 }
+\cs_set:Npn \math_sd_rad_aux:Nn #1#2{
+ \exp_args:Nf \math_sd_rad_auxi:n {\use:c{sd@#1#2}} #1 {#2}
+}
+\cs_set:Npn \math_sd_rad_auxi:n #1{ \math_radical:NnNn #1 }
+
+\cs_set_protected:Npn \math_bcsym_Ord:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symOrd
+\cs_set_protected:Npn \math_bcsym_Var:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symVar
+\cs_set_protected:Npn \math_bcsym_Bin:Nn #1#2{\@symtype\mathbin{\OrdSymbol{#2}}}%\@symBin
+\cs_set_protected:Npn \math_bcsym_Rel:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symRel
+\cs_set_protected:Npn \math_bcsym_Pun:Nn #1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}%\@symPun
+\cs_set_protected:Npn \math_bcsym_COi:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\intlimits}}%\@symCOi
+\cs_set_protected:Npn \math_bcsym_COs:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\sumlimits}}%\@symCOs
+\cs_set_protected:Npn \math_bcsym_DeL:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symDeL
+\cs_set_protected:Npn \math_bcsym_DeR:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symDeR
+\cs_set_protected:Npn \math_bcsym_DeB:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symDeB
+\cs_set_protected:Npn \math_bcsym_DeA:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symDeA
+\cs_set_protected:Npn \math_bcsym_Acc:Nn {\@sym}%\@symAcc FIX!
+\cs_set_protected:Npn \math_bcsym_Ope:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symVar
+\cs_set_protected:Npn \math_bcsym_Clo:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symVar
+\cs_set_protected:Npn \math_bcsym_Inn:Nn #1#2{\@symtype\mathinner{\OrdSymbol{#2}}}%\@symVar
+
\let\@symtype\@firstofone
-\def\@symOrd#1#2{\@symtype\mathord{\OrdSymbol{#2}}}
-\def\@symVar{\@symOrd}
-\def\@symBin#1#2{\@symtype\mathbin{\OrdSymbol{#2}}}
-\def\@symRel#1#2{\@symtype\mathrel{\OrdSymbol{#2}}}
-\def\@symPun#1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}
-\def\@symCOi#1#2{\@symtype{\mathop{\OrdSymbol{#2}}\intlimits}}
-\def\@symCOs#1#2{\@symtype{\mathop{\OrdSymbol{#2}}\sumlimits}}
-\def\@symOpe#1#2{\@symtype\mathopen{\OrdSymbol{#2}}}
-\def\@symClo#1#2{\@symtype\mathclose{\OrdSymbol{#2}}}
-\def\@symDeL#1#2{\@symtype\mathopen{\OrdSymbol{#2}}}
-\def\@symDeR#1#2{\@symtype\mathclose{\OrdSymbol{#2}}}
-\def\@symDeB#1#2{\@symtype\mathord{\OrdSymbol{#2}}}
-\def\@symInn#1#2{\@symtype\mathinner{\OrdSymbol{#2}}}
-\def\@xnce#1{\@xp\@nx\csname#1\endcsname}
\let\sym@global\global
+\cs_new:Npn \math_isym_Ord:Nn {\math_bsym_Ord:Nn }% \m@Ord
+\cs_new:Npn \math_isym_Var:Nn {\math_bsym_Var:Nn }% \m@Var
+\cs_new:Npn \math_isym_Bin:Nn {\math_bsym_Bin:Nn}% \m@Bin
+\cs_new:Npn \math_isym_Rel:Nn {\math_bsym_Rel:Nn }% \m@Bin
+\cs_new:Npn \math_isym_Pun:Nn {\math_bsym_Pun:Nn }%\m@Pun
+\cs_new:Npn \math_isym_COs:Nn {\math_bsym_COs:Nn}% \m@COs
+\cs_new:Npn \math_isym_COi:Nn {\math_bsym_COi:Nn}% \m@COi
+\cs_new:Npn \math_isym_DeL:Nn {\math_bsym_DeL:Nn}%\m@DeL
+\cs_new:Npn \math_isym_DeR:Nn{ \math_bsym_DeR:Nn}%\m@DeR
+\cs_new:Npn \math_isym_DeB:Nn{ \math_bsym_DeB:Nn }%\m@DeB
+\cs_new:Npn \math_isym_DeA:Nn { \math_bsym_DeA:Nn }%\m@DeA
+\cs_new:Npn \math_isym_Rad:Nn { \math_bsym_Rad:Nn}%\m@Rad
+\cs_new:Npn \math_isym_Acc:Nn {\math_bsym_DeL:Nn}% name is wrong
+\cs_set_protected:Npn \math_icsym_Ord:Nn {\math_bcsym_Ord:Nn}
+\cs_set_protected:Npn \math_icsym_Var:Nn {\math_bcsym_Var:Nn}
+\cs_set_protected:Npn \math_icsym_Bin:Nn {\math_bcsym_Bin:Nn}
+\cs_set_protected:Npn \math_icsym_Rel:Nn {\math_bcsym_Rel:Nn}
+\cs_set_protected:Npn \math_icsym_Pun:Nn {\math_bcsym_Pun:Nn}
+\cs_set_protected:Npn \math_icsym_COi:Nn {\math_bcsym_COi:Nn}
+\cs_set_protected:Npn \math_icsym_COs:Nn {\math_bcsym_COs:Nn}
+\cs_set_protected:Npn \math_icsym_DeL:Nn {\math_bcsym_DeL:Nn}
+\cs_set_protected:Npn \math_icsym_DeR:Nn {\math_bcsym_DeR:Nn}
+\cs_set_protected:Npn \math_icsym_DeB:Nn {\math_bcsym_DeB:Nn}
+\cs_set_protected:Npn \math_icsym_DeA:Nn {\math_bcsym_DeA:Nn}
+\cs_set_protected:Npn \math_icsym_Acc:Nn {\math_bcsym_Acc:Nn}
+\cs_set_protected:Npn \math_icsym_Ope:Nn {\math_bcsym_Ope:Nn}
+\cs_set_protected:Npn \math_icsym_Clo:Nn {\math_bcsym_Clo:Nn}
+\cs_set_protected:Npn \math_icsym_Inn:Nn {\math_bcsym_Inn:Nn}
+\cs_new:Npn \math_dsym_Ord:Nn {\math_bsym_Ord:Nn }
+\cs_new:Npn \math_dsym_Var:Nn {\math_bsym_Var:Nn }
+\cs_new:Npn \math_dsym_Bin:Nn {\math_bsym_Bin:Nn}
+\cs_new:Npn \math_dsym_Rel:Nn {\math_bsym_Rel:Nn }
+\cs_new:Npn \math_dsym_Pun:Nn {\math_bsym_Pun:Nn }
+\cs_new:Npn \math_dsym_COs:Nn {\math_bsym_COs:Nn}
+\cs_new:Npn \math_dsym_COi:Nn {\math_bsym_COi:Nn}
+\cs_new:Npn \math_dsym_DeL:Nn {\math_bsym_DeL:Nn}
+\cs_new:Npn \math_dsym_DeR:Nn{ \math_bsym_DeR:Nn}
+\cs_new:Npn \math_dsym_DeB:Nn{ \math_bsym_DeB:Nn }
+\cs_new:Npn \math_dsym_DeA:Nn { \math_bsym_DeA:Nn }
+\cs_new:Npn \math_dsym_Rad:Nn { \math_bsym_Rad:Nn}
+\cs_new:Npn \math_dsym_Acc:Nn {\math_bsym_DeL:Nn}
+\cs_set_protected:Npn \math_dcsym_Ord:Nn {\math_bcsym_Ord:Nn}
+\cs_set_protected:Npn \math_dcsym_Var:Nn {\math_bcsym_Var:Nn}
+\cs_set_protected:Npn \math_dcsym_Bin:Nn {\math_bcsym_Bin:Nn}
+\cs_set_protected:Npn \math_dcsym_Rel:Nn {\math_bcsym_Rel:Nn}
+\cs_set_protected:Npn \math_dcsym_Pun:Nn {\math_bcsym_Pun:Nn}
+\cs_set_protected:Npn \math_dcsym_COi:Nn {\math_bcsym_COi:Nn}
+\cs_set_protected:Npn \math_dcsym_COs:Nn {\math_bcsym_COs:Nn}
+\cs_set_protected:Npn \math_dcsym_DeL:Nn {\math_bcsym_DeL:Nn}
+\cs_set_protected:Npn \math_dcsym_DeR:Nn {\math_bcsym_DeR:Nn}
+\cs_set_protected:Npn \math_dcsym_DeB:Nn {\math_bcsym_DeB:Nn}
+\cs_set_protected:Npn \math_dcsym_DeA:Nn {\math_bcsym_DeA:Nn}
+\cs_set_protected:Npn \math_dcsym_Acc:Nn {\math_bcsym_Acc:Nn}
+\cs_set_protected:Npn \math_dcsym_Ope:Nn {\math_bcsym_Ope:Nn}
+\cs_set_protected:Npn \math_dcsym_Clo:Nn {\math_bcsym_Clo:Nn}
+\cs_set_protected:Npn \math_dcsym_Inn:Nn {\math_bcsym_Inn:Nn}
+\cs_set:Npn \math_setup_inline_symbols:{
+ \cs_set_eq:NN \math_sym_Ord:Nn \math_isym_Ord:Nn
+ \cs_set_eq:NN \math_sym_Var:Nn \math_isym_Var:Nn
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
+ \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
+ \cs_set_eq:NN \math_sym_Pun:Nn \math_isym_Pun:Nn
+ \cs_set_eq:NN \math_sym_COs:Nn \math_isym_COs:Nn
+ \cs_set_eq:NN \math_sym_COi:Nn \math_isym_COi:Nn
+ \cs_set_eq:NN \math_sym_DeL:Nn \math_isym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeR:Nn \math_isym_DeR:Nn
+ \cs_set_eq:NN \math_sym_DeB:Nn \math_isym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeA:Nn \math_isym_DeA:Nn
+ \cs_set_eq:NN \math_sym_Rad:Nn \math_isym_Rad:Nn
+ \cs_set_eq:NN \math_sym_Acc:Nn \math_isym_DeL:Nn
+ \cs_set_eq:NN \math_csym_Ord:Nn \math_icsym_Ord:Nn
+ \cs_set_eq:NN \math_csym_Var:Nn \math_icsym_Var:Nn
+ \cs_set_eq:NN \math_csym_Bin:Nn \math_icsym_Bin:Nn
+ \cs_set_eq:NN \math_csym_Rel:Nn \math_icsym_Rel:Nn
+ \cs_set_eq:NN \math_csym_Pun:Nn \math_icsym_Pun:Nn
+ \cs_set_eq:NN \math_csym_COi:Nn \math_icsym_COi:Nn
+ \cs_set_eq:NN \math_csym_COs:Nn \math_icsym_COs:Nn
+ \cs_set_eq:NN \math_csym_DeL:Nn \math_icsym_DeL:Nn
+ \cs_set_eq:NN \math_csym_DeR:Nn \math_icsym_DeR:Nn
+ \cs_set_eq:NN \math_csym_DeB:Nn \math_icsym_DeB:Nn
+ \cs_set_eq:NN \math_csym_DeA:Nn \math_icsym_DeA:Nn
+ \cs_set_eq:NN \math_csym_Acc:Nn \math_icsym_Acc:Nn
+ \cs_set_eq:NN \math_csym_Ope:Nn \math_icsym_Ope:Nn
+ \cs_set_eq:NN \math_csym_Clo:Nn \math_icsym_Clo:Nn
+ \cs_set_eq:NN \math_csym_Inn:Nn \math_icsym_Inn:Nn
+}
+
+\cs_set:Npn \math_setup_display_symbols:{
+ \cs_set_eq:NN \math_sym_Ord:Nn \math_dsym_Ord:Nn
+ \cs_set_eq:NN \math_sym_Var:Nn \math_dsym_Var:Nn
+ \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn
+ \cs_set_eq:NN \math_sym_Rel:Nn \math_dsym_Rel:Nn
+ \cs_set_eq:NN \math_sym_Pun:Nn \math_dsym_Pun:Nn
+ \cs_set_eq:NN \math_sym_COs:Nn \math_dsym_COs:Nn
+ \cs_set_eq:NN \math_sym_COi:Nn \math_dsym_COi:Nn
+ \cs_set_eq:NN \math_sym_DeL:Nn \math_dsym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeR:Nn \math_dsym_DeR:Nn
+ \cs_set_eq:NN \math_sym_DeB:Nn \math_dsym_DeL:Nn
+ \cs_set_eq:NN \math_sym_DeA:Nn \math_dsym_DeA:Nn
+ \cs_set_eq:NN \math_sym_Rad:Nn \math_dsym_Rad:Nn
+ \cs_set_eq:NN \math_sym_Acc:Nn \math_dsym_DeL:Nn
+ \cs_set_eq:NN \math_csym_Ord:Nn \math_dcsym_Ord:Nn
+ \cs_set_eq:NN \math_csym_Var:Nn \math_dcsym_Var:Nn
+ \cs_set_eq:NN \math_csym_Bin:Nn \math_dcsym_Bin:Nn
+ \cs_set_eq:NN \math_csym_Rel:Nn \math_dcsym_Rel:Nn
+ \cs_set_eq:NN \math_csym_Pun:Nn \math_dcsym_Pun:Nn
+ \cs_set_eq:NN \math_csym_COi:Nn \math_dcsym_COi:Nn
+ \cs_set_eq:NN \math_csym_COs:Nn \math_dcsym_COs:Nn
+ \cs_set_eq:NN \math_csym_DeL:Nn \math_dcsym_DeL:Nn
+ \cs_set_eq:NN \math_csym_DeR:Nn \math_dcsym_DeR:Nn
+ \cs_set_eq:NN \math_csym_DeB:Nn \math_dcsym_DeB:Nn
+ \cs_set_eq:NN \math_csym_DeA:Nn \math_dcsym_DeA:Nn
+ \cs_set_eq:NN \math_csym_Acc:Nn \math_dcsym_Acc:Nn
+ \cs_set_eq:NN \math_csym_Ope:Nn \math_dcsym_Ope:Nn
+ \cs_set_eq:NN \math_csym_Clo:Nn \math_dcsym_Clo:Nn
+ \cs_set_eq:NN \math_csym_Inn:Nn \math_dcsym_Inn:Nn
+}
+\math_setup_inline_symbols:
+\edef\tmp{\catcode\z@=\the\catcode\z@}
+\catcode\z@=\active
\def\DeclareFlexSymbol#1#2#3#4{%
\begingroup
- \edef\@tempb{\@nx\@sym\@nx#1\@xnce{m@#2}\@xnce{mg@#3}#4}%
- \ifcat\@nx#1\relax
+ \cs_set:Npx\@tempb{\exp_not:N\@sym\exp_not:N#1\exp_not:c{math_sym_#2:Nn}\exp_not:c{mg@#3}{#4}}%
+ \ifcat\exp_not:N#1\relax
\sym@global\let#1\@tempb
\else
\sym@global\mathcode`#1="8000\relax
- \lccode`\~=`#1\relax
- \lowercase{\sym@global\let~\@tempb}%
+ \lccode\z@=`#1\relax
+ \lowercase{\sym@global\let^^@\@tempb}% zero char
\fi
\endgroup
}
+\tmp % restore catcode
+\cs_set:Npn \DeclareFlexDelimiter #1#2#3#4#5#6{
+ \DeclareFlexSymbol{#1}{#2}{#3}{#4}
+ \cs_gset:cpx{sd@\use:c{mg@#3}#4}{\exp_not:c{mg@#5}{#6}}
+}
+
\def\DeclareFlexCompoundSymbol#1#2#3{%
- \@xp\DeclareRobustCommand\@xp#1\@xp{\csname @sym#2\endcsname#1{#3}}%
+ \exp_args:NNo \DeclareRobustCommand#1{\csname math_csym_#2:Nn\endcsname#1{#3}}%
\sym@global\let#1#1\relax
}
\DeclareRobustCommand\textchar{\text@char\textfont}
\DeclareRobustCommand\scriptchar{\text@char\scriptfont}%
-\def\text@char@a{\?\endgroup}%
-\def\text@char@sym#1#2#3{%
+\def\text@char@sym#1#2#3#4{% #3=fam, #4=slot
\begingroup
- \let\@sym\relax % defense against infinite loops
- \the\text@script@char#3%
- \afterassignment\text@char@a
- \chardef\?="%
+ \cs_set_eq:NN \@sym \prg_do_nothing: % defense against infinite loops
+ \the\text@script@char#3%
+ \char"#4\endgroup
}
-\def\text@char#1#2{\begingroup\check@mathfonts
- \let\text@script@char#1\let\@sym\text@char@sym
- \let\@symtype\@secondoftwo \let\OrdSymbol\@firstofone
- \let\ifmmode\iftrue \everymath{$\@gobble}%$
- \def\mkern{\muskip\z@}\let\mskip\mkern
- \ifcat\relax\noexpand#2#2%
+\edef\tmp{\catcode\z@=\the\catcode\z@}
+\catcode\z@=\active
+\def\text@char#1#2{\begingroup
+ \check@mathfonts
+ \cs_set_eq:NN \text@script@char#1
+ \cs_set_eq:NN \@sym\text@char@sym
+ \cs_set_eq:NN \@symtype\use_ii:nn
+ \cs_set_eq:NN\OrdSymbol\use:n
+ \cs_set_eq:NN\ifmmode\iftrue
+ \everymath{$\use_none:n}%$
+ \def\mkern{\muskip\z@}
+ \cs_set_eq:NN\mskip\mkern
+ \ifcat\relax\noexpand#2% true if #2 is a cs.
+ #2%
\else
- \lccode`\~=\expandafter`\string#2\relax
- \lowercase{~}%
+ \lccode\z@=\expandafter`\string#2\relax
+ \lowercase{^^@}%
\fi
\endgroup
}
+\tmp % restore catcode
\providecommand\textprime{}
\DeclareRobustCommand\textprime{\leavevmode
\raise.8ex\hbox{\text@char\scriptfont\prime}%
@@ -186,38 +300,39 @@
}
\@ifundefined{rightarrowfill@}{}{%
\def\rightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\copy\z@\mkern-6mu\cleaders
+ $#1\copy\z@\mkern-7mu\cleaders
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
\mkern-6mu\OrdSymbol{\rightarrow}$}
\def\leftarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
$#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
\hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
- \mkern-6mu\box\z@$}
+ \mkern-7mu\box\z@$}
\def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
$#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
\hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
\mkern-6mu\OrdSymbol{\rightarrow}$}
}
-\def\binrel@sym#1#2#3#4#5{%
+\def\binrel@sym#1#2#3#4{%
\xdef\binrel@@##1{%
- \ifx\m@Ord#2\@nx\@symOrd
- \else\ifx\m@Var#2\@nx\@symVar
- \else\ifx\m@COs#2\@nx\@symCOs
- \else\ifx\m@COi#2\@nx\@symCOi
- \else\ifx\m@Bin#2\@nx\@symBin
- \else\ifx\m@Rel#2\@nx\@symRel
- \else\ifx\m@Pun#2\@nx\@symPun
- \else\@nx\@symErr \fi\fi\fi\fi\fi\fi\fi
- ?{\@nx\OrdSymbol{##1}}}%
+ \ifx\math_sym_Ord:Nn #2 \math_csym_Ord:Nn
+ \else\ifx\math_sym_Var:Nn#2 \math_csym_Var:Nn
+ \else\ifx\math_sym_COs:Nn#2 \math_csym_COs:Nn
+ \else\ifx\math_sym_COi:Nn#2 \math_csym_COi:Nn
+ \else\ifx\math_sym_Bin:Nn#2 \math_csym_Bin:Nn
+ \else\ifx\math_sym_Rel:Nn#2 \math_csym_Rel:Nn
+ \else\ifx\math_sym_Pun:Nn#2 \math_csym_Pun:Nn
+ \else\exp_not:N\@symErr \fi\fi\fi\fi\fi\fi\fi
+ ?{\exp_not:N\OrdSymbol{##1}}}%
}
+
\def\binrel@a{%
- \def\@symOrd##1##2{\gdef\binrel@@####1{\@symOrd##1{\OrdSymbol{####1}}}}%
- \def\@symVar##1##2{\gdef\binrel@@####1{\@symVar##1{\OrdSymbol{####1}}}}%
- \def\@symCOs##1##2{\gdef\binrel@@####1{\@symCOs##1{\OrdSymbol{####1}}}}%
- \def\@symCOi##1##2{\gdef\binrel@@####1{\@symCOi##1{\OrdSymbol{####1}}}}%
- \def\@symBin##1##2{\gdef\binrel@@####1{\@symBin##1{\OrdSymbol{####1}}}}%
- \def\@symRel##1##2{\gdef\binrel@@####1{\@symRel##1{\OrdSymbol{####1}}}}%
- \def\@symPun##1##2{\gdef\binrel@@####1{\@symPun##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Ord:Nn##1##2{\gdef\binrel@@####1{\math_sym_Ord:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Var:Nn##1##2{\gdef\binrel@@####1{\math_sym_Var:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_COs:Nn##1##2{\gdef\binrel@@####1{\math_sym_COs:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_COi:Nn##1##2{\gdef\binrel@@####1{\math_sym_COi:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Bin:Nn##1##2{\gdef\binrel@@####1{\math_sym_Bin:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Rel:Nn##1##2{\gdef\binrel@@####1{\math_sym_Rel:Nn##1{\OrdSymbol{####1}}}}%
+ \def\math_sym_Pun:Nn##1##2{\gdef\binrel@@####1{\math_sym_Pun:Nn##1{\OrdSymbol{####1}}}}%
}
\def\binrel@#1{%
\setbox\z@\hbox{$%
@@ -227,26 +342,31 @@
}
\def\@symextension{sym}
\newcommand\usesymbols[1]{%
- \@for\@tempb:=#1\do{%
- \@xp\@onefilewithoptions\@xp{\@tempb}[][]\@symextension
+ \clist_map_variable:nNn{#1}\@tempb{%
+ \exp_args:No\@onefilewithoptions{\@tempb}[][]\@symextension
}%
}
\newcommand\ProvidesSymbols[1]{\ProvidesFile{#1.sym}}
-\DeclareRobustCommand{\not}[1]{\@symRel\not{\OrdSymbol{\notRel#1}}}
+\DeclareRobustCommand{\not}[1]{\math_csym_Rel:Nn\not{\OrdSymbol{\notRel#1}}}
\DeclareRobustCommand{\OrdSymbol}[1]{%
\begingroup\mathchars@reset#1\endgroup
}
\def\mathchars@reset{\let\@sym\@sym@ord \let\@symtype\@symtype@ord
\let\OrdSymbol\relax}
\def\@symtype@ord#1#{}% a strange sort of \@gobble
-\def\@sym@ord#1#2{\@xp\@sym@ord@a\string#2\@nil}%
+\def\@sym@ord#1#2{\exp_after:wN\@sym@ord@a\string#2\@nil}%
\begingroup
-\lccode`\.=`\@ \lowercase{\endgroup
-\def\@sym@ord@a#1.}#2#3\@nil#4#5#6{%
- \csname MathChar \endcsname"0%
- \if D#2\@xp\delim@b\csname sd@#4#5#6\endcsname#4#5#6
- \else #4#5#6
- \fi
+\lccode`\.=`\_ \lowercase{\endgroup
+\def\@sym@ord@a#1.#2.}#3#4\@nil#5#6{%
+ \if D#3
+ %\math_ord_delim_aux:Nn #5{#6}
+ \math_sd_del_aux:Nnn 0 #5{#6}% check if this works!
+ \else
+ \math_char:NNn 0 #5{#6}
+ \fi
+}
+\cs_set:Nn \math_ord_delim_aux:Nn {
+ \math_sd_aux:nn { \math_char:NNn 0 } {#1{#2}}
}
\@ifpackageloaded{amsmath}{%
\begingroup
@@ -260,15 +380,19 @@
}{}
\AtBeginDocument{%
\def\newmcodes@{%
- \mathcode `\'39\mathcode `\*42\mathcode `\."613A
- \ifnum\mathcode`\-=45
+ \mathcode `\'39\space
+ \mathcode `\*42\space
+ \mathcode `\."613A\space
+ \ifnum\mathcode`\-=45\space
\else
- \ifnum\mathcode`\-=32768
+ \ifnum\mathcode`\-=32768\space
\else
\mathchardef \std@minus \mathcode `\-\relax
\fi
\fi
- \mathcode `\-45 \mathcode `\/47\mathcode `\:"603A\relax
+ \mathcode `\-45\space
+ \mathcode `\/47\space
+ \mathcode `\:"603A\space\relax
}%
}
\DeclareOption{mathstyleoff}{%
diff --git a/Master/texmf-dist/tex/latex/mh/mathpazo.sym b/Master/texmf-dist/tex/latex/mh/mathpazo.sym
index 98acbe2424b..153e95756ec 100644
--- a/Master/texmf-dist/tex/latex/mh/mathpazo.sym
+++ b/Master/texmf-dist/tex/latex/mh/mathpazo.sym
@@ -28,21 +28,26 @@
%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
%%
-\ProvidesSymbols{mathpazo}[2007/12/19 v0.2]
-\@xp\xdef\csname mg@OT1\endcsname{\hexnumber@\symoperators}
-\@xp\xdef\csname mg@OML\endcsname{\hexnumber@\symletters}
-\@xp\xdef\csname mg@OMS\endcsname{\hexnumber@\symsymbols}
-\@xp\xdef\csname mg@OMX\endcsname{\hexnumber@\symlargesymbols}
-\gdef\mg@bin{\mg@OMS}
-\gdef\mg@del{\mg@OMX}
-\xdef\mg@digit{\@xp\@nx\csname mg@OT1\endcsname}
-\gdef\mg@latin{\mg@OML}
-\global\let\mg@Latin\mg@latin
-\global\let\mg@greek\mg@latin
-\global\let\mg@Greek\mg@digit
-\global\let\mg@rel\mg@bin
-\global\let\mg@ord\mg@bin
-\global\let\mg@cop\mg@del
+\ProvidesSymbols{mathpazo}[2010/07/11 v0.3]
+\ExplSyntaxOn
+\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
+\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
+\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
+\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
+\cs_gset:Npx\mg@bin{\mg@OMS}
+\cs_gset:Npx\mg@del{\mg@OMX}
+\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
+\cs_gset:Npn\mg@latin{\mg@OML}
+\cs_gset_eq:NN\mg@Latin\mg@latin
+\cs_gset_eq:NN\mg@greek\mg@latin
+\@ifpackagewith{mathpazo}{slantedGreek}{%
+ \cs_gset_eq:NN\mg@Greek\mg@latin
+}{%
+ \cs_gset:cpx{mg@Greek}{\hexnumber@\symupright}
+}
+\cs_gset_eq:NN\mg@rel\mg@bin
+\cs_gset_eq:NN\mg@ord\mg@bin
+\cs_gset_eq:NN\mg@cop\mg@del
\DeclareFlexSymbol{!} {Pun}{OT1}{21}
\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
@@ -268,7 +273,7 @@
\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\def\cdotp{\mathpunct{\cdotOrd}}
+\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
@@ -283,40 +288,40 @@
\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
\DeclareFlexSymbol{\oint}{COi}{cop}{48}
\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-\DeclareFlexSymbol{\rangle}{DeR}{del}{0B}
-\DeclareFlexSymbol{\langle}{DeL}{del}{0A}
-\DeclareFlexSymbol{\rbrace}{DeR}{del}{09}
-\DeclareFlexSymbol{\lbrace}{DeL}{del}{08}
-\DeclareFlexSymbol{\rceil}{DeR}{del}{07}
-\DeclareFlexSymbol{\lceil}{DeL}{del}{06}
-\DeclareFlexSymbol{\rfloor}{DeR}{del}{05}
-\DeclareFlexSymbol{\lfloor}{DeL}{del}{04}
-\DeclareFlexSymbol{(}{DeL}{del}{00}
-\DeclareFlexSymbol{)}{DeR}{del}{01}
-\DeclareFlexSymbol{[}{DeL}{del}{02}
-\DeclareFlexSymbol{]}{DeR}{del}{03}
-\DeclareFlexSymbol{\lVert}{DeL}{del}{0D}
-\DeclareFlexSymbol{\rVert}{DeR}{del}{0D}
-\DeclareFlexSymbol{\lvert}{DeL}{del}{0C}
-\DeclareFlexSymbol{\rvert}{DeR}{del}{0C}
-\DeclareFlexSymbol{\Vert}{DeB}{del}{0D}
-\DeclareFlexSymbol{\vert}{DeB}{del}{0C}
-\DeclareFlexSymbol{|}{DeB}{del}{0C}
-\DeclareFlexSymbol{/}{DeB}{del}{0E}
-\DeclareFlexSymbol{\lmoustache}{DeL}{del}{40}
-\DeclareFlexSymbol{\rmoustache}{DeR}{del}{41}
-\DeclareFlexSymbol{\lgroup}{DeL}{del}{3A}
-\DeclareFlexSymbol{\rgroup}{DeR}{del}{3B}
-\DeclareFlexSymbol{\bracevert}{DeB}{del}{3E}
-\DeclareFlexSymbol{\arrowvert}{DeB}{del}{3C}
-\DeclareFlexSymbol{\Arrowvert}{DeB}{del}{3D}
-\DeclareFlexSymbol{\uparrow}{DeA}{del}{78}
-\DeclareFlexSymbol{\downarrow}{DeA}{del}{79}
-\DeclareFlexSymbol{\updownarrow}{DeA}{del}{3F}
-\DeclareFlexSymbol{\Uparrow}{DeA}{del}{7E}
-\DeclareFlexSymbol{\Downarrow}{DeA}{del}{7F}
-\DeclareFlexSymbol{\Updownarrow}{DeA}{del}{77}
-\DeclareFlexSymbol{\backslash}{DeB}{del}{0F}
+\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
+\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
+\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
+\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
+\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
+\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
+\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
+\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
+\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
+\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
+\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
+\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
+\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
+\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
+\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
+\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
+\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
+\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
+\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
+\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
+\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
+\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
+\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
+\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
+\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
+\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
+\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
@@ -363,6 +368,7 @@
\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
\mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
\edef\Relbar{\mathchar\string"\hexnumber@\symupright3D }
+\ExplSyntaxOff
\endinput
%%
%% End of file `mathpazo.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/mathptmx.sym b/Master/texmf-dist/tex/latex/mh/mathptmx.sym
index d480cfee812..5b9ee0bd877 100644
--- a/Master/texmf-dist/tex/latex/mh/mathptmx.sym
+++ b/Master/texmf-dist/tex/latex/mh/mathptmx.sym
@@ -28,21 +28,25 @@
%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
%%
-\ProvidesSymbols{mathptmx}[2007/12/19 v0.2]
-\@xp\xdef\csname mg@OT1\endcsname{\hexnumber@\symoperators}
-\@xp\xdef\csname mg@OML\endcsname{\hexnumber@\symletters}
-\@xp\xdef\csname mg@OMS\endcsname{\hexnumber@\symsymbols}
-\@xp\xdef\csname mg@OMX\endcsname{\hexnumber@\symlargesymbols}
-\gdef\mg@bin{\mg@OMS}
-\gdef\mg@del{\mg@OMX}
-\xdef\mg@digit{\@xp\@nx\csname mg@OT1\endcsname}
-\gdef\mg@latin{\mg@OML}
-\global\let\mg@Latin\mg@latin
-\global\let\mg@greek\mg@latin
-\global\let\mg@Greek\mg@digit
-\global\let\mg@rel\mg@bin
-\global\let\mg@ord\mg@bin
-\global\let\mg@cop\mg@del
+\ProvidesSymbols{mathptmx}[2010/07/11 v0.3]
+\ExplSyntaxOn
+\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
+\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
+\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
+\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
+\cs_gset:Npx\mg@bin{\mg@OMS}
+\cs_gset:Npx\mg@del{\mg@OMX}
+\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
+\cs_gset:Npn\mg@latin{\mg@OML}
+\cs_gset_eq:NN\mg@Latin\mg@latin
+\cs_gset_eq:NN\mg@greek\mg@latin
+\cs_gset_eq:NN\mg@Greek\mg@digit
+\@ifpackagewith{mathptmx}{slantedGreek}{%
+ \cs_gset_eq:NN\mg@Greek\mg@latin
+}{}
+\cs_gset_eq:NN\mg@rel\mg@bin
+\cs_gset_eq:NN\mg@ord\mg@bin
+\cs_gset_eq:NN\mg@cop\mg@del
\DeclareFlexSymbol{!} {Pun}{OT1}{21}
\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
@@ -268,7 +272,7 @@
\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\def\cdotp{\mathpunct{\cdotOrd}}
+\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
@@ -283,40 +287,40 @@
\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
\DeclareFlexSymbol{\oint}{COi}{cop}{48}
\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-\DeclareFlexSymbol{\rangle}{DeR}{del}{0B}
-\DeclareFlexSymbol{\langle}{DeL}{del}{0A}
-\DeclareFlexSymbol{\rbrace}{DeR}{del}{09}
-\DeclareFlexSymbol{\lbrace}{DeL}{del}{08}
-\DeclareFlexSymbol{\rceil}{DeR}{del}{07}
-\DeclareFlexSymbol{\lceil}{DeL}{del}{06}
-\DeclareFlexSymbol{\rfloor}{DeR}{del}{05}
-\DeclareFlexSymbol{\lfloor}{DeL}{del}{04}
-\DeclareFlexSymbol{(}{DeL}{del}{00}
-\DeclareFlexSymbol{)}{DeR}{del}{01}
-\DeclareFlexSymbol{[}{DeL}{del}{02}
-\DeclareFlexSymbol{]}{DeR}{del}{03}
-\DeclareFlexSymbol{\lVert}{DeL}{del}{0D}
-\DeclareFlexSymbol{\rVert}{DeR}{del}{0D}
-\DeclareFlexSymbol{\lvert}{DeL}{del}{0C}
-\DeclareFlexSymbol{\rvert}{DeR}{del}{0C}
-\DeclareFlexSymbol{\Vert}{DeB}{del}{0D}
-\DeclareFlexSymbol{\vert}{DeB}{del}{0C}
-\DeclareFlexSymbol{|}{DeB}{del}{0C}
-\DeclareFlexSymbol{/}{DeB}{del}{0E}
-\DeclareFlexSymbol{\lmoustache}{DeL}{del}{40}
-\DeclareFlexSymbol{\rmoustache}{DeR}{del}{41}
-\DeclareFlexSymbol{\lgroup}{DeL}{del}{3A}
-\DeclareFlexSymbol{\rgroup}{DeR}{del}{3B}
-\DeclareFlexSymbol{\bracevert}{DeB}{del}{3E}
-\DeclareFlexSymbol{\arrowvert}{DeB}{del}{3C}
-\DeclareFlexSymbol{\Arrowvert}{DeB}{del}{3D}
-\DeclareFlexSymbol{\uparrow}{DeA}{del}{78}
-\DeclareFlexSymbol{\downarrow}{DeA}{del}{79}
-\DeclareFlexSymbol{\updownarrow}{DeA}{del}{3F}
-\DeclareFlexSymbol{\Uparrow}{DeA}{del}{7E}
-\DeclareFlexSymbol{\Downarrow}{DeA}{del}{7F}
-\DeclareFlexSymbol{\Updownarrow}{DeA}{del}{77}
-\DeclareFlexSymbol{\backslash}{DeB}{del}{0F}
+\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
+\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
+\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
+\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
+\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
+\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
+\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
+\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
+\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
+\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
+\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
+\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
+\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
+\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
+\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
+\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
+\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
+\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
+\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
+\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
+\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
+\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
+\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
+\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
+\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
+\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
+\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
+\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
+\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
@@ -363,6 +367,7 @@
\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
\mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
\def\Relbar{\mathchar"3D }
+\ExplSyntaxOff
\endinput
%%
%% End of file `mathptmx.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/mathstyle.sty b/Master/texmf-dist/tex/latex/mh/mathstyle.sty
index 1c10bf4b1ab..92803d7aee3 100644
--- a/Master/texmf-dist/tex/latex/mh/mathstyle.sty
+++ b/Master/texmf-dist/tex/latex/mh/mathstyle.sty
@@ -27,7 +27,7 @@
%% and the derived files
%% mathstyle.sty, mathstyle.pdf, mathstyle.ins, mathstyle.drv.
%%
-\ProvidesPackage{mathstyle}[2008/07/23 v0.85]
+\ProvidesPackage{mathstyle}[2008/11/25 v0.88]
\providecommand\@saveprimitive[2]{%
\begingroup
\edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
@@ -148,20 +148,23 @@
\or
\@@scriptstyle
\or
- \@@scriptscripstyle
+ \@@scriptscriptstyle
\fi}
\DeclareOption{mathactivechars}{%
\catcode`\^=12\relax
\catcode`\_=12\relax
-\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax }}
+\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax}%
+}
\DeclareOption{activechars}{%
\catcode`\^=13\relax
\catcode`\_=13\relax
-\AtBeginDocument{\catcode`\_=12\relax \catcode`\_=13\relax }}
+\AtBeginDocument{\catcode`\^=13\relax \catcode`\_=13\relax}%
+}
\DeclareOption{noactivechars}{%
\catcode`\^=7\relax
\catcode`\_=8\relax
-\AtBeginDocument{\catcode`\_=7\relax \catcode`\_=8\relax }}
+\AtBeginDocument{\catcode`\^=7\relax \catcode`\_=8\relax}%
+}
\ExecuteOptions{mathactivechars}
\ProcessOptions\relax
\ifnum\catcode`\^=13\relax
diff --git a/Master/texmf-dist/tex/latex/mh/mathtools.sty b/Master/texmf-dist/tex/latex/mh/mathtools.sty
index 64a293168d2..989ed7e6fd6 100644
--- a/Master/texmf-dist/tex/latex/mh/mathtools.sty
+++ b/Master/texmf-dist/tex/latex/mh/mathtools.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2002-2007 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2002-2010 by Morten Hoegholm <mh.ctan@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -27,8 +27,8 @@
%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
%%
\ProvidesPackage{mathtools}%
- [2008/08/01 v1.06 mathematical typesetting tools (MH)]
-\RequirePackage{keyval,calc}
+ [2010/07/11 v1.08 mathematical typesetting tools (MH)]
+\RequirePackage{keyval,calc,graphicx}
\RequirePackage{mhsetup}[2007/12/03]
\MHInternalSyntaxOn
\def\MT_options_name:{mathtools}
@@ -574,19 +574,55 @@
}
}
}
-\def\MT_start_cases:nnn #1#2#3{ % #1=sep,#2=preamble,#3=delim
+\def\MHempty{}
+\def\DeclarePairedDelimiterX#1[#2]#3#4#5#6{%
+ \@ifdefinable{#1}{
+ \ifnum#2>8\relax
+ \PackageError{mathtools}{No~ more~ than~ 8~ arguments}{}
+ \else
+ \ifnum#2<1\relax
+ \PackageError{mathtools}{Macro~ need~ 1~ or~ more~ arguments}{}
+ \fi
+ \fi
+ % store the argument number in a temp counter
+ \@tempcnta=#2
+ \@xp\@xp\@xp
+ \newcommand
+ \@xp\csname MT_delim_\MH_cs_to_str:N #1 _star:\endcsname
+ [\@tempcnta]
+ {
+ \left#3 #6 \right#4
+ }
+ \advance\@tempcnta by 1
+ \@xp\@xp\@xp
+ \newcommand
+ \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
+ [\@tempcnta][\MHempty]
+ {
+ \mathopen{\let\MHempty\@gobble\@nameuse {\MH_cs_to_str:N ##1 l} #3}
+ #5
+ \mathclose{\let\MHempty\@gobble\@nameuse {\MH_cs_to_str:N ##1 r} #4}
+ }
+ \DeclareRobustCommand{#1}{
+ \@ifstar
+ {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
+ {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
+ }
+ }
+}
+\def\MT_start_cases:nnnn #1#2#3#4{ % #1=sep,#2=lpreamble,#3=rpreamble,#4=delim
\RIfM@\else
\nonmatherr@{\begin{\@currenvir}}
\fi
\MH_group_align_safe_begin:
- \left#3
+ \left#4
\vcenter \bgroup
\Let@ \chardef\dspbrk@context\@ne \restore@math@cr
\let \math@cr@@\AMS@math@cr@@
\spread@equation
\ialign\bgroup
- \strut@$\m@th \displaystyle{##}$\hfil &#1\strut@
- #2
+ \strut@#2 &#1\strut@
+ #3
\crcr
}
\def\MH_end_cases:{\crcr\egroup
@@ -594,18 +630,23 @@
\egroup
\MH_group_align_safe_end:
}
-\newcommand*\newcases[5]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right
+\newcommand*\newcases[6]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right
\newenvironment{#1}
- {\MT_start_cases:nnn {#2}{#3}{#4}}
- {\MH_end_cases:\right#5}
+ {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
+ {\MH_end_cases:\right#6}
}
-\newcommand*\renewcases[5]{
+\newcommand*\renewcases[6]{
\renewenvironment{#1}
- {\MT_start_cases:nnn {#2}{#3}{#4}}
- {\MH_end_cases:\right#5}
-}
-\newcases{dcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
-\newcases{dcases*}{\quad}{{##}\hfil}{\lbrace}{.}
+ {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
+ {\MH_end_cases:\right#6}
+}
+\newcases{dcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
+\newcases{dcases*}{\quad}{$\m@th\displaystyle{##}$\hfil}{{##}\hfil}{\lbrace}{.}
+\newcases{rcases}{\quad}{$\m@th{##}$\hfil}{$\m@th{##}$\hfil}{.}{\rbrace}
+\newcases{rcases*}{\quad}{$\m@th{##}$\hfil}{{##}\hfil}{.}{\rbrace}
+\newcases{drcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{.}{\rbrace}
+\newcases{drcases*}{\quad}{$\m@th\displaystyle{##}$\hfil}{{##}\hfil}{.}{\rbrace}
+\newcases{cases*}{\quad}{$\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{.}
\def\MT_matrix_begin:N #1{%
\hskip -\arraycolsep
\MH_let:NwN \@ifnextchar \MH_nospace_ifnextchar:Nnn
@@ -790,6 +831,17 @@
\kern\@tempdima%
&
\kern-\@tempdima}
+\newcommand\Aboxed[1]{\@Aboxed#1\ENDDNE}
+\def\@Aboxed#1&#2\ENDDNE{%
+ \settowidth\@tempdima{$\displaystyle#1{}$}%
+ \addtolength\@tempdima{\fboxsep}%
+ \addtolength\@tempdima{\fboxrule}%
+ \global\@tempdima=\@tempdima
+ \kern\@tempdima
+ &
+ \kern-\@tempdima
+ \boxed{#1#2}
+}
\MHInternalSyntaxOff
\def\ArrowBetweenLines{\relax
\iffalse{\fi\ifnum0=`}\fi
@@ -800,7 +852,12 @@
{\ArrowBetweenLines@auxII{#1}[\Updownarrow]}}
\def\ArrowBetweenLines@auxII#1[#2]{%
\ifnum0=`{\fi \iffalse}\fi
- \crcr
+ \expandafter\in@\expandafter{\@currenvir}%
+ {alignedat,aligned,gathered}%
+ \ifin@ \else
+ \notag
+ \fi%
+ \\
\noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}%
\noalign{\expandafter\in@\expandafter{\@currenvir}%
{alignedat,aligned,gathered}%
@@ -809,6 +866,41 @@
\if#1 &&\quad #2\else #2\quad\fi
\\\noalign{\nobreak\vskip-\lineskip}}
\MHInternalSyntaxOn
+\def\MH_nrotarrow:NN #1#2{%
+ \setbox0=\hbox{$\m@th#1\uparrow$}\dimen0=\dp0
+ \setbox0=\hbox{%
+ \reflectbox{\rotatebox[origin=c]{90}{$\m@th#1\mkern2.22mu #2$}}}%
+ \dp0=\dimen0 \box0 \mkern2.3965mu
+}
+\def\MH_nuparrow: {%
+ \mathrel{\mathpalette\MH_nrotarrow:NN\nrightarrow} }
+\def\MH_ndownarrow: {%
+ \mathrel{\mathpalette\MH_nrotarrow:NN\nleftarrow} }
+\AtBeginDocument{%
+ \@ifundefined{nrightarrow}{%
+ \providecommand\nuparrow{%
+ \PackageError{mathtools}{\string\nuparrow\space~ is~
+ constructed~ from~ \string\nrightarrow,~ which~ is~ not~
+ provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
+ }}{ \providecommand\nuparrow{\MH_nuparrow:}}
+ \@ifundefined{nleftarrow}{%
+ \providecommand\ndownarrow{%
+ \PackageError{mathtools}{\string\ndownarrow\space~ is~
+ constructed~ from~ \string\nleftarrow,~ which~ is~ not~
+ provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
+ }}{ \providecommand\ndownarrow{\MH_ndownarrow:}} }
+\def\MH_bigtimes_scaler:N #1{%
+ \vcenter{\hbox{#1$\m@th\mkern-2mu\times\mkern-2mu$}}}
+\def\MH_bigtimes_inner: {
+ \mathchoice{\MH_bigtimes_scaler:N \huge} % display style
+ {\MH_bigtimes_scaler:N \LARGE} % text style
+ {\MH_bigtimes_scaler:N {}} % script style
+ {\MH_bigtimes_scaler:N \footnotesize} % script script style
+}
+\def\MH_csym_bigtimes: {\mathop{\MH_bigtimes_inner:}\displaylimits}
+\AtBeginDocument{
+ \providecommand\bigtimes{\MH_csym_bigtimes:}
+}
\def\shortintertext#1{%
\ifvmode\else\\\@empty\fi
\noalign{%
diff --git a/Master/texmf-dist/tex/latex/mh/msabm.sym b/Master/texmf-dist/tex/latex/mh/msabm.sym
index 1afa17ab0c8..d24fc7fd864 100644
--- a/Master/texmf-dist/tex/latex/mh/msabm.sym
+++ b/Master/texmf-dist/tex/latex/mh/msabm.sym
@@ -29,9 +29,10 @@
%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
%%
\ProvidesSymbols{msabm}[2001/09/08 v0.91]
+\ExplSyntaxOn
\RequirePackage{amsfonts}\relax
-\@xp\xdef\csname mg@MSA\endcsname{\hexnumber@\symAMSa}%
-\@xp\xdef\csname mg@MSB\endcsname{\hexnumber@\symAMSb}%
+\cs_gset:cpx{mg@MSA}{\hexnumber@\symAMSa}%
+\cs_gset:cpx{mg@MSB}{\hexnumber@\symAMSb}%
\DeclareFlexSymbol{\boxdot} {Bin}{MSA}{00}
\DeclareFlexSymbol{\boxplus} {Bin}{MSA}{01}
\DeclareFlexSymbol{\boxtimes} {Bin}{MSA}{02}
@@ -248,6 +249,7 @@
\DeclareFlexSymbol{\hslash} {Ord}{MSB}{7D}
%%\DeclareFlexSymbol{\hbar} {Ord}{MSB}{7E}
\DeclareFlexSymbol{\backepsilon} {Rel}{MSB}{7F}
+\ExplSyntaxOff
\endinput
%%
%% End of file `msabm.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/xfrac.sty b/Master/texmf-dist/tex/latex/mh/xfrac.sty
index 1a6d0ff7d60..f5d92e5b979 100644
--- a/Master/texmf-dist/tex/latex/mh/xfrac.sty
+++ b/Master/texmf-dist/tex/latex/mh/xfrac.sty
@@ -8,13 +8,15 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2004, 2008-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2004, 2008, 2009 by Morten Hoegholm <mh.ctan@gmail.com>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
-%% version 1.3c of this license or (at your option) any later
+%% version 1.3 of this license or (at your option) any later
%% version. The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
@@ -25,374 +27,214 @@
%% xfrac.sty, xfrac.pdf, xfrac.ins, xfrac.drv.
%%
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{xfrac}{2010/02/02}{0.3}{Text fractions}
-\RequirePackage { amstext , graphicx , l3keys2e , textcomp , xtemplate }
-\keys_define:nn { xfrac } {
- cm-recommended .choice:,
- cm-recommended /
- false .code:n =
- { \bool_set_true:N \l_xfrac_cm_std_bool },
- cm-recommended /
- true .code:n =
- { \bool_set_false:N \l_xfrac_cm_std_bool },
- cm-recommended .default:n = { true },
- cm-standard .bool_set:N = \l_xfrac_cm_std_bool
-}
-\ProcessKeysOptions { xfrac }
+\ProvidesExplPackage{xfrac}{2009/08/10}{0.2a}{Text fractions}
+\RequirePackage{textcomp,graphicx,amstext}
+\RequirePackage{template}[2008/08/03]
+\RequirePackage{xparse}[2008/08/03]
+\bool_new:N \g_cm_recommended_bool
+\DeclareOption{cm-recommended}
+ { \bool_gset_true:N \g_cm_recommended_bool }
+\DeclareOption{cm-standard}
+ { \bool_gset_false:N \g_cm_recommended_bool }
+\ExecuteOptions{cm-recommended}
+\ProcessOptions\relax
+\box_new:N \l_xfrac_temp_box
\box_new:N \l_xfrac_slash_box
-\box_new:N \l_xfrac_tmp_box
-\cs_new:Npn \xfrac_tmp:w { }
-\dim_new:N \l_xfrac_denominator_bot_sep_dim
-\dim_new:N \l_xfrac_numerator_bot_sep_dim
-\dim_new:N \l_xfrac_numerator_top_sep_dim
-\dim_new:N \l_xfrac_slash_left_sep_dim
-\dim_new:N \l_xfrac_slash_right_sep_dim
-\tl_new:N \l_xfrac_denominator_font_tl
-\tl_new:N \l_xfrac_hscale_tl
-\tl_new:N \l_xfrac_numerator_font_tl
-\tl_new:N \l_xfrac_phantom_tl
-\tl_new:N \l_xfrac_scale_factor_tl
-\tl_new:N \l_xfrac_slash_left_msep_tl
-\tl_new:N \l_xfrac_slash_right_msep_tl
-\tl_new:N \l_xfrac_slash_symbol_tl
-\tl_new:N \l_xfrac_slash_symbol_font_tl
-\tl_new:N \l_xfrac_vscale_tl
-\cs_new_nopar:Npn \xfrac_fontscale:
-\cs_new:Npn \xfrac_math:n #1 { }
-\cs_new_nopar:Npn \xfrac_denominator_font_change: { }
-\cs_new:Npn \xfrac_denominator_format:n #1 { }
-\cs_new_nopar:Npn \xfrac_numerator_font_change: { }
-\cs_new:Npn \xfrac_numerator_format:n #1 { }
-\cs_new_nopar:Npn \xfrac_relscale: { }
-\cs_new_nopar:Npn \xfrac_slash_symbol_font_change: { }
-\cs_new:Npn \xfrac_slash_symbol_format:n #1 { }
-\cs_new:Npn \xfrac_text_or_math:n #1 { }
-\DeclareObjectType { xfrac } { 3 }
-\DeclareTemplateInterface { xfrac } { text } { 3 } {
- denominator-bot-sep : length = \c_max_dim ,
- denominator-font : tokenlist = \f@family ,
- denominator-format : function 1 = #1 ,
- h-scale : tokenlist = 1 ,
- math-mode : choice { false , true }
- = false ,
- numerator-font : tokenlist = \f@family ,
- numerator-format : function 1 = #1 ,
- numerator-bot-sep : length = \c_max_dim ,
- numerator-top-sep : length = \c_max_dim ,
- phantom : tokenlist = 8 ,
- scale-factor : tokenlist = 0.83333 ,
- scale-relative : choice { false , true }
- = true ,
- scaling : choice { false , true }
- = true ,
- slash-left-kern : length = 0 pt ,
- slash-left-mkern : tokenlist = -2 mu ,
- slash-right-kern : length = 0 pt ,
- slash-right-mkern : tokenlist = -1 mu ,
- slash-symbol : tokenlist = \textfractionsolidus ,
- slash-symbol-font : tokenlist = \f@family ,
- slash-symbol-format : function 1 = #1 ,
- v-scale : tokenlist = 1 ,
-}
-\DeclareTemplateCode { xfrac } { text } { 3 }
- {
- denominator-bot-sep = \l_xfrac_denominator_bot_sep_dim ,
- denominator-font = \l_xfrac_denominator_font_tl ,
- denominator-format = \xfrac_denominator_format:n ,
- h-scale = \l_xfrac_hscale_tl ,
- math-mode =
- {
- false = \cs_set_eq:NN \xfrac_math:n \use:n,
- true = \cs_set_eq:NN \xfrac_math:n \ensuremath
- },
- numerator-font = \l_xfrac_numerator_font_tl ,
- numerator-format = \xfrac_numerator_format:n ,
- numerator-bot-sep = \l_xfrac_numerator_bot_sep_dim ,
- numerator-top-sep = \l_xfrac_numerator_top_sep_dim ,
- phantom = \l_xfrac_phantom_tl ,
- scale-factor = \l_xfrac_scale_factor_tl ,
- scale-relative =
- {
- false =
- \cs_set_nopar:Npn \xfrac_relscale:
- {
- \dim_eval:n
- {
- \box_ht:N \l_xfrac_tmp_box
- + \box_dp:N \l_xfrac_tmp_box
- }
- },
- true =
- \cs_set_nopar:Npn \xfrac_relscale:
- { \box_ht:N \l_xfrac_slash_box }
- },
- scaling =
- {
- false = \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing:,
- true =
- \cs_set_nopar:Npn \xfrac_fontscale:
- {
- \fontsize { \l_xfrac_scale_factor_tl \xfrac_relscale: }
- { \c_zero_dim }
- \selectfont
- }
- },
- slash-left-kern = \l_xfrac_slash_left_sep_dim ,
- slash-left-mkern = \l_xfrac_slash_left_msep_tl ,
- slash-right-kern = \l_xfrac_slash_right_sep_dim ,
- slash-right-mkern = \l_xfrac_slash_right_msep_tl ,
- slash-symbol = \l_xfrac_slash_symbol_tl ,
- slash-symbol-font = \l_xfrac_slash_symbol_font_tl ,
- slash-symbol-format = \xfrac_slash_symbol_format:n ,
- v-scale = \l_xfrac_vscale_tl
+\DeclareTemplateType{xfrac}{3}
+\DeclareTemplate{xfrac}{text}{3}{
+ numerator-font = n [\f@family] \xfrac_numeratorfont:,
+ numerator-format = f1 [#1] \xfrac_numeratorformat:n,
+ slash-symbol = n [\textfractionsolidus]
+ \xfrac_slashsymbol:,
+ slash-symbol-font = n [\f@family] \xfrac_slashsymbolfont:,
+ slash-symbol-format = f1 [#1] \xfrac_slashsymbolformat:n,
+ denominator-font = n [\f@family] \xfrac_denominatorfont:,
+ denominator-format = f1 [#1] \xfrac_denominatorformat:n,
+ h-scale = n [1] \xfrac_hscale:,
+ v-scale = n [1] \xfrac_vscale:,
+ scale-factor = n [.83333] \xfrac_scalefactor:,
+ scale-relative = s [true]
+ { \cs_set:Npn \xfrac_relscale: {\box_ht:N\l_xfrac_slash_box}}
+ { \cs_set:Npn \xfrac_relscale: {
+ \dim_eval:n { \box_ht:N\l_xfrac_temp_box + \box_dp:N\l_xfrac_temp_box }} },
+ scaling = s [true]
+ {\cs_set:Npn\xfrac_fontscale: {
+ \fontsize{\xfrac_scalefactor: \xfrac_relscale:}{\c_zero_dim}\selectfont}}
+ { \cs_set_eq:NN \xfrac_fontscale: \prg_do_nothing: },
+ numerator-top-sep = L [\c_max_dim] \l_xfrac_numeratortopsep_fdim,
+ numerator-bot-sep = L [\c_max_dim] \l_xfrac_numeratorbotsep_fdim,
+ denominator-bot-sep = L [\c_max_dim] \l_xfrac_denominatorbotsep_fdim,
+ slash-right-kern = L [0pt] \l_xfrac_slashrightsep_fdim,
+ slash-left-kern = L [0pt] \l_xfrac_slashleftsep_fdim,
+ slash-right-mkern = n [-2mu] \l_xfrac_slashrightmsep_fmu,
+ slash-left-mkern = n [-1mu] \l_xfrac_slashleftmsep_fmu,
+ math-mode = s [false] { \cs_set_eq:NN \xfrac_math: \ensuremath }
+ { \cs_set_eq:NN \xfrac_math: \use:n },
+ phantom = n [8] \xfrac_phantom:,
+}{
+ \DoParameterAssignments
+ \mode_if_math:TF{
+ \cs_set_eq:NN \xfrac_textormath: \text
+ \cs_set:Npx \xfrac_slashfontchange: {\tex_fam:D \xfrac_slashsymbolfont: }
+ \cs_set:Npx \xfrac_numeratorfontchange: {\tex_fam:D \xfrac_numeratorfont: }
+ \cs_set:Npx \xfrac_denominatorfontchange: {\tex_fam:D \xfrac_denominatorfont: }
+ }{
+ \cs_set_eq:NN \xfrac_textormath: \mbox
+ \cs_set:Npn\xfrac_slashfontchange: {
+ \fontfamily{\xfrac_slashsymbolfont: }\selectfont}
+ \cs_set:Npn\xfrac_numeratorfontchange: {
+ \fontfamily{\xfrac_numeratorfont: }\selectfont}
+ \cs_set:Npn\xfrac_denominatorfontchange: {
+ \fontfamily{\xfrac_denominatorfont: }\selectfont}
}
- {
- \AssignTemplateKeys
- \mode_if_math:TF
+ \xfrac_textormath: {
+ \m@th
+ \sbox\l_xfrac_temp_box {\xfrac_math: {\vphantom{(}}}
+ \sbox\l_xfrac_slash_box {
+ \xfrac_math: {
+ \xfrac_slashsymbolformat:n {
+ \xfrac_math: {
+ \xfrac_slashfontchange:
+ \IfValueTF{#2}{#2}{\xfrac_slashsymbol: }
+ }
+ }
+ }
+ }
+ \dim_compare:nNnTF \l_xfrac_numeratortopsep_fdim = \c_max_dim
+ {
+ \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim
{
- \cs_set_eq:NN \xfrac_text_or_math:n \text
- \cs_set_nopar:Npx \xfrac_denominator_font_change:
- { \tex_fam:D \l_xfrac_denominator_font_tl }
- \cs_set_nopar:Npx \xfrac_numerator_font_change:
- { \tex_fam:D \l_xfrac_numerator_font_tl }
- \cs_set_nopar:Npx \xfrac_slash_symbol_font_change:
- { \tex_fam:D \l_xfrac_slash_symbol_font_tl }
+ \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box
+ -\box_dp:N\l_xfrac_slash_box-\height}}
+ }{
+ \cs_set:Npn\xfrac_next: {\raisebox{\l_xfrac_numeratorbotsep_fdim }}
}
+ }
+ {
+ \dim_compare:nNnTF \l_xfrac_numeratorbotsep_fdim = \c_max_dim
{
- \cs_set_eq:NN \xfrac_text_or_math:n \mbox
- \cs_set_nopar:Npn \xfrac_denominator_font_change:
- {
- \fontfamily { \l_xfrac_denominator_font_tl }
- \selectfont
- }
- \cs_set_nopar:Npn \xfrac_numerator_font_change:
- {
- \fontfamily { \l_xfrac_numerator_font_tl }
- \selectfont
- }
- \cs_set_nopar:Npn \xfrac_slash_symbol_font_change:
- {
- \fontfamily { \l_xfrac_slash_symbol_font_tl }
- \selectfont
+ \cs_set:Npn\xfrac_next: {
+ \raisebox{
+ \box_ht:N\l_xfrac_slash_box - \l_xfrac_numeratortopsep_fdim
+ - \height
}
+ }
}
- \xfrac_text_or_math:n
{
- \m@th
- \hbox_set:Nn \l_xfrac_tmp_box
- { \xfrac_math:n { \vphantom { ( ) } } }
- \hbox_set:Nn \l_xfrac_slash_box
- {
- \xfrac_math:n
- {
- \xfrac_slash_symbol_format:n
- {
- \xfrac_math:n
- {
- \xfrac_slash_symbol_font_change:
- \IfNoValueTF {#2}
- { \l_xfrac_slash_symbol_tl } {#2}
- }
- }
- }
- }
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- {
- \box_ht:N \l_xfrac_slash_box
- - \box_dp:N \l_xfrac_slash_box
- - \height
- }
- }
- \dim_compare:nNnTF
- { \l_xfrac_numerator_top_sep_dim } = { \c_max_dim }
- {
- \dim_compare:nNnF
- { \l_xfrac_numerator_bot_sep_dim } = { \c_max_dim }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- { \dim_use:N \l_xfrac_numerator_bot_sep_dim }
- }
- }
- }
- {
- \dim_compare:nNnTF
- { \l_xfrac_numerator_bot_sep_dim } = { \c_max_dim }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- {
- \box_ht:N \l_xfrac_slash_box
- - \dim_use:N \l_xfrac_numerator_top_sep_dim
- - \height
- }
- }
- }
- {
- \msg_error:nn { xfrac }
- { over-specified-numerator-sep }
- }
- }
- \xfrac_tmp:w
- {
- \xfrac_fontscale:
- \xfrac_numerator_format:n
- {
- \scalebox { \l_xfrac_hscale_tl } [ \l_xfrac_vscale_tl ]
- {
- \xfrac_math:n
- {
- \xfrac_numerator_font_change:
- {
- \vphantom { \l_xfrac_phantom_tl }
- #1
- }
- }
- }
- }
- }
- \xfrac_math:n
- { % THIS IS JUST WRONG!
- \mode_if_math:TF
- { \tex_mskip:D \l_xfrac_slash_right_msep_tl }
- { \tex_hskip:D \l_xfrac_slash_right_sep_dim }
- }
- \box_use:N \l_xfrac_slash_box
- \xfrac_math:n
- {
- \mode_if_math:TF
- { \tex_mskip:D \l_xfrac_slash_left_msep_tl }
- { \tex_hskip:D \l_xfrac_slash_left_sep_dim }
- }
- \dim_compare:nNnTF
- { \l_xfrac_denominator_bot_sep_dim } = { \c_max_dim }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- { \raisebox { - \box_dp:N \l_xfrac_slash_box } }
- }
- {
- \cs_set_nopar:Npn \xfrac_tmp:w
- {
- \raisebox
- { \dim_use:N \l_xfrac_denominator_bot_sep_dim }
- }
- }
- \xfrac_tmp:w
- {
- \xfrac_fontscale:
- \xfrac_denominator_format:n
- {
- \scalebox { \l_xfrac_hscale_tl } [ \l_xfrac_vscale_tl ]
- {
- \xfrac_math:n
- {
- \xfrac_denominator_font_change:
- {
- \vphantom { \l_xfrac_phantom_tl }
- #3
- }
- }
- }
- }
- }
+ \PackageError{xfrac}
+ {You~ have~ specified~ both~ numerator-top-sep~ and~
+ numerator-bot-sep}
+ {I~ will~ pretend~ you~ didn't~ specify~ any~ of ~them}
+ \cs_set:Npn\xfrac_next: {\raisebox{\box_ht:N\l_xfrac_slash_box
+ -\box_dp:N\l_xfrac_slash_box-\height}}
+ }
+ }
+ \xfrac_next: {
+ \xfrac_fontscale:
+ \xfrac_numeratorformat:n {
+ \scalebox{\xfrac_hscale: }[\xfrac_vscale: ]
+ { \xfrac_math:{ \xfrac_numeratorfontchange:
+ {\vphantom{\xfrac_phantom: }#1} } }
}
+ }
+ \xfrac_math: { % THIS IS JUST WRONG!
+ \mode_if_math:TF { \mskip \l_xfrac_slashrightmsep_fmu }
+ {\hskip \l_xfrac_slashrightsep_fdim}
+ }
+ \usebox\l_xfrac_slash_box
+ \xfrac_math: {
+ \mode_if_math:TF {
+ \mskip \l_xfrac_slashleftmsep_fmu
+ }{
+ \hskip \l_xfrac_slashleftsep_fdim
+ } }
+ \dim_compare:nNnTF \l_xfrac_denominatorbotsep_fdim=\c_max_dim
+ { \raisebox{-\box_dp:N \l_xfrac_slash_box} }
+ {
+ \raisebox{\l_xfrac_denominatorbotsep_fdim}
+ }
+ {
+ \xfrac_fontscale:
+ \xfrac_denominatorformat:n {
+ \scalebox{\xfrac_hscale:}[\xfrac_vscale:]
+ { \xfrac_math: { \xfrac_denominatorfontchange:
+ {\vphantom{\xfrac_phantom: }#3} } }
+ }
+ }
}
-\DeclareRestrictedTemplate { xfrac } { text } { math } {
- numerator-font = \number \fam ,
- slash-symbol = / ,
- slash-symbol-font = \number \fam ,
- denominator-font = \number \fam ,
- scale-factor = 0.7 ,
- scale-relative = false ,
- scaling = true ,
- numerator-top-sep = 0 pt ,
- denominator-bot-sep = 0 pt ,
- math-mode = true ,
- phantom = (
}
-\DeclareInstance { xfrac } { default } { text } { }
-\DeclareInstance { xfrac } { mathdefault } { math } { }
-\DeclareCollectionInstance { plainmath } { xfrac } { mathdefault }
- { math }{
- denominator-bot-sep = 0 pt ,
- numerator-bot-sep = 0 pt ,
- numerator-top-sep = \c_max_dim ,
- scale-factor = 1 ,
- scale-relative = false ,
- scaling = true ,
- slash-right-mkern = 0mu ,
- slash-left-mkern = 0mu
+\DeclareRestrictedTemplate{xfrac}{math}{text}{
+ numerator-font = \number\fam,
+ slash-symbol = /,
+ slash-symbol-font = \number\fam,
+ denominator-font = \number\fam,
+ scale-factor = 0.7,
+ scale-relative = false,
+ scaling = true,
+ numerator-top-sep = 0pt,
+ denominator-bot-sep = 0pt,
+ math-mode = true,
+ phantom = (,
}
-\DeclareInstance { xfrac } { cmr } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.2 ex ,
- slash-left-kern = -0.1 em ,
- slash-right-kern = -0.1 em
+\DeclareInstance{xfrac}{default}{text}{ }
+\DeclareInstance{xfrac}{mathdefault}{math}{ }
+\DeclareCollectionInstance{plainmath}{xfrac}{mathdefault}{math}{
+ denominator-bot-sep=0pt,
+ numerator-bot-sep=0pt,
+ numerator-top-sep=\c_max_dim,
+ scale-factor = 1,
+ scale-relative = false,
+ scaling = true,
+ slash-right-mkern=0mu,
+ slash-left-mkern=0mu,
}
-\DeclareInstance { xfrac } { cmss } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.2 ex ,
- slash-left-kern = -0.1 em ,
- slash-right-kern = -0.1 em
+\DeclareInstance{xfrac}{cmr}{text}{
+ denominator-bot-sep=0pt,
+ numerator-top-sep=\DelayEvaluation{.2ex},
+ slash-left-kern=\DelayEvaluation{-.1em},
+ slash-right-kern=\DelayEvaluation{-.1em},
}
-\DeclareInstance { xfrac } { cmtt } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.2 ex ,
- slash-left-kern = -0.1 em ,
- slash-right-kern = -0.1 em
+\DeclareInstance{xfrac}{cmss}{text}{
+ denominator-bot-sep=0pt,
+ numerator-top-sep=\DelayEvaluation{.2ex},
+ slash-left-kern=\DelayEvaluation{-.1em},
+ slash-right-kern=\DelayEvaluation{-.1em},
}
-\bool_if:NF \l_xfrac_cm_std_bool
- {
- \DeclareInstance { xfrac } { cmr } { text }
- { slash-symbol-font = ptm }
- \DeclareInstance { xfrac } { cmss } { text }
- { slash-symbol-font = ptm }
- \DeclareInstance { xfrac } { cmtt } { text }
- { slash-symbol-font = ppl }
- }
-\DeclareInstance { xfrac } { lmr } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0.1 ex ,
- slash-left-kern = -0.15 em ,
- slash-right-kern = -0.15 em
+\DeclareInstance{xfrac}{cmtt}{text}{
+ denominator-bot-sep=0pt,
+ numerator-top-sep=\DelayEvaluation{.2ex},
+ slash-left-kern=\DelayEvaluation{-.1em},
+ slash-right-kern=\DelayEvaluation{-.1em},
}
-\DeclareInstance { xfrac } { lmss } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0 pt ,
- slash-left-kern = -0.15 em ,
- slash-right-kern = -0.15 em
+\DeclareCollectionInstance{cm-recommended}{xfrac}{cmr}{text}{
+ slash-symbol-font = ptm,
}
-\DeclareInstance { xfrac } { lmtt } { text } {
- denominator-bot-sep = 0 pt ,
- numerator-top-sep = 0 pt ,
- slash-left-kern = -0.15 em ,
- slash-right-kern = -0.15 em
+\DeclareCollectionInstance{cm-recommended}{xfrac}{cmss}{text}{
+ slash-symbol-font = ptm,
}
-\msg_new:nnnn { xfrac } { over-specified-numerator-sep }
- {You have specified both numerator-top-sep and numerator-bot-sep}
- {I will pretend that you didn't specify either of them}
-\NewDocumentCommand \sfrac { o m o m } {
+\DeclareCollectionInstance{cm-recommended}{xfrac}{cmtt}{text}{
+ slash-symbol-font = ppl,
+}
+\bool_if:NT \g_cm_recommended_bool
+ {\UseCollection{xfrac}{cm-recommended}}
+\DeclareDocumentCommand \sfrac {o mom}{
\mode_if_math:TF
- {
- \IfInstanceExistTF { xfrac } { mathfam \number \fam }
- { \UseInstance { xfrac } { mathfam \number \fam } }
- { \UseInstance { xfrac } { mathdefault } }
- {#2} {#3} {#4}
- }
- {
- \IfInstanceExistTF { xfrac } {#1}
- { \UseInstance { xfrac } {#1} }
- {
- \IfInstanceExistTF { xfrac } { \f@family }
- { \UseInstance { xfrac } { \f@family } }
- { \UseInstance { xfrac } { default } }
- }
- {#2} {#3} {#4}
+{
+ \cs_set:Npx \xfrac_next: {mathfam\number\fam}
+ \IfExistsInstanceTF{xfrac}{\xfrac_next: }
+ {\UseInstance{xfrac}{\xfrac_next: }}
+ {\UseInstance{xfrac}{mathdefault}}
+ {#2}{#3}{#4}
+}
+{
+ \IfExistsInstanceTF{xfrac}{#1}
+ {\UseInstance{xfrac}{#1}{#2}{#3}{#4}}
+ {\IfExistsInstanceTF{xfrac}{\f@family}
+ {\UseInstance{xfrac}{\f@family}}
+ {\UseInstance{xfrac}{default}}
+ {#2}{#3}{#4}
}
+ }
}
\endinput
%%