summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/tools/bm.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/tools/bm.dtx')
-rw-r--r--Master/texmf-dist/source/latex/tools/bm.dtx61
1 files changed, 51 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/tools/bm.dtx b/Master/texmf-dist/source/latex/tools/bm.dtx
index cf1da612630..6dcefa78a65 100644
--- a/Master/texmf-dist/source/latex/tools/bm.dtx
+++ b/Master/texmf-dist/source/latex/tools/bm.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2014
+% Copyright 1993-2016
%
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
@@ -22,7 +22,8 @@
% \fi
%
% \iffalse
-%% Copyright 1996 1997 1998 1999 2002 2003 2004 David Carlisle Frank Mittelbach
+%% Copyright 1996 1997 1998 1999 2002 2003 2004 2016
+%% David Carlisle Frank Mittelbach
%%
%% Development of this package was commissioned by Y&Y Inc.
%% http://www.yandy.com
@@ -36,7 +37,7 @@
%<driver>\ProvidesFile{bm.drv}
% \fi
% \ProvidesFile{bm.dtx}
- [2014/10/28 v1.1c Bold Symbol Support (DPC/FMi)]
+ [2016/02/27 v1.2a Bold Symbol Support (DPC/FMi)]
%
% \iffalse
%<*driver>
@@ -48,7 +49,6 @@
%</driver>
% \fi
%
-% \CheckSum{944}
%
% \GetFileInfo{bm.dtx}
%
@@ -1143,9 +1143,11 @@
% \end{macrocode}
% Other command, look if it's a mathchardef token (otherwise just add
% it).
+% \changes{v1.2a}{2016/02/27}
+% {Additional quotes for testing \cs{Umathchar}}
% \begin{macrocode}
\xdef\meaning@{\meaning#1}%
- \expandafter\bm@mchar@test\meaning@""\@nil#1%
+ \expandafter\bm@mchar@test\meaning@""""\@nil#1%
% \end{macrocode}
% \changes{v1.0d}{1997/11/15}
% {New active \cs{mathcode} code.}
@@ -1345,6 +1347,27 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\bm@umathchar}
+% \changes{v1.2a}{2016/02/27}
+% {Macro added}
+% Version of \verb|\bm@mathchar| for \verb|\Umathchar|, this is easier
+% as no need to take apart the number, the match class and fam are provided
+% as distinct arguments.
+% \begin{macrocode}
+\def\bm@umathchar#1#2#3{%
+\@tempcnta#2\relax
+\count@\bm@table
+\ifx\count@=\m@ne
+% no bold
+\else
+ \advance\@tempcnta\count@
+\fi
+\bm@xadd{\Umathchar#1\space
+ \the\@tempcnta\space\space
+ #3\space}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\bm@pmb}
% \changes{v0.10}{1997/01/04}
% {Macro added}
@@ -1529,6 +1552,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\bm@umchar@}
+% \changes{v1.2a}{2016/02/27}
+% {Macro added}
+% Catcode 12 |\Umathchar|, for |\ifx| tests.
+% \begin{macrocode}
+\edef\bm@umchar@{\string\U\expandafter\@gobble\meaning\mathchar}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\bm@mchar@test}
% Test if the |\meaning| starts with |\mathchar|. If it does, grab the
% value into |\count@| and call |\bm@mathchar|, else just copy the
@@ -1536,24 +1568,33 @@
% |#1|, |#2|, |#3| are all |\meaning| produced tokens, or `dummy tokens'
% added at the time this is called. |#4| is the original token, in case
% decide not to use the |\meaning|.
+% \changes{v1.2a}{2016/02/27}
+% {Additional arguments added}
% \begin{macrocode}
-\def\bm@mchar@test#1"#2"#3\@nil#4{%
+\def\bm@mchar@test#1"#2"#3"#4"#5\@nil#6{%
\xdef\meaning@{#1}%
\ifx\meaning@\bm@mchar@
\count@"#2\relax
\bm@mathchar
\else
% \end{macrocode}
+% Test for \verb|\Umathchar|.
+% \begin{macrocode}
+ \ifx\meaning@\bm@umchar@
+ \bm@umathchar{"#2}{"#3}{"#4}%
+ \else
+% \end{macrocode}
% Some other command: copy it straight over. If it is the first thing
% added, and it is a |\relax| token, save it in |\bm@first| for use
% in |\bm@define|.
% \begin{macrocode}
- \ifx\bm@previous\@empty
- \ifx\relax#4%
- \gdef\bm@first{#4}%
+ \ifx\bm@previous\@empty
+ \ifx\relax#6%
+ \gdef\bm@first{#6}%
+ \fi
\fi
+ \bm@add{#6}%
\fi
- \bm@add{#4}%
\fi}
% \end{macrocode}
% \end{macro}