summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty')
-rw-r--r--Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty34
1 files changed, 21 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty
index 20fabc43215..e8f143c468a 100644
--- a/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty
+++ b/Master/texmf-dist/tex/latex/dlfltxb/dlfltxbcodetips.sty
@@ -36,6 +36,7 @@
% inside the \noalign, not outside.
% 20080617 added \DeclareMathSymbolShorthand and \DeclareMathSet
% 20080618 redesigned and renamed \PullBack to \MoveEqLeft
+% 20080828 added better implementation of \MakeDeclareMathSetCommand
\newif\ifdlf@do@load@amssymb
@@ -315,28 +316,35 @@
\expandafter\@ifdefinable\csname \DMSS@prefix\DMSS@name\endcsname{%
\def\DMSS@overwrite{00}% okay to redefine.
}%
- \fi\if\DMSS@overwrite % Do definition or not.
- \expandafter\@firstofone
- \else\expandafter\@gobble\fi
- {\protected\expandafter\xdef\csname \DMSS@prefix\DMSS@name \endcsname{%
- \unexpanded\expandafter{\DMSS@format{#2}}%
- }}\endgroup}
-\define@key{DMSS}{format}{\def\DMSS@format{#1}}
+ \fi%
+ \if\DMSS@overwrite % Do definition or not.
+ \expandafter\@firstofone%
+ \else\expandafter\@gobble\fi%
+ {\protected\expandafter%
+ \xdef\csname \DMSS@prefix\DMSS@name \endcsname{%
+ \unexpanded\expandafter{\DMSS@format{#2}}}}%
+ \endgroup}
+\define@key{DMSS}{format}{\let\DMSS@format#1}
+\define@key{DMSS}{format*}{\def\DMSS@format{\expandafter#1\@firstofone}}
\define@key{DMSS}{name}{\def\DMSS@name{#1}}
\define@key{DMSS}{prefix}{\def\DMSS@prefix{#1}}
\define@key{DMSS}{overwrite}[true]{%
\edef\DMSS@overwrite{\csname if#1\endcsname 00\else 01\fi}}
\setkeys{DMSS}{overwrite=false}
-\newcommand\MakeDeclareShorthandCommand[3]{%
+\setkeys{DMSS}{format*=}
+\newcommand\MakeDeclareMathSetCommand[3]{%
% #1 = command name
% #2 = default prefix name
% #3 = default format
% make format macro for eacy reference
- \expandafter\@ifdefinable\csname math#2format\endcsname{\@namedef{math#2format}{#3}}
- \newcommand#1[2][]{%
- \expandafter\DeclareMathSymbolShorthand
- \expandafter{format=\csname math#2format\endcsname,prefix=#2,##1}{##2}}}
-\MakeDeclareShorthandCommand{\DeclareMathSet}{set}{\mathbb}
+ \expandafter\MakeDeclareShorthandCommandAux\csname math#2format\endcsname
+ {#1}{#2}{#3}}
+\def\MakeDeclareShorthandCommandAux#1#2#3#4{%
+ \newcommand*#1{#4}%
+ \newcommand*#2[2][]{%
+ \DeclareMathSymbolShorthand{format=#1,prefix=#3,##1}{##2}%
+ }}
+\MakeDeclareMathSetCommand{\DeclareMathSet}{numbers}{\mathbb}
}{} % is defined already so do nothing