diff options
author | Karl Berry <karl@freefriends.org> | 2008-06-14 18:55:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-06-14 18:55:27 +0000 |
commit | 8842febffdfa43a08856423a4ae0c13ffa2506e4 (patch) | |
tree | c58437a40b701d13a102d05fb91693d56a6e9d04 /Master/texmf-dist/source/latex | |
parent | d7122615203188ff1f643c83d927322d109cf456 (diff) |
oberdiek update (13jun08)
git-svn-id: svn://tug.org/texlive/trunk@8732 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx | 186 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.tex | 4 |
3 files changed, 135 insertions, 57 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx b/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx index 6a87fb4434a..9eb003fe93e 100644 --- a/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/letltxmacro.dtx @@ -71,7 +71,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: letltxmacro 2008/06/12 v1.1 Let assignment for LaTeX macros (HO)} +\Msg{* Package: letltxmacro 2008/06/13 v1.2 Let assignment for LaTeX macros (HO)} \Msg{************************************************************************} \keepsilent @@ -144,7 +144,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{letltxmacro.drv}% - [2008/06/12 v1.1 Let assignment for LaTeX macros (HO)]% + [2008/06/13 v1.2 Let assignment for LaTeX macros (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2007/11/11] \begin{document} @@ -153,7 +153,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{646} +% \CheckSum{813} % % \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 @@ -174,7 +174,7 @@ and the derived files % \GetFileInfo{letltxmacro.drv} % % \title{The \xpackage{letltxmacro} package} -% \date{2008/06/12 v1.1} +% \date{2008/06/13 v1.2} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -234,6 +234,7 @@ and the derived files % \cs{newenvironment}, \cs{renewenvironment} & latex/base\\ % \cs{DeclareRobustCommand}& latex/base\\ % \cs{newrobustcmd}, \cs{renewrobustcmd} & etoolbox\\ +% \cs{robustify} & etoolbox 2008/06/12 v1.6a\\ % \end{tabular} % \end{quote} % @@ -305,7 +306,11 @@ and the derived files \DeclareRobustCommand{\cmd}[2][default]{}% } \typeout{} -\RequirePackage{etoolbox}\relax +% \end{macrocode} +% The minimal version of package \xpackage{etoolbox} is 2008/06/12 v1.6a +% because it fixes \cs{robustify}. +% \begin{macrocode} +\RequirePackage{etoolbox}[2008/06/12]% \Line{} \Line{* etoolbox's robust definitions:} \ShowDef{cmd}{% @@ -314,11 +319,6 @@ and the derived files \ShowDef{cmd}{% \newrobustcmd{\cmd}[2][default]{}% } -% \end{macrocode} -% \iffalse -% ^^A \robustify is still broken in etoolbox v1.5. -% \begin{macrocode} -%<*disabled> \Line{} \Line{* etoolbox's \string\robustify:} \ShowDef{cmd}{% @@ -333,13 +333,7 @@ and the derived files \DeclareRobustCommand{\cmd}[2][default]{} % \robustify{\cmd}% } -%</disabled> -% \end{macrocode} -% \fi -% \begin{macrocode} \typeout{} -% \end{macrocode} -% \begin{macrocode} \@@end %</showcases> % \end{macrocode} @@ -376,8 +370,21 @@ and the derived files % (\cmd) = (\protected\long macro:->) % %\newrobustcmd {\cmd }[2][default]{} -% (\cmd) = (\protected macro:->\@testopt \\cmd {default}) -% (\\cmd) = (\protected\long macro:[#1]#2->) +% (\cmd) = (\protected macro:->\@protected@testopt \cmd \\cmd {default}) +% (\\cmd) = (\long macro:[#1]#2->) +% +%* etoolbox's \robustify: +% +%\newcommand {\cmd }[2][default]{} \robustify {\cmd } +% (\cmd) = (\protected macro:->\@protected@testopt \cmd \\cmd {default}) +% (\\cmd) = (\long macro:[#1]#2->) +% +%\DeclareRobustCommand {\cmd }{} \robustify {\cmd } +% (\cmd) = (\protected\long macro:->) +% +%\DeclareRobustCommand {\cmd }[2][default]{} \robustify {\cmd } +% (\cmd) = (\protected macro:->\@protected@testopt \cmd \\cmd {default}) +% (\\cmd) = (\long macro:[#1]#2->) %\end{verbatim} % \endgroup % @@ -433,7 +440,7 @@ and the derived files % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{letltxmacro}% - [2008/06/12 v1.1 Let assignment for LaTeX macros (HO)] + [2008/06/13 v1.2 Let assignment for LaTeX macros (HO)] % \end{macrocode} % % \subsubsection{Main macros} @@ -469,16 +476,28 @@ and the derived files \def\llm@LetLtxMacro#1#2{% \expandafter\llm@CheckParams\meaning#2:->\@nil{% \begingroup - \ifx\llm@protected\@empty - \edef\x{% + \def\@protected@testopt{% + \expandafter\@testopt\@gobble + }% + \def\@testopt##1##2{% + \toks@={##2}% + }% + \let\llm@testopt\@empty + \edef\x{% + \noexpand\@protected@testopt + \noexpand#2% + \expandafter\noexpand\csname\string#2\endcsname + }% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\y + \expandafter\expandafter\expandafter{% + \expandafter\llm@CarThree#2{}{}{}\llm@nil + }% + \ifx\x\y + #2% + \def\llm@testopt{% \noexpand\@protected@testopt - \noexpand#2% - \expandafter\noexpand\csname\string#2\endcsname - }% - \expandafter\expandafter\expandafter\def - \expandafter\expandafter\expandafter\y - \expandafter\expandafter\expandafter{% - \expandafter\llm@CarThree#2{}{}{}\llm@nil + \noexpand#1% }% \else \edef\x{% @@ -490,33 +509,27 @@ and the derived files \expandafter\expandafter\expandafter{% \expandafter\llm@CarTwo#2{}{}\llm@nil }% - \fi - \expandafter\endgroup\ifx\x\y - \begingroup - \def\@protected@testopt##1##2##3{% - \toks@={##3}% - \xdef\llm@GlobalTemp{% - \noexpand\@protected@testopt - \noexpand#1% - \expandafter\noexpand\csname\string#1\endcsname - {\the\toks@}% - }% - }% - \def\@testopt##1##2{% - \toks@={##2}% - \protected\xdef\llm@GlobalTemp{% + \ifx\x\y + #2% + \def\llm@testopt{% \noexpand\@testopt - \expandafter\noexpand\csname\string#1\endcsname - {\the\toks@}% }% + \fi + \fi + \ifx\llm@testopt\@empty + \else + \llm@protected\xdef\llm@GlobalTemp{% + \llm@testopt + \expandafter\noexpand\csname\string#1\endcsname + {\the\toks@}% }% - #2% - \endgroup + \fi + \expandafter\endgroup\ifx\llm@testopt\@empty + \let#1=#2\relax + \else \let#1=\llm@GlobalTemp \expandafter\let\csname\string#1\expandafter\endcsname \csname\string#2\endcsname - \else - \let#1=#2\relax \fi }{% \let#1=#2\relax @@ -619,7 +632,7 @@ and the derived files \catcode`\%=14 % \catcode`\ =10 % \catcode13=5 % - \RequirePackage{letltxmacro}[2008/06/12]\relax + \RequirePackage{letltxmacro}[2008/06/13]\relax \RestoreCatcodes } \Test @@ -640,7 +653,7 @@ and the derived files \nofiles \documentclass{minimal} -\usepackage{letltxmacro}[2008/06/12] +\usepackage{letltxmacro}[2008/06/13] \usepackage{qstest} \IncludeTests{*} @@ -732,14 +745,24 @@ and the derived files \LetLtxMacro\NewEmpty\empty \Expect*{\meaning\empty}{macro:->}% \Expect*{\meaning\NewEmpty}{macro:->}% + \def\TestA{\iffalse}% + \LetLtxMacro\TestB\TestA + \TestDef{TestB}{\iffalse }% + \TestEquals{TestA}{TestB}% \end{qstest} % \end{macrocode} % % \begin{macrocode} -\usepackage{etoolbox} +\usepackage{etoolbox}[2008/06/12] -\begin{qstest}{newrobustcmd}{newrobustcmd} - \newrobustcmd{\TestA}[1][\default]{TestA}% +\begin{qstest}{newrobustcmd}{oldnewrobustcmd} + \protected\edef\TestA{% + \noexpand\@testopt + \expandafter\noexpand\csname\string\TestA\endcsname + {\noexpand\default}% + }% + \expandafter\protected\expandafter + \def\csname\string\TestA\endcsname{TestA}% \SaveA \LetLtxMacro\TestB\TestA \TestDef{TestB}{\@testopt \\TestB {\default }}% @@ -751,6 +774,57 @@ and the derived files \TestEquals{TestB}{TestC}% \CheckA \end{qstest} + +\begin{qstest}{newrobustcmd}{newrobustcmd} + \newrobustcmd{\TestA}[1][\default]{TestA}% + \SaveA + \LetLtxMacro\TestB\TestA + \TestDef{TestB}{\@protected@testopt \TestB \\TestB {\default }}% + \protected\edef\TestC{% + \noexpand\@protected@testopt + \noexpand\TestB + \expandafter\noexpand\csname\string\TestB\endcsname + {\noexpand\default}% + }% + \TestEquals{TestB}{TestC}% + \CheckA +\end{qstest} + +\begin{qstest}{robustifyopt}{robustifyopt} + \newcommand{\TestA}[2][\default]{}% + \TestDef{TestA}{\@protected@testopt \TestA \\TestA {\default }}% + \robustify\TestA + \TestDef{TestA}{\@protected@testopt \TestA \\TestA {\default }}% + \protected\edef\TestC{% + \noexpand\@protected@testopt + \noexpand\TestA + \expandafter\noexpand\csname\string\TestA\endcsname + {\noexpand\default}% + }% + \TestEquals{TestA}{TestC}% + \SaveA + \LetLtxMacro\TestB\TestA + \TestDef{TestB}{\@protected@testopt \TestB \\TestB {\default }}% + \protected\edef\TestC{% + \noexpand\@protected@testopt + \noexpand\TestB + \expandafter\noexpand\csname\string\TestB\endcsname + {\noexpand\default}% + }% + \TestEquals{TestB}{TestC}% + \CheckA +\end{qstest} + +\begin{qstest}{robustifydeclare}{robustifydeclare} + \DeclareRobustCommand\TestA{\iffalse}% + \robustify\TestA + \SaveA + \LetLtxMacro\TestB\TestA + \TestDef{TestB}{\iffalse }% + \protected\long\def\TestC{\iffalse}% + \TestEquals{TestB}{TestC}% + \CheckA +\end{qstest} % \end{macrocode} % % \begin{macrocode} @@ -953,6 +1027,10 @@ and the derived files % \item % Support for \xpackage{etoolbox}'s \cs{newrobustcmd} added. % \end{Version} +% \begin{Version}{2008/06/13 v1.2} +% \item +% Support for \xpackage{etoolbox}'s \cs{robustify} added. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins index 21ff6a74aff..2f4a8993053 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins @@ -1,5 +1,5 @@ % oberdiek.ins -% 2008/06/12 +% 2008/06/13 % % Copyright (C) 1999, 2001, 2006 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex index ef2d5c42e25..cdf34243d50 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex @@ -6,7 +6,7 @@ \newcommand*{\Subject}{CTAN:\CTANdir} \newcommand*{\Author}{Heiko Oberdiek} \newcommand*{\Email}{oberdiek@uni-freiburg.de} -\newcommand*{\Date}{2008/06/12} +\newcommand*{\Date}{2008/06/13} % Copyright (C) 2006 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> @@ -245,7 +245,7 @@ [\entrysep] \entry{kvsetkeys}{2007/09/29}{1.3}{Key value parser with default handler support}% [\entrysep] -\entry{letltxmacro}{2008/06/12}{1.1}{Let assignment for \LaTeX{} macros}% +\entry{letltxmacro}{2008/06/13}{1.2}{Let assignment for \LaTeX{} macros}% [\entrysep] \entry{listingsutf8}{2007/11/11}{1.1}{Adding support for UTF-8 to listings}% [\entrysep] |