summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty86
1 files changed, 62 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
index 156908c07c2..0644bd53c94 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
@@ -33,7 +33,7 @@
%% ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv,
%% ltxcmds-test1.tex, ltxcmds-test-gobble.tex,
%% ltxcmds-test-ifempty.tex, ltxcmds-test-zapspace.tex,
-%% ltxcmds-test-ifboxempty.tex.
+%% ltxcmds-test-ifboxempty.tex, ltxcmds-test-nextchar.tex.
%%
\begingroup\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
@@ -101,7 +101,7 @@
\fi
\expandafter\x\csname ver@ltxcmds.sty\endcsname
\ProvidesPackage{ltxcmds}%
- [2011/03/16 v1.18 LaTeX kernel commands for general use (HO)]%
+ [2011/04/14 v1.19 LaTeX kernel commands for general use (HO)]%
\begingroup\catcode61\catcode48\catcode32=10\relax%
\catcode13=5 % ^^M
\endlinechar=13 %
@@ -157,6 +157,36 @@
\def\ltx@minusone{%
-\ltx@one
}
+\toksdef\ltx@LocToksA=0 %
+\toksdef\ltx@LocToksB=2 %
+\toksdef\ltx@LocToksC=4 %
+\toksdef\ltx@LocToksD=6 %
+\toksdef\ltx@LocToksE=8 %
+\toksdef\ltx@GlobToksA=1 %
+\toksdef\ltx@GlobToksB=3 %
+\toksdef\ltx@GlobToksC=5 %
+\toksdef\ltx@GlobToksD=7 %
+\toksdef\ltx@GlobToksE=9 %
+\dimendef\ltx@LocDimenA=0 %
+\dimendef\ltx@LocDimenB=2 %
+\dimendef\ltx@LocDimenC=4 %
+\dimendef\ltx@LocDimenD=6 %
+\dimendef\ltx@LocDimenE=8 %
+\dimendef\ltx@GlobDimenA=1 %
+\dimendef\ltx@GlobDimenB=3 %
+\dimendef\ltx@GlobDimenC=5 %
+\dimendef\ltx@GlobDimenD=7 %
+\dimendef\ltx@GlobDimenE=9 %
+\skipdef\ltx@LocSkipA=0 %
+\skipdef\ltx@LocSkipB=2 %
+\skipdef\ltx@LocSkipC=4 %
+\skipdef\ltx@LocSkipD=6 %
+\skipdef\ltx@LocSkipE=8 %
+\skipdef\ltx@GlobSkipA=1 %
+\skipdef\ltx@GlobSkipB=3 %
+\skipdef\ltx@GlobSkipC=5 %
+\skipdef\ltx@GlobSkipD=7 %
+\skipdef\ltx@GlobSkipE=9 %
\long\def\ltx@gobble#1{}
\long\def\ltx@gobbletwo#1#2{}
\long\def\ltx@gobblethree#1#2#3{}
@@ -425,8 +455,8 @@
\fi
\fi
\begingroup
- \toks0\expandafter{#1#2}%
- \xdef#1{\the\toks0}%
+ \ltx@LocToksA\expandafter{#1#2}%
+ \xdef#1{\the\ltx@LocToksA}%
\endgroup
}
\long\def\ltx@LocalAppendToMacro#1#2{%
@@ -439,42 +469,51 @@
\fi
\fi
\begingroup
- \toks0\expandafter{\LTXcmds@gtemp#2}%
- \xdef\LTXcmds@gtemp{\the\toks0}%
+ \ltx@LocToksA\expandafter{\LTXcmds@gtemp#2}%
+ \xdef\LTXcmds@gtemp{\the\ltx@LocToksA}%
\endgroup
\let#1\LTXcmds@gtemp
}
\long\def\ltx@ifnextchar#1#2#3{%
\begingroup
\let\LTXcmds@CharToken= #1\relax
- \toks\ltx@zero{#2}%
- \toks\ltx@two{#3}%
+ \ltx@LocToksA{\endgroup#2}%
+ \ltx@LocToksB{\endgroup#3}%
\futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
}
\def\LTXcmds@ifnextchar{%
\ifx\LTXcmds@LetToken\LTXcmds@CharToken
- \expandafter\endgroup\the\toks\expandafter\ltx@zero
+ \the\expandafter\ltx@LocToksA
\else
\ifx\LTXcmds@LetToken\LTXcmds@SpaceToken
\expandafter\expandafter\expandafter\LTXcmds@@ifnextchar
\else
- \expandafter\endgroup\the\toks
- \expandafter\expandafter\expandafter\ltx@two
+ \the\expandafter\expandafter\expandafter\ltx@LocToksB
\fi
\fi
}
-\begingroup
- \def\x#1{\endgroup
- \def\LTXcmds@@ifnextchar#1{%
- \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
- }%
- }%
-\x{ }
-\begingroup
- \def\x#1{\endgroup
- \let\LTXcmds@SpaceToken= #1%
- }%
-\x{ }
+\def\LTXcmds@@ifnextchar{%
+ \expandafter\futurelet
+ \expandafter\LTXcmds@LetToken
+ \expandafter\LTXcmds@ifnextchar
+ \romannumeral-`\.%
+}
+\ltx@firstofone{\let\LTXcmds@SpaceToken= } %
+\long\def\ltx@ifnextchar@nospace#1#2#3{%
+ \begingroup
+ \let\LTXcmds@CharToken= #1\relax
+ \ltx@LocToksA{\endgroup#2}%
+ \ltx@LocToksB{\endgroup#3}%
+ \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar@nospace
+}
+\def\LTXcmds@ifnextchar@nospace{%
+ \the
+ \ifx\LTXcmds@LetToken\LTXcmds@CharToken
+ \expandafter\ltx@LocToksA
+ \else
+ \expandafter\ltx@LocToksB
+ \fi
+}
\ltx@IfUndefined{quitvmode}{%
\ltx@IfUndefined{leavevmode}{%
\ltx@IfUndefined{voidb@x}{%
@@ -645,7 +684,6 @@ $ \next
\ltx@IfBoxEmpty{#1}%
}
\LTXcmds@AtEnd%
-
\endinput
%%
%% End of file `ltxcmds.sty'.