diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx | 103 |
1 files changed, 74 insertions, 29 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx index 5e6ab695ec3..9b7e1427879 100644 --- a/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/ltxcmds.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment -% +% % Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de> -% +% % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3 of this license or (at your option) any later @@ -9,20 +9,20 @@ % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of % LaTeX version 2005/12/01 or later. -% +% % This work has the LPPL maintenance status "maintained". -% +% % This Current Maintainer of this work is Heiko Oberdiek. -% +% % This work consists of the main source file ltxcmds.dtx % and the derived files % ltxcmds.sty, ltxcmds.pdf, ltxcmds.ins, ltxcmds.drv, % ltxcmds-test1.tex. -% +% % Distribution: % CTAN:macros/latex/contrib/oberdiek/ltxcmds.dtx % CTAN:macros/latex/contrib/oberdiek/ltxcmds.pdf -% +% % Unpacking: % (a) If ltxcmds.ins is present: % tex ltxcmds.ins @@ -31,7 +31,7 @@ % (c) If you insist on using LaTeX % latex \let\install=y\input{ltxcmds.dtx} % (quote the arguments according to the demands of your shell) -% +% % Documentation: % (a) If ltxcmds.drv is present: % latex ltxcmds.drv @@ -41,14 +41,14 @@ % if available. Here you can specify further options, e.g. % use A4 as paper format: % \PassOptionsToClass{a4paper}{article} -% +% % Programm calls to get the documentation (example): % pdflatex ltxcmds.dtx % makeindex -s gind.ist ltxcmds.idx % pdflatex ltxcmds.dtx % makeindex -s gind.ist ltxcmds.idx % pdflatex ltxcmds.dtx -% +% % Installation: % TDS:tex/generic/oberdiek/ltxcmds.sty % TDS:doc/latex/oberdiek/ltxcmds.pdf @@ -68,7 +68,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: ltxcmds 2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)} +\Msg{* Package: ltxcmds 2009/12/12 v1.1 LaTeX kernel commands for general use (HO)} \Msg{************************************************************************} \keepsilent @@ -137,7 +137,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{ltxcmds.drv}% - [2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)]% + [2009/12/12 v1.1 LaTeX kernel commands for general use (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2008/08/11] \usepackage{zref-savepos} @@ -147,7 +147,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{380} +% \CheckSum{409} % % \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 @@ -168,7 +168,7 @@ and the derived files % \GetFileInfo{ltxcmds.drv} % % \title{The \xpackage{ltxcmds} package} -% \date{2009/08/05 v1.0} +% \date{2009/12/12 v1.1} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -243,7 +243,7 @@ and the derived files % % \subsection{Empty macro} % -% \begin{declcs}{ltx@empty} +% \begin{declcs}{ltx@empty} \TO % \end{declcs} % % \subsection{Characters} @@ -259,7 +259,17 @@ and the derived files % \end{declcs} % If \eTeX\ is available, \cs{ifcsname} is used that does % not have the side effect of defining undefined commands -% with meaning of \cs{relax}. +% with meaning of \cs{relax}. This command is always expandable. +% Change in version 1.1: Also the meaning \cs{relax} is +% always considered ``undefined''. +% +% \begin{declcs}{ltx@IfUndefined} \M{cmd} \M{yes} \M{no} +% \end{declcs} +% If \eTeX\ is available, \cs{ifcsname} is used that does +% not have the side effect of defining undefined commands +% with meaning of \cs{relax}. Also it always checks for +% the meaning of \cs{relax} and considers this as undefined. +% This macro is not expandable without \eTeX. % % \begin{declcs}{ltx@LocalExpandAfter} % \end{declcs} @@ -343,7 +353,7 @@ and the derived files \fi \expandafter\x\csname ver@ltxcmds.sty\endcsname \ProvidesPackage{ltxcmds}% - [2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)] + [2009/12/12 v1.1 LaTeX kernel commands for general use (HO)] % \end{macrocode} % % \begin{macrocode} @@ -477,10 +487,23 @@ and the derived files % % \subsection{Command definitions} % +% \begin{macro}{\ltx@LocalExpandAfter} +% \begin{macrocode} +\def\ltx@LocalExpandAfter{% + \begingroup + \expandafter\expandafter\expandafter + \endgroup + \expandafter +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\ltx@LocalExpandAfter +\ifx\csname ifcsname\endcsname\relax +% \end{macrocode} % \begin{macro}{\ltx@ifundefined} % \begin{macrocode} -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname ifcsname\endcsname\relax \def\ltx@ifundefined#1{% \expandafter\ifx\csname #1\endcsname\relax \expandafter\ltx@firstoftwo @@ -488,32 +511,50 @@ and the derived files \expandafter\ltx@secondoftwo \fi }% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ltx@IfUndefined} +% \begin{macrocode} + \def\ltx@IfUndefined#1{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\ltx@firstoftwo + \else + \expandafter\ltx@secondoftwo + \fi + }% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} \expandafter\ltx@gobble \else \expandafter\ltx@firstofone \fi {% +% \end{macrocode} +% \begin{macro}{\ltx@ifundefined} +% \begin{macrocode} \def\ltx@ifundefined#1{% \ifcsname #1\endcsname - \expandafter\ltx@secondoftwo + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\expandafter\expandafter\ltx@firstoftwo + \else + \expandafter\expandafter\expandafter\ltx@secondoftwo + \fi \else \expandafter\ltx@firstoftwo \fi }% -} % \end{macrocode} % \end{macro} -% -% \begin{macro}{\ltx@LocalExpandAfter} +% \begin{macro}{\ltx@IfUndefined} % \begin{macrocode} -\def\ltx@LocalExpandAfter{% - \begingroup - \expandafter\expandafter\expandafter - \endgroup - \expandafter -} + \let\ltx@IfUndefined\ltx@ifundefined % \end{macrocode} % \end{macro} +% \begin{macrocode} +} +% \end{macrocode} % % \begin{macrocode} \ltx@AtEnd @@ -797,6 +838,10 @@ and the derived files % \item % First version. % \end{Version} +% \begin{Version}{2009/12/12 v1.1} +% \item +% Short title shortened. +% \end{Version} % \end{History} % % \PrintIndex |