From cf377123b6b1a030e53f2cf050fd8a944fe93ae3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 29 Aug 2014 22:34:37 +0000 Subject: catoptions (29aug14) git-svn-id: svn://tug.org/texlive/trunk@35063 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/catoptions/catoptions.sty | 124 +++++++++------------ 1 file changed, 54 insertions(+), 70 deletions(-) (limited to 'Master/texmf-dist/tex/latex/catoptions') diff --git a/Master/texmf-dist/tex/latex/catoptions/catoptions.sty b/Master/texmf-dist/tex/latex/catoptions/catoptions.sty index 51b670f5f47..798c76cd558 100644 --- a/Master/texmf-dist/tex/latex/catoptions/catoptions.sty +++ b/Master/texmf-dist/tex/latex/catoptions/catoptions.sty @@ -1,5 +1,5 @@ %+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% -% This is 'catoptions' package, version 0.2.7f, 2012/11/22. % +% This is 'catoptions' package, version 0.2.7g, 2014/08/27. % % % % The catoptions package changes LaTeX package loading internals % % so that all subsequently loaded packages can rely on having % @@ -85,8 +85,15 @@ \catcode126=13 \AtEndOfPackage{% - % **Remove this later, after ltxtools.sty has been updated on CTAN: \newletcsset{% + \csvloop=\csv@@loop, + \csvparse=\csv@@parse, + \kvloop=\kv@@loop, + \kvparse=\kv@@parse, + \kvprocess=\kv@@process, + \tsvloop=\tsv@@loop, + \tsvparse=\tsv@@parse, + \sisoloop=\siso@@loop, \dofunclist=\cptdofunclist, \docommalist=\cptdocommalist, \dosisolist=\cptdosisolist, @@ -99,6 +106,10 @@ \cpt@gobbletorelax@fi@endgroup=\cptbgobbletorelax, \ifcasse=\cptifcasse, \docasse=\cptdocasse, + \etrimspace=\trim@@space, + \etrimspaces=\trim@@spaces, + \csvnormalize=\csv@@normalize, + \kvnormalize=\kv@@normalize }% } \edef\cpt@hashchar{\string#} @@ -106,7 +117,7 @@ \catcode`#=13 \gdef\cpt@activehash{#} \endgroup -\m@ne=-1\z@=0pt\p@=1pt +\m@ne=-1 \z@=0pt \p@=1pt \@ifdefinable\m@one{\newcount\m@one\m@one\m@ne} \@ifdefinable\z@pt{\newdimen\z@pt\z@pt\z@} \chardef\active=13 @@ -643,7 +654,12 @@ \expandafter\cpt@fletdef\cpt@futureletchars\end\@\@ \expandafter\cpt@flet@b\cpt@futureletchars\end\@\@ } -\AtBeginDocument{\cptrestorecatcodes} + +% Removed on 2014/08/27 to avoid noted interference with babel. +% See . +%\AtBeginDocument{\cptrestorecatcodes} + \robust@gdef*\futureletresetactives{% \begingroup \defpass\cpt@tempa##1{\endgroup @@ -665,13 +681,9 @@ \cptpushcatcodes \cptnormalcatcodes \ifcseqTF\@currname\@empty{% - \BeforeStartOfDocument{% - \cptpopcatcodes - }% + \BeforeStartOfDocument{\cptpopcatcodes}% }{% - \AfterEndOfStyleFile{% - \cptpopcatcodes - }% + \AfterEndOfStyleFile{\cptpopcatcodes}% }% } \new@def*\cptgetcatcode#1{% @@ -693,7 +705,8 @@ \robust@def\cpt@ifnextchar#1#2#3{% \begingroup \let\reserved@a=#1% - \toks@{\endgroup#2}\toks1{\endgroup#3}% + \toks@{\endgroup#2}% + \toks1{\endgroup#3}% \global\futurelet\@let@token\cpt@ifnext } \robust@def*\cpt@ifnext{% @@ -1376,23 +1389,23 @@ \cptnewvariables{if}[cpt@]{usepox,optfd,noval,igopt,inpox,olddx, in,check,choicefd,useempty,swa}[false] -% st -> I saw star -% pl -> I saw plus -% pm -> I saw prime -% cl -> I saw exclamation mark -% verbose -> log information (package option) -% usepox -> use \XDeclareOption and \XProcessOptions for -% \DeclareOption and \ProcessOptions (package option) -% igopt -> ignore option -% optfd -> option found -% inpox -> we're in \XProcessOptions -% olddx -> we're in \DeclareOption and not in \XDeclareOption -% in -> for use in \cpt@in -% check,sw -> generic booleans ('check' for short intervals; -% 'sw' for longer intervals) -% choicefd -> generic (choice found) -% loopbreak -> terminate loop -% useempty -> use empty entry (in loops) +% st -> I saw star +% pl -> I saw plus +% pm -> I saw prime +% cl -> I saw exclamation mark +% verbose -> log information (package option) +% usepox -> use \XDeclareOption and \XProcessOptions for +% \DeclareOption and \ProcessOptions (package option) +% igopt -> ignore option +% optfd -> option found +% inpox -> we're in \XProcessOptions +% olddx -> we're in \DeclareOption and not in \XDeclareOption +% in -> for use in \cpt@in +% check,sw -> generic booleans ('check' for short intervals; +% 'sw' for longer intervals) +% choicefd -> generic (choice found) +% loopbreak -> terminate loop +% useempty -> use empty entry (in loops) % \cptnewvariables{tog}{biboolopts}[false] \cptnewvariables{count}[cpt@]{optdepth,cnta}[\z@pt] @@ -1673,7 +1686,6 @@ % #1: calling/base function to push % #2: comma-separated state list (subsidiary functions) to push % #3: arbitrary number - \robust@def*\cptpushfunctions#1#2#3{% \begingroup \def\reserved@a##1##2\push@nil{% @@ -1688,6 +1700,7 @@ \let\xp\expandcsonce \edef\cpt@stack{\string#1@cpt@stack}% \ifcsndefTF\cpt@stack{}{\csn@def\cpt@stack{}}% + % #2 comes with \\ behind each macro to be pushed. \def\\##1{% \edef\cpt@tempa{\noexpandcsn{\string##1@cpt@\cptrm#3}}% \cptexpanded{% @@ -1731,9 +1744,8 @@ % #3: state counter \robust@def*\cpt@pushstate#1#2#3{% \ifnum#3>\cpt@optionstacklimit\relax - \let\x\cpt@optionstacklimit \@latex@error{Current option/key state is being pushed - \MsgBrk beyond level '\x'. I suspect infinite + \MsgBrk beyond level '\cpt@optionstacklimit'. I suspect infinite \MsgBrk re-entrance. If this isn't the case, please \MsgBrk set package option 'option-stack-limit' or 'key-stack-limit' to the required value in @@ -4597,7 +4609,7 @@ \cptstripallouterbraces{##2}\curr@optlist \fi \@ifpackageloaded{##1}{% - % check option clash + % Check option clash: \cptexpandarg{\cpt@ifoptions{sty}{##1}}{\expandcsonce\curr@optlist}{}{% \ifx\curr@optlist\@empty \cptuaddtolist\clash@list{##1}% @@ -5043,9 +5055,7 @@ \robust@def\cpt@d@clareoption#1#2[#3]#4{% \cpt@d@cl@reoption{#1}{#2}{#3}% \ifdefboolTF{cpt@olddx}{% - % The old style of \DeclareOption may have used the - % parameter character in a format different from the - % system here: + % xcolor.sty uses a unique definition of callback: \xifstrcmpTF{\@currname.\@currext}{xcolor.sty}{% \csn@xdef{#1@ds@#2}{% \unexpanded{\edef\XC@@opt{\XC@@opt#2,}#4}% @@ -5065,8 +5075,7 @@ \robust@def*\XDeclareOptions{% \let\@fileswith@pti@ns\@badrequireerror \cpt@ifstar{% - \cpt@err{Command \noexpand\XDeclareOptions has no - star form}\@ehc + \cpt@err{Command \noexpand\XDeclareOptions has no star form}\@ehc }{% \cpt@testfam\cpt@declareoptions }% @@ -5352,6 +5361,7 @@ \cpt@testfam\cpt@disableoption }% } +\robust@def*\XDisableOptionsAtBeginDocument{\XDisableOptions*} \robust@def*\cpt@disableoption<#1>#2{% \def\cpt@currfams{#1}% \def\cpt@curropts{#2}% @@ -5464,7 +5474,7 @@ \robust@def*\cpt@ifoptdef<#1>#2{% \def\cpt@currfams{#1}% \cpt@choicefdfalse - % may break out of loop: + % May break out of loop: \def\csv@do##1{% \cpt@ifoptd@f{##1}{#2}% }% @@ -5967,8 +5977,9 @@ \ifcsnullTF\cpt@undefinedopts{}{% \despacecontent\cpt@undefinedopts \cpt@warn{% - Undefined options (family,option,value): - \MsgBrk\expandcsonce\cpt@undefinedopts + Undefined options + \MsgBrk[Family, Option, Value]: + \MsgBrk\expandcsonce\cpt@undefinedopts. \MsgBrk Default action already taken in each case }% }% @@ -6075,8 +6086,8 @@ \despacecontent\reserved@e \ltxmsg@err{Option clash for \@cls@pkg\@space #1}{% The package '#1' has already been loaded - with \ifx\reserved@e\@empty no options\MsgBrk\else - options:\MsgBrk\@space\@space[\reserved@e]\fi.\MsgBrk + with \ifx\reserved@e\@empty no options.\MsgBrk\else + options:\MsgBrk\@space\@space[\reserved@e].\fi\MsgBrk There has now been an attempt to load it with \iflacus#2\dolacus no options\else options \MsgBrk\@space\@space[\unexpanded{#2}]\fi. @@ -6306,9 +6317,7 @@ } \XDisableOptions*{draft,final} \XDeclareOption*{\cpt@warn{Unknown option '\CurrentOption' ignored}} -\XExecuteOptions{% - verbose=false,usepox=true,optionstacklimit=4 -}\relax +\XExecuteOptions{verbose=false,usepox=true,optionstacklimit=4}\relax \XProcessOptions*\relax \cptpopcatcodes @@ -6318,28 +6327,3 @@ \endinput %% End of file catoptions.sty %% - - - - -\robust@def*\cptpushfunctions#1#2#3{% - \cptpushnumber{#3}% - \begingroup - \edef\cpt@stack{\cptremovescape{#1}@stack}% - \ifcsndefTF\cpt@stack{}{\csn@def\cpt@stack{}}% - \toks@{}\toks1{}\escapechar92\relax - % Using \csv@@loop or \csv@@parse here will bomb out, - % because \cptpushfunctions is called within those loops: - \let\xp\expandcsonce - \cptfor#2\dofor{% - \ifescapedTF{##1}{}{\cpt@notescapederr{##1}}% - \edef\cpt@tempa{\noexpandcsn{\cptremovescape{##1}@\cptrm#3}}% - \cptpassexpanded{% - \toks@{\the\toks@\let\xp\cpt@tempa\noexpand##1}% - \toks1{\the\toks1\let\noexpand##1\xp\cpt@tempa - \undefcs\xp\cpt@tempa}% - }% - }% - \csn@xdef\cpt@stack{\the\toks1\cpt@nil{\expandcsnonce\cpt@stack}}% - \expandafter\endgroup\the\toks@ -} -- cgit v1.2.3