diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/expl3/l3quark.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/expl3/l3quark.dtx | 89 |
1 files changed, 41 insertions, 48 deletions
diff --git a/Master/texmf-dist/source/latex/expl3/l3quark.dtx b/Master/texmf-dist/source/latex/expl3/l3quark.dtx index d5db2374451..eb1c092e172 100644 --- a/Master/texmf-dist/source/latex/expl3/l3quark.dtx +++ b/Master/texmf-dist/source/latex/expl3/l3quark.dtx @@ -36,7 +36,7 @@ \RequirePackage{l3names} %</driver|package> %\fi -\GetIdInfo$Id: l3quark.dtx 2036 2010-09-20 20:33:54Z joseph $ +\GetIdInfo$Id: l3quark.dtx 2172 2011-03-03 10:56:49Z will $ {L3 Experimental Quark Commands} %\iffalse %<*driver> @@ -44,9 +44,9 @@ \ProvidesFile{\filename.\filenameext} [\filedate\space v\fileversion\space\filedescription] %\iffalse -\documentclass[full]{l3doc} +\documentclass[full,checktest]{l3doc} \begin{document} -\DocInput{\filename.\filenameext} +\DocInput{l3quark.dtx} \end{document} %</driver> % \fi @@ -79,7 +79,6 @@ % % The documentation needs some updating. % -% % \section{Functions} % % \begin{function}{ \quark_new:N } @@ -90,10 +89,8 @@ % \end{function} % % \begin{function}{% -% \quark_if_no_value_p:n / (EXP) | -% \quark_if_no_value:n / (TF)(EXP) | -% \quark_if_no_value_p:N / (EXP) | -% \quark_if_no_value:N / (TF)(EXP) | +% \quark_if_no_value:n / (pTF) , +% \quark_if_no_value:N / (pTF) , % } % \begin{syntax} % "\quark_if_no_value:nTF" \Arg{token list} \Arg{true code} \Arg{false code} @@ -120,8 +117,7 @@ % \end{function} % % \begin{function}{% -% \quark_if_nil_p:N / (EXP) | -% \quark_if_nil:N / (TF)(EXP) | +% \quark_if_nil:N / (pTF) , % } % \begin{syntax} % "\quark_if_nil:NTF" <token> \Arg{true code} \Arg{false code} @@ -135,12 +131,9 @@ % % % \begin{function}{% -% \quark_if_nil_p:n / (EXP) | -% \quark_if_nil_p:V / (EXP) | -% \quark_if_nil_p:o / (EXP) | -% \quark_if_nil:n / (TF)(EXP) | -% \quark_if_nil:V / (TF)(EXP) | -% \quark_if_nil:o / (TF)(EXP) | +% \quark_if_nil:n / (pTF) , +% \quark_if_nil:V / (pTF) , +% \quark_if_nil:o / (pTF) , % } % \begin{syntax} % "\quark_if_nil:nTF" \Arg{tokens} \Arg{true code} \Arg{false code} @@ -171,9 +164,9 @@ % \end{variable} % % \begin{function}{% -% \quark_if_recursion_tail_stop:N / (EXP) | -% \quark_if_recursion_tail_stop:n / (EXP) | -% \quark_if_recursion_tail_stop:o / (EXP) | +% \quark_if_recursion_tail_stop:N / (EXP) , +% \quark_if_recursion_tail_stop:n / (EXP) , +% \quark_if_recursion_tail_stop:o / (EXP) , % } % \begin{syntax} % "\quark_if_recursion_tail_stop:n" \Arg{list element} \\ @@ -193,9 +186,9 @@ % \end{function} % % \begin{function}{% -% \quark_if_recursion_tail_stop_do:Nn / (EXP) | -% \quark_if_recursion_tail_stop_do:nn / (EXP) | -% \quark_if_recursion_tail_stop_do:on / (EXP) | +% \quark_if_recursion_tail_stop_do:Nn / (EXP) , +% \quark_if_recursion_tail_stop_do:nn / (EXP) , +% \quark_if_recursion_tail_stop_do:on / (EXP) , % } % \begin{syntax} % "\quark_if_recursion_tail_stop_do:nn" @@ -239,6 +232,8 @@ % % \section{\pkg{l3quark} implementation} % +% \TestFiles{m3quark001.lvt} +% % We start by ensuring that the required packages are loaded. % We check for \texttt{l3expan} since this a basic package that is % essential for use of any higher-level package. @@ -253,12 +248,13 @@ % % \begin{macro}{\quark_new:N} % Allocate a new quark. +% \UnitTested % \begin{macrocode} \cs_new_protected_nopar:Npn \quark_new:N #1 { \tl_const:Nn #1 {#1} } % \end{macrocode} % \end{macro} % -% \begin{macro}{\q_stop,\q_no_value,\q_nil} +% \begin{variable}{\q_stop,\q_no_value,\q_nil} % |\q_stop| is often used as a marker in parameter text, % |\q_no_value| is the canonical missing value, and |\q_nil| % represents a nil pointer in some data structures. @@ -267,9 +263,9 @@ \quark_new:N \q_no_value \quark_new:N \q_nil % \end{macrocode} -% \end{macro} +% \end{variable} % -% \begin{macro}{\q_error,\q_mark} +% \begin{variable}{\q_error,\q_mark} % We need two additional quarks. |\q_error| delimits the end of % the computation for purposes of error recovery. |\q_mark| is % used in parameter text when we need a scanning boundary that is @@ -278,10 +274,10 @@ \quark_new:N\q_error \quark_new:N\q_mark % \end{macrocode} -% \end{macro} +% \end{variable} % % -% \begin{macro}{\q_recursion_tail,\q_recursion_stop} +% \begin{variable}{\q_recursion_tail,\q_recursion_stop} % Quarks for ending recursions. Only ever used there! % |\q_recursion_tail| is appended to whatever list structure we are % doing recursion on, meaning it is added as a proper list item with @@ -291,11 +287,12 @@ \quark_new:N\q_recursion_tail \quark_new:N\q_recursion_stop % \end{macrocode} -% \end{macro} +% \end{variable} % -% \begin{macro}{\quark_if_recursion_tail_stop:n} -% \begin{macro}{\quark_if_recursion_tail_stop:N} -% \begin{macro}{\quark_if_recursion_tail_stop:o} +% \begin{macro}{\quark_if_recursion_tail_stop:n, +% \quark_if_recursion_tail_stop:N, +% \quark_if_recursion_tail_stop:o} +% \UnitTested % When doing recursions it is easy to spend a lot of time testing if % we found the end marker. To avoid this, we use a recursion end % marker every time we do this kind of task. Also, if the recursion @@ -315,12 +312,14 @@ \cs_generate_variant:Nn \quark_if_recursion_tail_stop:n {o} % \end{macrocode} % \end{macro} -% \end{macro} -% \end{macro} % -% \begin{macro}{\quark_if_recursion_tail_stop_do:nn} -% \begin{macro}{\quark_if_recursion_tail_stop_do:Nn} -% \begin{macro}{\quark_if_recursion_tail_stop_do:on} +% \begin{macro}{\quark_if_recursion_tail_stop_do:nn, +% \quark_if_recursion_tail_stop_do:Nn, +% \quark_if_recursion_tail_stop_do:on} +% \UnitTested +% These functions are variants of the above that +% inserts tokens into the input stream after a +% recursion process is finalised. % \begin{macrocode} \cs_new:Npn \quark_if_recursion_tail_stop_do:nn #1#2 { \exp_after:wN\if_meaning:w @@ -342,8 +341,6 @@ \cs_generate_variant:Nn \quark_if_recursion_tail_stop_do:nn {on} % \end{macrocode} % \end{macro} -% \end{macro} -% \end{macro} % % \begin{macro}[aux]{\quark_if_recursion_tail_aux:w} % \begin{macrocode} @@ -351,8 +348,8 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\quark_if_no_value_p:N,\quark_if_no_value_p:n} -% \begin{macro}[TF]{\quark_if_no_value:N,\quark_if_no_value:n} +% \begin{macro}[pTF]{\quark_if_no_value:N,\quark_if_no_value:n} +% \UnitTested % Here we test if we found a special quark as the first argument. % We better start with |\q_no_value| as the first argument since % the whole thing may otherwise loop if |#1| is wrongly given @@ -375,10 +372,9 @@ } % \end{macrocode} % \end{macro} -% \end{macro} % -% \begin{macro}{\quark_if_nil_p:N} -% \begin{macro}[TF]{\quark_if_nil:N} +% \begin{macro}[pTF]{\quark_if_nil:N} +% \UnitTested % A function to check for the presence of |\q_nil|. % \begin{macrocode} \prg_new_conditional:Nnn \quark_if_nil:N {p,TF,T,F} { @@ -386,10 +382,9 @@ } % \end{macrocode} % \end{macro} -% \end{macro} % -% \begin{macro}{\quark_if_nil_p:n,\quark_if_nil_p:V,\quark_if_nil_p:o} -% \begin{macro}[TF]{\quark_if_nil:n,\quark_if_nil:V,\quark_if_nil:o} +% \begin{macro}[pTF]{\quark_if_nil:n,\quark_if_nil:V,\quark_if_nil:o} +% \UnitTested % A function to check for the presence of |\q_nil|. % \begin{macrocode} \prg_new_conditional:Nnn \quark_if_nil:n {p,TF,T,F} { @@ -409,13 +404,11 @@ \cs_generate_variant:Nn \quark_if_nil:nF {o} % \end{macrocode} % \end{macro} -% \end{macro} % % % % Show token usage: % \begin{macrocode} - %<*showmemory> \showMemUsage %</showmemory> |