From e733cbfe3512600688e296c70149a128c63c6399 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 2 Mar 2010 23:59:23 +0000
Subject: oberdiek update (2mar10)

git-svn-id: svn://tug.org/texlive/trunk@17292 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/source/latex/oberdiek/ltxcmds.dtx   | 154 ++++++++++++++++++++-
 1 file changed, 148 insertions(+), 6 deletions(-)

(limited to 'Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx')

diff --git a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx
index ebd57fb77bb..12ce3596c6e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx
@@ -63,6 +63,8 @@
 %
 %<*ignore>
 \begingroup
+  \catcode123=1 %
+  \catcode125=2 %
   \def\x{LaTeX2e}%
 \expandafter\endgroup
 \ifcase 0\ifx\install y1\fi\expandafter
@@ -74,7 +76,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: ltxcmds 2010/01/28 v1.2 LaTeX kernel commands for general use (HO)}
+\Msg{* Package: ltxcmds 2010/03/01 v1.3 LaTeX kernel commands for general use (HO)}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -122,7 +124,8 @@ and the derived files
   \file{ltxcmds-test1.tex}{\from{ltxcmds.dtx}{test1}}%
 }
 
-\obeyspaces
+\catcode32=13\relax% active space
+\let =\space%
 \Msg{************************************************************************}
 \Msg{*}
 \Msg{* To finish the installation you have to move the following}
@@ -149,7 +152,7 @@ and the derived files
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{ltxcmds.drv}%
-  [2010/01/28 v1.2 LaTeX kernel commands for general use (HO)]%
+  [2010/03/01 v1.3 LaTeX kernel commands for general use (HO)]%
 \documentclass{ltxdoc}
 \usepackage{holtxdoc}[2008/08/11]
 \usepackage{zref-savepos}
@@ -159,7 +162,7 @@ and the derived files
 %</driver>
 % \fi
 %
-% \CheckSum{569}
+% \CheckSum{683}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -180,7 +183,7 @@ and the derived files
 % \GetFileInfo{ltxcmds.drv}
 %
 % \title{The \xpackage{ltxcmds} package}
-% \date{2010/01/28 v1.2}
+% \date{2010/03/01 v1.3}
 % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}}
 %
 % \maketitle
@@ -225,6 +228,16 @@ and the derived files
 % redefinitions. I remember an example where a package redefined
 % \cs{@firstoftwo} with forgetting \cs{long}.
 %
+% \subsection{Numbers}
+%
+% \begin{declcs}{ltx@zero}\\
+%   \cs{ltx@one}\\
+%   \cs{ltx@two}\\
+%   \cs{ltx@cclv}
+% \end{declcs}
+% These commands are numbers 0, 1, 2 and 255. They are not digits
+% and a space is not gobbled afterwards.
+%
 % \subsection{Argument killers}
 %
 % \begin{declcs}{ltx@gobble} \M{1} \TO\\
@@ -265,6 +278,14 @@ and the derived files
 %   \cs{ltx@backslashchar}
 % \end{declcs}
 %
+% \subsection{Boolean switch}
+%
+% \begin{declcs}{ltx@newif} \M{cmd}
+% \end{declcs}
+% \cs{ltx@newif} defines a new boolean switch \meta{cmd} like \cs{newif}.
+% Unlike \plainTeX's \cs{newif}, \cs{ltx@newif} is not \cs{outer}.
+% The command \meta{cmd} must start with the two characters |if|.
+%
 % \subsection{Command definitions}
 %
 % \begin{declcs}{ltx@ifundefined} \M{cmd} \M{yes} \M{no}
@@ -375,6 +396,13 @@ and the derived files
 % If \meta{cmd} is undefined or has the meaning \cs{relax}, then
 % it will be initialized as empty macro before.
 %
+% \subsection{Macro \cs{ltx@ifnextchar}}
+%
+% \begin{declcs}{ltx@ifnextchar} \M{char} \M{yes} \M{no}
+% \end{declcs}
+% If next character is \meta{char} then \meta{yes} is called,
+% otherwise \meta{no}. The character is not removed.
+%
 % \StopEventually{
 % }
 %
@@ -450,7 +478,7 @@ and the derived files
   \fi
 \expandafter\x\csname ver@ltxcmds.sty\endcsname
 \ProvidesPackage{ltxcmds}%
-  [2010/01/28 v1.2 LaTeX kernel commands for general use (HO)]
+  [2010/03/01 v1.3 LaTeX kernel commands for general use (HO)]
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -492,6 +520,29 @@ and the derived files
 \TMP@EnsureCode{124}{12}% |
 %    \end{macrocode}
 %
+% \subsection{Numbers}
+%
+%    \begin{macro}{\ltx@zero}
+%    \begin{macrocode}
+\chardef\ltx@zero=0 %
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\ltx@one}
+%    \begin{macrocode}
+\chardef\ltx@one=1 %
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\ltx@two}
+%    \begin{macrocode}
+\chardef\ltx@two=2 %
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\ltx@cclv}
+%    \begin{macrocode}
+\chardef\ltx@cclv=255 %
+%    \end{macrocode}
+%    \end{macro}
+%
 % \subsection{Argument killers}
 %
 %    \begin{macro}{\ltx@gobble}
@@ -593,6 +644,39 @@ and the derived files
 %    \end{macrocode}
 %    \end{macro}
 %
+% \subsection{Boolean switch}
+%
+%    \begin{macro}{\ltx@newif}
+%    \begin{macrocode}
+\def\ltx@newif#1{%
+  \begingroup
+    \escapechar=-1 %
+  \expandafter\endgroup
+  \expandafter\LTXcmds@newif\string#1\@nil
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\LTXcmds@newif}
+%    \begin{macrocode}
+\begingroup
+  \escapechar=-1 %
+\expandafter\endgroup
+\expandafter\def\expandafter\LTXcmds@newif\string\if#1\@nil{%
+  \expandafter\edef\csname#1true\endcsname{%
+    \let
+    \expandafter\noexpand\csname if#1\endcsname
+    \noexpand\iftrue
+  }%
+  \expandafter\edef\csname#1false\endcsname{%
+    \let
+    \expandafter\noexpand\csname if#1\endcsname
+    \noexpand\iffalse
+  }%
+  \csname#1false\endcsname
+}
+%    \end{macrocode}
+%    \end{macro}
+%
 % \subsection{Command definitions}
 %
 %    \begin{macro}{\ltx@LocalExpandAfter}
@@ -859,6 +943,56 @@ and the derived files
 %    \end{macrocode}
 %    \end{macro}
 %
+% \subsection{Macro \cs{ltx@ifnextchar}}
+%
+%    \begin{macro}{\ltx@ifnextchar}
+%    \begin{macrocode}
+\long\def\ltx@ifnextchar#1#2#3{%
+  \begingroup
+  \let\LTXcmds@CharToken= #1\relax
+  \toks\ltx@zero{#2}%
+  \toks\ltx@two{#3}%
+  \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\LTXcmds@ifnextchar}
+%    \begin{macrocode}
+\def\LTXcmds@ifnextchar{%
+  \ifx\LTXcmds@LetToken\LTXcmds@CharToken
+    \expandafter\endgroup\the\toks\expandafter\ltx@zero
+  \else
+    \ifx\LTXcmds@LetToken\LTXcmds@SpaceToken
+      \expandafter\expandafter\expandafter\LTXcmds@@ifnextchar
+    \else
+      \expandafter\endgroup\the\toks
+      \expandafter\expandafter\expandafter\ltx@two
+    \fi
+  \fi
+}
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\LTXcmds@@ifnextchar}
+%    \begin{macrocode}
+\begingroup
+  \def\x#1{\endgroup
+    \def\LTXcmds@@ifnextchar#1{%
+      \futurelet\LTXcmds@LetToken\LTXcmds@ifnextchar
+    }%
+  }%
+\x{ }
+%    \end{macrocode}
+%    \end{macro}
+%    \begin{macro}{\LTXcmds@SpaceToken}
+%    \begin{macrocode}
+\begingroup
+  \def\x#1{\endgroup
+    \let\LTXcmds@SpaceToken= #1%
+  }%
+\x{ }
+%    \end{macrocode}
+%    \end{macro}
+%
 %    \begin{macrocode}
 \LTXcmds@AtEnd
 %</package>
@@ -1159,6 +1293,14 @@ and the derived files
 %   \item
 %     \cs{ltx@GlobalAppendMacro}, \cs{ltx@LocalAppendMacro} added.
 %   \end{Version}
+%   \begin{Version}{2010/03/01 v1.3}
+%   \item
+%     \cs{ltx@newif} added.
+%   \item
+%     \cs{ltx@ifnextchar} added.
+%   \item
+%     Numbers \cs{ltx@zero}, \cs{ltx@one}, \cs{ltx@two}, \cs{ltx@cclv} added.
+%   \end{Version}
 % \end{History}
 %
 % \PrintIndex
-- 
cgit v1.2.3

