diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx index 14626c67e4f..7b98fe3889a 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3docstrip.dtx @@ -100,7 +100,7 @@ % % To extract the code using \pkg{l3docstrip}, the \enquote{guard} concept % used by \textsf{DocStrip} is extended by introduction of the syntax -% \texttt{\%<@@=\meta{module}}. The \meta{module} name will be used when the +% \texttt{\%<@@=\meta{module}>}. The \meta{module} name will be used when the % code is extracted to replace the |@@|, so that % \begin{verbatim} % %<*package> @@ -123,6 +123,10 @@ % where the |__| indicates that the functions and variables are internal % to the \texttt{foo} module. % +% Use |@@@@| to obtain |@@| in the output (|@@@@@| to get |@@@|). For +% longer pieces of code the replacement can be completely suppressed by +% giving an empty module name, namely using the syntax \texttt{\%<@@=>}. +% % \end{documentation} % % \begin{implementation} @@ -188,7 +192,10 @@ % The argument (|#1|) is the replacement text to use, or if empty an % indicator that no replacement should be done. The search material is % one of |__@@|, |_@@| or |@@|, done in order such that all three will end -% up the same in the output. The replacement function is initialised as a +% up the same in the output. The string |@@@@| is hidden from these +% replacements by temporarily turning it into a pair of letters with +% different category codes, not produced by \pkg{docstrip}; this allows to +% get |@@| in the output. The replacement function is initialised as a % do-nothing for the case where |%<@@=| is never seen. % \begin{macrocode} \begingroup @@ -197,10 +204,12 @@ \ifx\relax#1\relax \let\replaceModuleInLine\empty \else - \def\replaceModuleInLine{% - \replaceAllIn\inLine{__@@}{__#1}% - \replaceAllIn\inLine{_@@}{__#1}% - \replaceAllIn\inLine{@@}{__#1}% + \edef\replaceModuleInLine{% + \noexpand\replaceAllIn\noexpand\inLine{@@@@}{\string aa}% + \noexpand\replaceAllIn\noexpand\inLine{__@@}{__#1}% + \noexpand\replaceAllIn\noexpand\inLine{_@@}{__#1}% + \noexpand\replaceAllIn\noexpand\inLine{@@}{__#1}% + \noexpand\replaceAllIn\noexpand\inLine{\string aa}{@@}% }% \fi } |