diff options
author | Karl Berry <karl@freefriends.org> | 2010-03-23 22:55:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-03-23 22:55:47 +0000 |
commit | 1245444c38f58a5f2d3cc77bd773a1cf1920ef4d (patch) | |
tree | 2dad97e9d4e96f2e81790e209f23ec1e9fd22307 /Master/texmf-dist/tex/latex/nicetext/fifinddo.sty | |
parent | 22780f70b0a868b2b458fa5177c8100498b4d2b2 (diff) |
nicetext 0.3 (23mar10)
git-svn-id: svn://tug.org/texlive/trunk@17537 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nicetext/fifinddo.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/nicetext/fifinddo.sty | 254 |
1 files changed, 169 insertions, 85 deletions
diff --git a/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty b/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty index 1f03ae4c4ab..5ae6dab9f0c 100644 --- a/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty +++ b/Master/texmf-dist/tex/latex/nicetext/fifinddo.sty @@ -5,7 +5,7 @@ %% for processing tex(t) files %% (checking, filtering, converting, substituting, expanding, ...) -\def\fileversion{0.3} \def\filedate{2009/04/15} +\def\fileversion{0.31} \def\filedate{2010/03/23} %% This file can be redistributed and/or modified under %% the terms of the LaTeX Project Public License; either @@ -30,7 +30,7 @@ %% %% === Category codes === %% -%% We use the ``underscore'' as ``compound identifier.'' +%% We use the ``underscore" as ``compound identifier." \catcode`\_=11 %% underscore used in control words %% %% |\MakeOther| is a synonym for `\@makeother', needed for matching @@ -50,7 +50,7 @@ %% new ones at the same time, e.g., `\Delimiters\[\]': \newcommand*{\Delimiters}[2]{% \MakeOther\{\MakeOther\}\catcode`#1=1\catcode`#2=2\relax} -%% For replacing strings or for defining other strings of ``other'' +%% For replacing strings or for defining other strings of ``other" %% characters by `\edef', you can use some \LaTeX\ constructs---here %% are copies |\PercentChar| and |\BackslashChar| of them %% (do you need more?): @@ -78,7 +78,8 @@ automatically generated with fifinddo.sty]}}% %% |\ProcessFileWith{<input>}{<loop-body>}| opens a file <input> %% and runs a loop on its lines the main body of which is <loop-body>. -%% When it starts, a new line of <input> is stored as macro +%% When the <loop> starts, a new line of <input> is stored as macro +%% %% <- the <loop> 2010/03/10 %% |\fdInputLine|. \newcommand*{\ProcessFileWith}[2]{% \openin\@inputcheck=#1% @@ -95,6 +96,13 @@ %% <- cf. TeXbook "extended keyboards" up-/downarrow %% -> "math specials", cf. "space specials" \MakeOther\^^I% ASCII horizontal tab -- guessed!? ^^L!? +%% With v3.1, we support non-ASCII: + \count@=128 + \loop + \ifnum\count@<\@cclvi + \catcode\count@=12 + \advance\count@\@ne + \repeat \loop \ifeof\@inputcheck \else \read\@inputcheck to \fdInputLine \ignorespaces #2% @@ -104,13 +112,16 @@ \closein\@inputcheck} %% |\CloseResultFile| closes <output>. \newcommand*{\CloseResultFile}{\immediate\closeout\result_file} -%% Peter Wilson's 'newfile' provides more powerful file handling. +%% +%% TODO: write EOF for debugging!?---%% 2010/03/18 +%% Peter Wilson's \ctanpkgref{newfile} +%% provides more powerful file handling. %% % <- TODO relevant? 2009/04/12 %% %% \pagebreak %% TODO move theory to fifinddo.tex 2009/04/12 %% == Basic handling of substring conditionals == %% \label{sec:theory} -%% === ``Substring Theory'' === +%% === ``Substring Theory" === %% \begin{flushright}\it %% I wished I could study string theory,\\ %% but I only could study substring theory. @@ -128,9 +139,9 @@ %% special idea. %% %% In order to use `\find' for a test whether <pattern> is in -%% <target>, we build a ``sandbox'' |\find<sand>&|, where <sand> +%% <target>, we build a ``sandbox" |\find<sand>&|, where <sand> %% contains <target> \emph{and additionally} <pattern>---as a -%% ``dummy;'' so `&' delimits the search and `\find' finds +%% ``dummy;" so `&' delimits the search and `\find' finds %% <pattern> either in <target> or somewhere else before `&'. %% %% Consider the simple sandbox |\find<target><pattern>&|. @@ -145,16 +156,21 @@ %% If #2 is \emph{not} empty, <pattern> occurs in <target>---or this once %% was \emph{thought}, some time in developping the present package, %% as well as in the version of 'substr.sty' marked -%% `2005-11-29',\footnote{\hspace{1sp}'substr' does not change -%% category codes -%% % as 'fifinddo' does -%% and uses \cs{@nil} as delimiter instead of our &&.} try +%% `2005-11-29',\footnote{\url{http://ctan.org/pkg/substr}. +%% 'substr' does not change category codes +%% as 'fifinddo' does +%% and uses \cs{@nil} as delimiter instead of +%% our &&.} try +%% (if that version still is installed)\footnote{The ``feature" has +%% been fixed with v1.2 as of 2009/10/20 of +%% 'substr.sty'.} %% \[`\IfSubStringInString{<str1><str2><str1>}{<str1><str2>}{YES}{NO}'\] %% which works \emph{verbatim} as well as considering <str1> and %% <str2> \emph{placeholders}, e.g., for %% \begin{center} %% `\IfSubStringInString{day after day}{day after }{YES}{NO}'\footnote{% -%% Likewise \texttt{t\string\^ete-\string\`a-t\string\^te} ...}\\ +%% Likewise \texttt{t\string\^ete-\string\`a-t\string\^ete} ...}\\ +%% %% <- `e' was missing 2010/03/17 %% `\IfSubStringInString{AMSTERDAM}{AMSTERD}{YES}{NO}'\\ %% `\IfSubStringInString{TORONTO}{TORON}{YES}{NO}'\\ %% `\IfSubStringInString{bonbon}{bon}{YES}{NO}'\footnote{% @@ -163,10 +179,18 @@ %% (an ape) %% \end{center} %% or `\IfSubStringInString{ionization}{ionizat}{YES}{NO}'.\footnote{% -%% Read 'substr.sty' or try ``normal'' things to convince yourself +%% Read 'substr.sty' or try ``normal" things to convince yourself %% that the syntax indeed is %% &\IfSubStringInString{<pattern>}{<target>}{<yes>}{<no>}.} -%% Same with \LaTeX's internal `\in@': +%% Same with \LaTeX's internal `\in@':\footnote{\cs{in@} has been +%% fixed after my warning on Heiko Oberdiek's proposal---at +%% least in the repository.---On 2009/04/21 +%% I learn from Manuel P\'egouri\'e-Gonnard +%% that the first versions of his 'ted' +%% had a similar bug, fixed on v1.05 essentially like here; +%% Steven Segletes confirms that his 'stringstrings' doesn't +%% suffer the problem (returning positions of substrings and +%% numbers of occurrences).} %% \[`\makeatletter \in@{bonbon}{bon}\ifin@ YES\else NO\fi \makeatother'\] %% %% \makeatletter \in@{bonbon}{bon}\ifin@ YES\else NO\fi \makeatother %% %% \IfSubStringInString{ionization}{ionizat}{YES}{NO} @@ -183,7 +207,9 @@ %% a counterexample <target>. %% %% Therefore, a sandbox must have something between <target> and -%% <pattern>. We choose |\find<target>~<pattern>$&| as standard. +%% <pattern>.\footnote{Must? Actually, I preferred this solution to +%% other ideas like measuring the length of <split2>.} +%% We choose |\find<target>~<pattern>$&| as standard. %% The `$' will be used as an argument delimiter to get rid of the dummy %% <pattern> in <split2>, as well as to decide whether the match was %% in <target> or in the dummy part of the sandbox. @@ -197,14 +223,14 @@ %% in its parameter text and one that stores the pattern for building %% the sandbox.\footnote{If it were for the pattern only, the parsing %% macro might suffice and the macro calling it might extract the -%% pattern from a ``dummy expansion.'' Somewhat too much for me now; -%% on the other hand the calling macro also hands some ``current'' +%% pattern from a ``dummy expansion." Somewhat too much for me now; +%% on the other hand the calling macro also hands some ``current" %% informations to the parsing macro---oh, even this could be -%% handled by a general ``calling'' macro \dots} +%% handled by a general ``calling" macro \dots} %% %% TODO 2009/04/15 -%% We use a separate \emph{``name space''} for each of +%% We use a separate \emph{``name space"} for each of %% both kinds. The parsing macro and the macro building the sandbox -%% will have a common \emph{``identifier''} by which the user or +%% will have a common \emph{``identifier"} by which the user or %% programmer calls them. Actually, she will usually (first) call %% the sandbox box builder. The sandbox builder calls the parsing %% macro. When \emph{all} occurrences of a pattern in the target are @@ -212,9 +238,9 @@ %% %% Actually, the parsing macro will execute certain actions %% depending on what it finds in the sandbox, so we call it a -%% \emph{``substring conditional''}. It may read additional arguments +%% \emph{``substring conditional"}. It may read additional arguments %% after the sandbox that store information gathered before. -%% This is especially useful for designing \emph{``expandable''} +%% This is especially useful for designing \emph{``expandable"} %% chains (sequences) of conditionals where macros cannot store information in %% macros. The macro setting up the sandbox will initialize such %% extra arguments at the same time. @@ -222,29 +248,63 @@ %% It may be more efficient \emph{not} to use the following setup %% macros but to type the macros yourself, just using the following %% as templates. The setup macros are especially useful with patterns -%% that contain ``special characters,'' as when you are looking for +%% that contain ``special characters," as when you are looking for +%% %% TODO repetition of single right quote not working 2010/03/19 %% lines that might be package comments. %% -%% === Set up conditionals === -%% `substr_cond' is the ``name space'' for substring conditionals. -%% A colon separates it from \emph{``job identifiers''} in the actual +%% === Meta-Setup === +%% +%% A setup command <setup-cmd> will have the following syntax: +%% \[|<setup-cmd>{<job-id>}[<changes>]{<pattern>}<more-args>|\] +%% <changes> will, in the first instance, be category code changes +%% for reading <pattern> overriding the settings in `\PatternCodes'. +%% They are executed after the latter in a local group. +%% It may be safer to redefine `\PatternCodes' instead +%% of using the optional <changes> argument. +%% +%% A macro +%% \[|\StartFDsetup{<do-setup>}{<job-id>}[<changes>]|\] +%% shared by setup commands +%% may read <job-id> and <changes> for <setup-cmd>. +%% |<do-setup>| will be the macro that reads <pattern> (and more) +%% and processes it. It must contain `\endgroup' to match +%% `\begingroup' from `\FD_prepare_pattern'. +%% <job-id> is stored in a macro |\fdParserId|. +%% The default for <changes> is \emph{nothing}. +\newcommand*{\StartFDsetup}[1]{% + \let\FD_do_setup#1% + \afterassignment\FD_prepare_pattern + \def\fdParserId} +\newcommand*{\FD_prepare_pattern}[1][]{% + \begingroup \PatternCodes #1\FD_do_setup} +%% So <setup-cmd> should be set up about as follows: +%% \begin{quote} +%% `\newcommand*{<setup-cmd>}{\StartFDsetup<do-setup>}'\\ +%% `\newcommand*{<do-setup>}[<args>]{<action>}' +%% \end{quote} +%% <do-setup>'s first argument will be the <pattern> argument +%% of <setup-cmd>. +%% +%% === Setup for conditionals === +%% `substr_cond' is the ``name space" for substring conditionals. +%% A colon separates it from \emph{``job identifiers"} in the actual %% macro names. \def\substr_cond{substr_cond:} +%% %% |\MakeSubstringConditional{<id>}[<changes>]{<pattern>}| -%% starts the definition of a conditional with \emph{identifier} <id> +%% starts the definition of a conditional with identifier <id> %% and pattern <pattern>. <changes> optionally add commands to %% be executed after `\PatternCodes' in a local group. -%% It may be more safe to redefine `\PatternCodes' instead. -\newcommand*{\MakeSubstringConditional}{% - \afterassignment\mk_substr_cond_san \def\cond_id} -\newcommand*{\mk_substr_cond_san}[1][]{% - \begingroup \PatternCodes #1\mk_substr_cond} - %% #1 more changes -%% `\begingroup' |\mk_substr_cond{<pattern>}| +%% +\newcommand*{\MakeSubstringConditional} + {\StartFDsetup\mk_substr_cond} +%% +%% `\begingroup' |\mk_substr_cond{<pattern>}| %% TODO!? 2010/03/22 %% can be directly called by other programmer setup commands when -%% `\cond_id' and <pattern> have been read. +%% `\fdParserId' and <pattern> have been read. \def\mk_substr_cond #1{%% #1 pattern string - \endgroup \@namedef{\substr_cond \cond_id}##1#1##2&} + \endgroup \@namedef{\substr_cond \fdParserId}##1#1##2&} +%% %% This really is not \LaTeX. We are starting defining a macro %% `\substr_cond:<id>' in primitive \TeX\ with `\def' in the form %% \[`\def\substr_cond:<id>#1<pattern>#2&'\] @@ -254,7 +314,7 @@ %% (maybe) #3 etc. and the `{<definition text>}' %% just as with primitive \TeX. %% -%% === Set up sandboxes === +%% === Setup for sandboxes === %% There was a \emph{question:} will we rather see %% \emph{string macros} or \emph{strings from macro arguments}? %% The input file content always comes @@ -272,7 +332,7 @@ %% This way each job, indeed each recursive substitution of a single %% string must start with expanding `\OutputString'. %% -%% On the other hand, there is the idea of \emph{``expandable'' +%% On the other hand, there is the idea of \emph{``expandable" %% chains of substitutions}. We may, e.g., define a macro, say, %% `\manysubstitutions{<macro-name>}', such that %% `\WriteResult{\manysubstitutions{\fdInputLine}}' @@ -293,7 +353,7 @@ %% `setup_substr_cond' is the name space for macros that build %% sandboxes and initialize arguments for conditional macros. \def\setup_substr_cond{setup_substr_cond:} -%% |\MakeSetupSubstringCondition{<id>}[<changes>]{<pattern>}{<more-args>}| +%% \[|\MakeSetupSubstringCondition{<id>}[<changes>]{<pattern>}{<more-args>}|\] %% % <- TODO allow `%' and ` ' for breaking code lines. %% ---same <id>, <changes>, <pattern> as for %% `\MakeSubstringConditional' (this is bad, there may be @@ -303,21 +363,17 @@ %% <more-args> may contain `{#1}' to store the string that was tested, %% also `{<id>}' for calling repetitions and `{<pattern>}' for screen %% or log informations. -\newcommand*{\MakeSetupSubstringCondition}{% - \afterassignment\mk_setup_substr_cond_san \def\cond_id} -\newcommand*{\mk_setup_substr_cond_san}[1][]{% - \begingroup \PatternCodes #1\mk_setup_substr_cond} +\newcommand*{\MakeSetupSubstringCondition} + {\StartFDsetup\mk_setup_substr_cond} %% `\begingroup' |\mk_setup_substr_cond{<pattern>}{<more-args>}| %% can be directly called by other programmer setup commands after -%% `\cond_id' and <pattern> have been read: +%% `\fdParserId' and <pattern> have been read: \def\mk_setup_substr_cond #1#2{%% #1 pattern string, %% #2 additional arguments, e.g., `{#1}' to keep tested string \endgroup \expandafter \edef - \csname \setup_substr_cond \cond_id \endcsname ##1{% -% \expandafter \noexpand -% \csname \substr_cond \cond_id \endcsname %% 2009/04/10: - \make_not_expanding_cs{\substr_cond \cond_id}% + \csname \setup_substr_cond \fdParserId \endcsname ##1{% + \make_not_expanding_cs{\substr_cond \fdParserId}% %% By `\edef', the name of the substring conditional is stored here %% as a single token. The rest of the sandbox follows. ##1\noexpand~#1\dollar_tilde}% @@ -329,7 +385,7 @@ %% The following general tool |\make_not_expanding_cs| has been used %% (many definitions in 'latex.ltx' could have used it): %% 2009/04/10 \def\make_not_expanding_cs#1{% - \expandafter \noexpand \csname #1\endcsname} + \expandafter \noexpand \csname #1\endcsname} %% %% === Getting rid of the tildes === %% |\let~\TildeGobbles| can be used to suppress dummy patterns @@ -340,7 +396,7 @@ \newcommand{\TildeGobbles}{} \def\TildeGobbles#1${} %% |\RemoveDummyPattern| is used to remove the dummy pattern %% \emph{immediately}, not waiting for `\write'ing -%% or other ``total'' expansion: %% 2009/04/13 +%% or other ``total" expansion: %% 2009/04/13 \newcommand{\RemoveDummyPattern}{} \def\RemoveDummyPattern#1~#2${#1} %% |\RemoveDummyPatternArg<macro>{<arg>}| executes %% `\RemoveDummyPattern' in the next argument: @@ -399,13 +455,13 @@ %% (Only the \emph{sandbox} is copied here---what about %% changing conditionals?) %% TODO %% -%% An ``almost'' example is typesetting documentation from a package -%% file where the ``Legalese'' header might be typeset verbatim -%% although it is marked as ``comment.'' (The present %% 2009/04/07 -%% example changes ``hand-made'' macros instead.) +%% An ``almost" example is typesetting documentation from a package +%% file where the ``Legalese" header might be typeset verbatim +%% although it is marked as ``comment." (The present %% 2009/04/07 +%% example changes ``hand-made" macros instead.) %% %% This feature could have been placed more below as a ``programming -%% tool.'' +%% tool." %% %% == Programming tools == %% === Tails of conditionals === @@ -415,12 +471,13 @@ %% nested quite deeply, once perhaps too deep for \TeX's memory. %% To avoid this, you can apply the common `\expandafter' trick %% which finishes the current `\if' ... `\fi' before an inside -%% macro is executed (cf. \TeX book p.~219 on ``tail recursion''). +%% macro is executed (cf. \TeX book p.~219 on ``tail recursion"). %% %% Internally tests whether certain strings are present at certain %% places will be carried out by tests on emptiness or -%% onwards) on starting with `~'. E.g., -%% ``#1~=~<split1> empty'' indicates that either the <pattern> +%% %% onwards) %% !? 2009/12/28 +%% on starting with `~'. E.g., +%% ``#1~=~<split1> empty" indicates that either the <pattern> %% starts a line or the line is empty altogether (this must be %% decided by another test). %% @@ -462,18 +519,18 @@ %% === Line counter === %% A \LaTeX\ counter |fdInputLine| may be useful for screen or log %% messages, moreover you can use it to control processing of the -%% <input> file ``from outside,'' not dependent on what the parsing +%% <input> file ``from outside," not dependent on what the parsing %% macros find. The header of the file might be typeset verbatim, -%% but we may be too lazy to define the ``header'' in terms of +%% but we may be too lazy to define the ``header" in terms of %% what is in the file. We just decide that the first ... lines -%% are the ``header,'' even without counting just trying whether +%% are the ``header," even without counting just trying whether %% the output is fine. It may be necessary to change that number %% manually when the header changes. %% %% You also can insert lines in <output> %% which have no counterpart in <input>---if you know what you are %% doing. With 'makedoc', there is a hook `\EveryComment' that can -%% be used to issue commands ``from outside'' at a place where +%% be used to issue commands ``from outside" at a place where %% executing the command is safe or appropriate. \newcounter{fdInputLine} %% You then must insert |\CountInputLines| in the second argument @@ -491,7 +548,7 @@ \ifnum\c@fdInputLine#1\relax \expandafter \@firstoftwo \else \expandafter \@secondoftwo \fi} %% -%% === The ``identity job'' `LEAVE' === +%% === The ``identity job" `LEAVE' === %% \label{sec:LEAVE} %% The job with identifier |LEAVE| %% \emph{leaves} an (expandable) chain of jobs @@ -516,7 +573,7 @@ %% about what happened or not. With `\edef\OutputString' you can at %% least issue some `changed!' or `left!' (maybe `\message{!}' vs.\ %% `\message{.}'). -%% There is an application in 'makedoc' for ``typographical upgrading'' +%% There is an application in 'makedoc' for ``typographical upgrading" %% from plain text to \TeX\ input. %% %% |\repl_all_chain_expandable| will be the backbone of the @@ -530,7 +587,7 @@ %% The previous line would be somewhat faster, but let us exemplify %% `\IfFDdollar' from section~\ref{sec:tails} instead: \IfFDdollar{#2}% -%% If #2 starts with `$'---with category code 3, ``math shift''!, +%% If #2 starts with `$'---with category code 3, ``math shift"!, %% it \emph{is} `$', due to not reading `$' %% from input with its standard category code 3 %% and the sandbox construction (where `$' appears with its standard @@ -555,25 +612,23 @@ %% the recently skipped <split1> %% plus #4 replacing the string <pattern> that was matched. %% -%% Finally, #5 and #6 again ``recall'' <parser> and the sandbox +%% Finally, #5 and #6 again ``recall" <parser> and the sandbox %% builder to which to change in case of no other match. %% +%% \pagebreak[3] %% 2010/03/22 %% % TODO move following up!? 2009/04/11 -%% |\MakeExpandableAllReplacer{<id>}{<pattern>}{<replace>}{<id-next>}| +%% \[|\MakeExpandableAllReplacer{<id>}[<chng>]{<find>}{<replace>}{<id-next>}|\] %% creates sandbox and parser with common identifier <id> and search -%% pattern <pattern>. Each occurrence of <pattern> will be replaced by -%% <replace>. When <pattern> is not found, the sandbox builder for +%% pattern <find>. Each occurrence of <find> will be replaced by +%% <replace>. When <find> is not found, the sandbox builder for %% <id-next> is called. This may be another replacing macro of the %% same kind. To return the result without further transformations, %% call job `LEAVE' (section~\ref{sec:LEAVE}). -\newcommand*{\MakeExpandableAllReplacer}{% - \afterassignment\mk_setup_xpdbl_all_repl_san - \def\cond_id} -%% ... usual intermezzo for reading patterns with non-standard -%% category codes, this time we read \emph{two} patterns \dots -\newcommand*{\mk_setup_xpdbl_all_repl_san}[1][]{% - \begingroup \PatternCodes #1\mk_setup_xpdbl_all_repl} -%% Here comes the real work. +%% Optional argument <chng> changes category codes locally +%% for reading <find> and <replace>. +%% %% <- added <cat>, <pattern> -> <find> 2010/03/19 +\newcommand*{\MakeExpandableAllReplacer} + {\StartFDsetup\mk_setup_xpdbl_all_repl} \newcommand*{\mk_setup_xpdbl_all_repl}[3]{% %% #1 pattern, #2 substitute, #3 pass to \endgroup @@ -589,7 +644,7 @@ %% words after they have been computed from `\csname' etc. %% Moreover, expansion of the parser commands %% must be avoided another time, when `\@tempa' is executed. - \make_not_expanding_cs{\substr_cond\cond_id}% + \make_not_expanding_cs{\substr_cond\fdParserId}% \noexpand\noexpand \make_not_expanding_cs{\setup_substr_cond #3}}}% %% Those internal setup commands start with `\endgroup' to switch back @@ -600,18 +655,35 @@ \repl_all_chain_expandable{##1}{##2}}} %% The final command is the one that we explained first. %% TODO 2009/04/11 %% -%% Support for dozens of replacements in one sequence -%% and for screen messages -%% must wait for another release, sorry! %% TODO 2009/04/11 +%% \[|\PrependExpandableAllReplacer{<id>}[<cat>]{<find>}{<replace>}|\] +%% is hoped to be a slight relief in composing replacement chains. +%% It does something like invoking `\MakeExpandableAllReplacer' +%% with <prev-setup-id> for the last <next-id> argument +%% where <prev-setup-id> is the <id> of the job that was set up most +%% recently. If you have adjacent lines +%% \begin{quote} +%% \leavevmode\hbox to 0pt\bgroup +%% `\MakeExpandableAllReplacer{<id-0>}{<find-0>}{<subst-0>}{LEAVE}'% +%% \hss\egroup \\ +%% `\PrependExpandableAllReplacer{<id-1>}{<find-1>}{<subst-1>}'\\ +%% `\PrependExpandableAllReplacer{<id-2>}{<find-2>}{<subst-2>}' +%% \end{quote} +%% and call <id-2>, it will call <id-1>, and the latter will call +%% <id-0>. So you can reorder the chain my moving `\Prepend'... lines. +\newcommand*{\PrependExpandableAllReplacer}{% + \let\fdParserId_before\fdParserId + \StartFDsetup\prep_xpdbl_all_repl} +\newcommand*{\prep_xpdbl_all_repl}[2]{% + \mk_setup_xpdbl_all_repl{#1}{#2}{\fdParserId_before}}% %% %% == Leave package mode == %% We restore the underscore `_' for math subscripts. %% (This might better depend on something \dots) %% TODO 2009/04/07 \catcode`\_=8 %% restores underscore use for subscripts - +%% \endinput %% \TeX\ ignores the rest of the file when it is \emph{input} -%% ``in the sense of `\input''', as opposed to just reading +%% ``in the sense of `\input'", as opposed to just reading %% the file line by line to a macro like `\fdInputLine'. %% %% == Pondered == @@ -664,7 +736,7 @@ v0.2 2009/04/05 counter fdInputLine, \ProvidesFile moved from \ProcessInputWith, typos, \WriteProvides message `with' 2009/04/10 \make_not_expanding_cs - DISCOVERED ``IF SUBSTRING'' ALGORITHM WRONG + DISCOVERED ``IF SUBSTRING" ALGORITHM WRONG (<str1><str2><str1> in <str1><str2>) v0.3 2009/04/11 SOME THINGS GIVEN UP EARLIER WILL BE REMOVED, TO BE STORED IN THE COPY AS OF 2009/04/10 @@ -674,3 +746,15 @@ v0.3 2009/04/11 SOME THINGS GIVEN UP EARLIER WILL BE REMOVED, plain `...', `cf.', `etc.' for `mdcorr.cfg' 2009/04/13 \RemoveTilde... 2009/04/15 reworked text, same mistake \in@ +v0.31 2009/04/21f. comments on ted, stringstrings + 2009/12/28 "onwards)" !? "safer", not "more safe" + 2010/03/10 the loop starts + 2010/03/17 corr. t^ete; set up -> setup for + 2010/03/18 TODO EOF, ctan.org/pkg/newfile; non-ASCII + 2010/03/19 extended description of \MakeExpandableAll...; + '' -> " + 2010/03/20 \ctanpkgref + 2010/03/22 \StartFDsetup, \Prepend... + 2010/03/23 URL for `substr.sty' + +TODO: cleveref 2010/03/18 |