summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tudscr/mathswap.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-02 22:12:17 +0000
committerKarl Berry <karl@freefriends.org>2015-07-02 22:12:17 +0000
commit586aedcf63ecf6ea7da1c1529e5ea5ba8f5cb426 (patch)
treeb679941add6df7f6b1ee8c135b24181f992dcb65 /Master/texmf-dist/tex/latex/tudscr/mathswap.sty
parentfecdcd43eaa7f73e830159293fe22a202803086b (diff)
tudscr (2jul15)
git-svn-id: svn://tug.org/texlive/trunk@37736 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tudscr/mathswap.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tudscr/mathswap.sty36
1 files changed, 18 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/tudscr/mathswap.sty b/Master/texmf-dist/tex/latex/tudscr/mathswap.sty
index 0ea5c29909a..292fd15c671 100644
--- a/Master/texmf-dist/tex/latex/tudscr/mathswap.sty
+++ b/Master/texmf-dist/tex/latex/tudscr/mathswap.sty
@@ -34,9 +34,9 @@
%% ============================================================================
%%
%%% From File: tudscr-mathswap.dtx
-\NeedsTeXFormat{LaTeX2e}[2011/06/27]
+\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mathswap}[%
- 2015/06/11 v2.03a TUD-KOMA-Script
+ 2015/07/02 v2.04 TUD-KOMA-Script
package
(swap mathematical separators)%
]
@@ -55,6 +55,8 @@
\mathcode\expandafter`.="8000%
\mathswapon%
}
+\newcommand*\ms@commaswap{}
+\newcommand*\ms@dotswap{}
\newcommand*\mathswapon{%
\def\ms@commaswap{\@commaswap}%
\def\ms@dotswap{\@dotswap}%
@@ -63,18 +65,7 @@
\def\ms@commaswap{\ms@commachar}%
\def\ms@dotswap{\ms@dotchar}%
}
-\newcommand*\ms@commaswap{}
-\newcommand*\ms@dotswap{}
-\newcommand*\ms@token{}
-\begingroup%
- \catcode`,=\active%
- \gdef,{\futurelet\ms@token\ms@smartcomma}%
- \catcode`.=\active%
- \gdef.{\futurelet\ms@token\ms@smartdot}%
-\endgroup%
-\def\ms@smartcomma{\ms@ifnum{\ms@commaswap}{\ms@commachar}}
-\def\ms@smartdot{\ms@ifnum{\ms@dotswap}{\ms@dotchar}}
-\def\ms@ifnum#1#2{%
+\newcommand*\ms@ifnum[2]{%
\ifx\ms@token0\ms@@ifnum{#1}\else%
\ifx\ms@token1\ms@@ifnum{#1}\else%
\ifx\ms@token2\ms@@ifnum{#1}\else%
@@ -88,13 +79,22 @@
#2%
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
}
-\def\ms@@ifnum#1{%
+\newcommand*\ms@@ifnum[1]{%
\begingroup%
- \mathcode\expandafter`,=\the\ms@comma%
- \mathcode\expandafter`.=\the\ms@dot%
- #1%
+ \mathcode\expandafter`,=\the\ms@comma%
+ \mathcode\expandafter`.=\the\ms@dot%
+ #1%
\endgroup%
}
+\newcommand*\ms@token{}
+\begingroup%
+ \catcode`,=\active%
+ \gdef,{\futurelet\ms@token\ms@smartcomma}%
+ \catcode`.=\active%
+ \gdef.{\futurelet\ms@token\ms@smartdot}%
+\endgroup%
+\newcommand*\ms@smartcomma{\ms@ifnum{\ms@commaswap}{\ms@commachar}}
+\newcommand*\ms@smartdot{\ms@ifnum{\ms@dotswap}{\ms@dotchar}}
\endinput
%%
%% End of file `mathswap.sty'.