summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/functional/functional.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/functional/functional.tex')
-rw-r--r--macros/latex/contrib/functional/functional.tex4112
1 files changed, 2056 insertions, 2056 deletions
diff --git a/macros/latex/contrib/functional/functional.tex b/macros/latex/contrib/functional/functional.tex
index d5bc913ba6..4bed65559a 100644
--- a/macros/latex/contrib/functional/functional.tex
+++ b/macros/latex/contrib/functional/functional.tex
@@ -3,7 +3,7 @@
\documentclass[oneside]{book}
\usepackage[a4paper,margin=2.5cm]{geometry}
-\newcommand*{\myversion}{2022F}
+\newcommand*{\myversion}{2022G}
\newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)}
\newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi}
@@ -162,13 +162,13 @@ We will compare our first example with a similar \verb!Lua! example:
\begin{minipage}{0.55\textwidth}
\begin{codehigh}
\IgnoreSpacesOn
-\PrgNewFunction \MathSquare { m } {
- \IntSet \lTmpaInt {\IntEval {#1 * #1}}
- \Return {\Value \lTmpaInt}
+\prgNewFunction \mathSquare { m } {
+ \intSet \lTmpaInt {\intEval {#1 * #1}}
+ \prgReturn {\expValue \lTmpaInt}
}
\IgnoreSpacesOff
-\MathSquare{5}
-\MathSquare{\MathSquare{5}}
+\mathSquare{5}
+\mathSquare{\mathSquare{5}}
\end{codehigh}
\end{minipage}%
\begin{minipage}{0.45\textwidth}
@@ -185,23 +185,23 @@ print(MathSquare(MathSquare(5)))
\end{minipage}
%\IgnoreSpacesOn
-%\PrgNewFunction \MathSquare { m }{
-% \IntSet \lTmpaInt { \IntEval { #1 * #1 } }
-% \Return { \Value \lTmpaInt }
+%\prgNewFunction \mathSquare { m }{
+% \intSet \lTmpaInt { \intEval { #1 * #1 } }
+% \prgReturn { \expValue \lTmpaInt }
%}
%\IgnoreSpacesOff
-%\MathSquare{5}
-%\MathSquare{\MathSquare{5}}
+%\mathSquare{5}
+%\mathSquare{\mathSquare{5}}
%\IgnoreSpacesOn
-%\PrgNewFunction \MathCubic { m }
+%\prgNewFunction \mathCubic { m }
% {
-% \IntSet \lTmpaInt { \IntEval { #1 * #1 * #1 } }
-% \Return { \Value \lTmpaInt }
+% \intSet \lTmpaInt { \intEval { #1 * #1 * #1 } }
+% \prgReturn { \expValue \lTmpaInt }
% }
%\IgnoreSpacesOff
-%\MathCubic{2}
-%\MathCubic{\MathCubic{2}}
+%\mathCubic{2}
+%\mathCubic{\mathCubic{2}}
Both examples calculate first the square of $5$ and produce $25$,
then calculate the square of $25$ and produce $625$.
@@ -210,11 +210,11 @@ does evaluation of functions from inside to outside,
which means composition of functions works like othe programming languages
such as \verb!Lua! or \verb!JavsScript!.
-You can define new functions with \cs{PrgNewFunction} command.
+You can define new functions with \cs{prgNewFunction} command.
To make composition of functions work as expected,
every function \emph{must not} insert directly any token to the input stream.
Instead, a function \emph{must} pass the result (if any) to \verb!functional! package
-with \cs{Return} command. And \verb!functional! package is responsible for
+with \cs{prgReturn} command. And \verb!functional! package is responsible for
inserting result tokens to the input stream at the appropriate time.
To remove space tokens inside function code in defining functions,
@@ -224,21 +224,21 @@ you'd better put function definitions inside \verb!\IgnoreSpacesOn! and
At the end of this section,
we will compare our factorial example with a similar \verb!Lua! example:
-\begin{minipage}{0.65\textwidth}
+\begin{minipage}{0.68\textwidth}
\begin{codehigh}
\IgnoreSpacesOn
-\PrgNewFunction \Fact { m } {
- \IntCompareTF {#1} = {0} {
- \Return {1}
+\prgNewFunction \mathFact { m } {
+ \intCompareTF {#1} = {0} {
+ \prgReturn {1}
}{
- \Return {\IntEval{#1*\Fact{\IntEval{#1-1}}}}
+ \prgReturn {\intEval{#1*\mathFact{\intEval{#1-1}}}}
}
}
\IgnoreSpacesOff
-\Fact{4}
+\mathFact{4}
\end{codehigh}
\end{minipage}%
-\begin{minipage}{0.35\textwidth}
+\begin{minipage}{0.32\textwidth}
\begin{code}
-- define a function --
function Fact (n)
@@ -254,11 +254,11 @@ print(Fact(4))
\end{minipage}
%\IgnoreSpacesOn
-%\PrgNewFunction \Factorial { m } {
-% \IntCompareTF {#1} = {0} {
-% \Return {1}
+%\prgNewFunction \Factorial { m } {
+% \intCompareTF {#1} = {0} {
+% \prgReturn {1}
% }{
-% \Return { \IntMathMult {#1} { \Factorial { \IntMathSub{#1}{1} } } }
+% \prgReturn { \intMathMult {#1} { \Factorial { \intMathSub{#1}{1} } } }
% }
%}
%\IgnoreSpacesOff
@@ -277,19 +277,19 @@ and you can make every function become a group by setting
\begin{codehigh}
\Functional{scoping=true}
\IgnoreSpacesOn
-\IntSet \lTmpaInt {1}
-\IntVarLog \lTmpaInt % ---- 1
-\PrgNewFunction \SomeFun { } {
- \IntSet \lTmpaInt {2}
- \IntVarLog \lTmpaInt % ---- 2
- \IntCompareTF {1} > {0} {
- \IntSet \lTmpaInt {3}
- \IntVarLog \lTmpaInt % ---- 3
+\intSet \lTmpaInt {1}
+\intVarLog \lTmpaInt % ---- 1
+\prgNewFunction \someFun { } {
+ \intSet \lTmpaInt {2}
+ \intVarLog \lTmpaInt % ---- 2
+ \intCompareTF {1} > {0} {
+ \intSet \lTmpaInt {3}
+ \intVarLog \lTmpaInt % ---- 3
}{ }
- \IntVarLog \lTmpaInt % ---- 2
+ \intVarLog \lTmpaInt % ---- 2
}
-\SomeFun
-\IntVarLog \lTmpaInt % ---- 1
+\someFun
+\intVarLog \lTmpaInt % ---- 1
\IgnoreSpacesOff
\end{codehigh}
\end{minipage}%
@@ -319,7 +319,7 @@ while names of global variables \emph{must} start with \verb!g!.
The difference is that \verb!functional! package provides only one function for setting
both local and global varianbles of the same type,
by checking leading letters of their names. So for integer variables, you can write
-\verb!\IntSet\lTmpaInt{1}! and \verb!\IntSet\gTmpbInt{2}!.
+\verb!\intSet\lTmpaInt{1}! and \verb!\intSet\gTmpbInt{2}!.
The previous example will produce different result
if we change variable from \verb!\lTmpaInt! to \verb!\gTmpaInt!.
@@ -328,19 +328,19 @@ if we change variable from \verb!\lTmpaInt! to \verb!\gTmpaInt!.
\begin{codehigh}
\Functional{scoping=true}
\IgnoreSpacesOn
-\IntSet \gTmpaInt {1}
-\IntVarLog \gTmpaInt % ---- 1
-\PrgNewFunction \SomeFun { } {
- \IntSet \gTmpaInt {2}
- \IntVarLog \gTmpaInt % ---- 2
- \IntCompareTF {1} > {0} {
- \IntSet \gTmpaInt {3}
- \IntVarLog \gTmpaInt % ---- 3
+\intSet \gTmpaInt {1}
+\intVarLog \gTmpaInt % ---- 1
+\prgNewFunction \someFun { } {
+ \intSet \gTmpaInt {2}
+ \intVarLog \gTmpaInt % ---- 2
+ \intCompareTF {1} > {0} {
+ \intSet \gTmpaInt {3}
+ \intVarLog \gTmpaInt % ---- 3
}{ }
- \IntVarLog \gTmpaInt % ---- 3
+ \intVarLog \gTmpaInt % ---- 3
}
-\SomeFun
-\IntVarLog \gTmpaInt % ---- 3
+\someFun
+\intVarLog \gTmpaInt % ---- 3
\IgnoreSpacesOff
\end{codehigh}
\end{minipage}%
@@ -376,48 +376,48 @@ For example, the tracing log of the first example in this chapter will be the fo
% FIXME: spaces at the first line will be removed
%\begin{codehigh}[]
-% [I] \MathSquare{5}
-% [I] \IntEval{5*5}
-% [I] \Expand{\int_eval:n {5*5}}
+% [I] \mathSquare{5}
+% [I] \intEval{5*5}
+% [I] \expWhole{\int_eval:n {5*5}}
% [O] 25
-% [I] \Return{25}
+% [I] \prgReturn{25}
% [O] 25
% [O] 25
-% [I] \IntSet\lTmpaInt {25}
+% [I] \intSet\lTmpaInt {25}
% [O]
-% [I] \Value\lTmpaInt
+% [I] \expValue\lTmpaInt
% [O] 25
-% [I] \Return{25}
+% [I] \prgReturn{25}
% [O] 25
% [O] 25
%\end{codehigh}
\begin{codehigh}[]
-[I] \MathSquare{5}
- [I] \IntEval{5*5}
- [I] \Expand{\int_eval:n {5*5}}
+[I] \mathSquare{5}
+ [I] \intEval{5*5}
+ [I] \expWhole{\int_eval:n {5*5}}
[O] 25
- [I] \Return{25}
+ [I] \prgReturn{25}
[O] 25
[O] 25
- [I] \IntSet{\lTmpaInt }{25}
+ [I] \intSet{\lTmpaInt }{25}
[O]
- [I] \Value{\lTmpaInt }
+ [I] \expValue{\lTmpaInt }
[O] 25
- [I] \Return{25}
+ [I] \prgReturn{25}
[O] 25
[O] 25
-[I] \MathSquare{25}
- [I] \IntEval{25*25}
- [I] \Expand{\int_eval:n {25*25}}
+[I] \mathSquare{25}
+ [I] \intEval{25*25}
+ [I] \expWhole{\int_eval:n {25*25}}
[O] 625
- [I] \Return{625}
+ [I] \prgReturn{625}
[O] 625
[O] 625
- [I] \IntSet{\lTmpaInt }{625}
+ [I] \intSet{\lTmpaInt }{625}
[O]
- [I] \Value{\lTmpaInt }
+ [I] \expValue{\lTmpaInt }
[O] 625
- [I] \Return{625}
+ [I] \prgReturn{625}
[O] 625
[O] 625
\end{codehigh}
@@ -444,8 +444,8 @@ which is good for power users.
\end{code}
\end{minipage}
-Within \verb!functional! package, there is only one command (\cs{PrgNewFunction})
-for defining new functions, which is good for normal users.
+Within \verb!functional! package, there is only one command (\cs{prgNewFunction})
+for defining new functions, which is good for regular users.
The created functions are always protected and accept \verb!\par! in their arguments.
Since \verb!functional! package gets the results of functions by evaluation
@@ -481,45 +481,45 @@ and many expansion functions for expanding them, which are necessary for power u
Within \verb!functional! package, there are only three variants
(\verb!c!, \verb!e!, \verb!V!) are provided, and these variants are defined
-as functions (\cs{Name}, \cs{Expand}, \cs{Value}, respetively),
-which are easier to use for normal users.
+as functions (\cs{expName}, \cs{expWhole}, \cs{expValue}, respetively),
+which are easier to use for regular users.
\begin{demohigh}
\newcommand\test{uvw}
-\Name{test}
+\expName{test}
\end{demohigh}
\begin{demohigh}
\newcommand\test{uvw}
-\Expand{111\test222}
+\expWhole{111\test222}
\end{demohigh}
\begin{demohigh}
-\IntSet\lTmpaInt{123}
-\Value\lTmpaInt
+\intSet\lTmpaInt{123}
+\expValue\lTmpaInt
\end{demohigh}
The most interesting feature is that you can compose these functions.
For example, you can easily get the \verb!v! variant of \verb!expl3! by
-simply composing \cs{Name} and \cs{Value} functions:
+simply composing \cs{expName} and \cs{expValue} functions:
\begin{demohigh}
-\IntSet\lTmpaInt{123}
-\Value{\Name{lTmpaInt}}
+\intSet\lTmpaInt{123}
+\expValue{\expName{lTmpaInt}}
\end{demohigh}
\chapter{Functional Progarmming (\texttt{Prg})}
\section{Deļ¬ning Functions and Conditionals}
-\begin{function}{\PrgNewFunction}
+\begin{function}{\prgNewFunction}
\begin{syntax}
-\cs{PrgNewFunction} \meta{function} \Arg{argument specification} \Arg{code}
+\cs{prgNewFunction} \meta{function} \Arg{argument specification} \Arg{code}
\end{syntax}
Creates protected \meta{function} for evaluating the \meta{code}.
Within the \meta{code}, the parameters (\verb|#1|, \verb|#2|,
\emph{etc.}) will be replaced by those absorbed by the function.
-The returned value \emph{must} be passed with \cs{Return} function.
+The returned value \emph{must} be passed with \cs{prgReturn} function.
The definition is global and an error results if the
\meta{function} is already defined.\par
The \Arg{argument specification} in a list of letters,
@@ -534,103 +534,103 @@ where each letter is one of the following argument specifiers
%\hline
\end{tabular}\par}
The argument manipulation for argument type \texttt{M} or \texttt{m}
-is: if the argument starts with a function defined with \cs{PrgNewFunction},
+is: if the argument starts with a function defined with \cs{prgNewFunction},
the argument will be evaluated and replaced with the returned value.
\end{function}
-\begin{function}{\PrgSetEqFunction}
+\begin{function}{\prgSetEqFunction}
\begin{syntax}
-\cs{PrgSetEqFunction} \meta{function_1} \meta{function_2}
+\cs{prgSetEqFunction} \meta{function_1} \meta{function_2}
\end{syntax}
Sets \meta{function_1} as an alias of \meta{function_2}.
\end{function}
-\begin{function}{\PrgNewConditional}
+\begin{function}{\prgNewConditional}
\begin{syntax}
-\cs{PrgNewConditional} \meta{function} \Arg{argument specification} \Arg{code}
+\cs{prgNewConditional} \meta{function} \Arg{argument specification} \Arg{code}
\end{syntax}
Creates protected conditional \meta{function} for evaluating the \meta{code}.
The returned value of the \meta{function} \emph{must} be either |\cTrueBool|
-or |\cFalseBool| and be passed with \cs{Return} function..
+or |\cFalseBool| and be passed with \cs{prgReturn} function..
The definition is global and an error results if the \meta{function} is already defined.
\par
-Assume the \meta{function} is |\FooIfBar|, then another three functions
-are also created at the same time: |\FooIfBarT|, |\FooIfBarF|, and |\FooIfBarTF|.
+Assume the \meta{function} is |\fooIfBar|, then another three functions
+are also created at the same time: |\fooIfBarT|, |\fooIfBarF|, and |\fooIfBarTF|.
They have extra arguments which are \Arg{true code} or/and \Arg{false code}.
For example, if you write
\begin{codehigh}
-\PrgNewConditional \FooIfBar {Mm} {code with return value \cTrueBool or \cFalseBool}
+\prgNewConditional \fooIfBar {Mm} {code with return value \cTrueBool or \cFalseBool}
\end{codehigh}
Then the following four functions are created:
\begin{itemize}
- \item |\FooIfBar| \meta{arg_1} \Arg{arg_2}
- \item |\FooIfBarT| \meta{arg_1} \Arg{arg_2} \Arg{true code}
- \item |\FooIfBarF| \meta{arg_1} \Arg{arg_2} \Arg{false code}
- \item |\FooIfBarTF| \meta{arg_1} \Arg{arg_2} \Arg{true code} \Arg{false code}
+ \item |\fooIfBar| \meta{arg_1} \Arg{arg_2}
+ \item |\fooIfBarT| \meta{arg_1} \Arg{arg_2} \Arg{true code}
+ \item |\fooIfBarF| \meta{arg_1} \Arg{arg_2} \Arg{false code}
+ \item |\fooIfBarTF| \meta{arg_1} \Arg{arg_2} \Arg{true code} \Arg{false code}
\end{itemize}
\end{function}
\section{Returning Values and Printing Tokens}
-Just like \LuaTeX, \pkg{functional} package also provides \cs{Return} and \cs{Print} functions.
+Just like \LuaTeX, \pkg{functional} package also provides \cs{prgReturn} and \cs{prgPrint} functions.
-\begin{function}{\Return}
+\begin{function}{\prgReturn}
\begin{syntax}
-\cs{Return} \Arg{tokens}
+\cs{prgReturn} \Arg{tokens}
\end{syntax}
Returns \meta{tokens} as result of current function or conditional.
-This function is normally used in the \meta{code} of \cs{PrgNewFunction}
-or \cs{PrgNewConditional}, and it \emph{must} be the last function evaluated in the \meta{code}.
+This function is normally used in the \meta{code} of \cs{prgNewFunction}
+or \cs{prgNewConditional}, and it \emph{must} be the last function evaluated in the \meta{code}.
If it is missing, the return value of the last function evaluated in the \meta{code}
is returned. Therefore, the following two examples produce the same output:
\begin{codehigh}
\IgnoreSpacesOn
-\PrgNewFunction \MathSquare { m } {
- \IntSet \lTmpaInt {\IntEval {#1 * #1}}
- \Return {\Value \lTmpaInt}
+\prgNewFunction \mathSquare { m } {
+ \intSet \lTmpaInt {\intEval {#1 * #1}}
+ \prgReturn {\expValue \lTmpaInt}
}
\IgnoreSpacesOff
-\MathSquare{5}
+\mathSquare{5}
\end{codehigh}
\begin{codehigh}
\IgnoreSpacesOn
-\PrgNewFunction \MathSquare { m } {
- \IntSet \lTmpaInt {\IntEval {#1 * #1}}
- \Value \lTmpaInt
+\prgNewFunction \mathSquare { m } {
+ \intSet \lTmpaInt {\intEval {#1 * #1}}
+ \expValue \lTmpaInt
}
\IgnoreSpacesOff
-\MathSquare{5}
+\mathSquare{5}
\end{codehigh}
\pkg{Functional} package takes care of return values,
and only print them to the input stream if the outer most functions are evaluated.
\end{function}
-\begin{function}{\Print}
+\begin{function}{\prgPrint}
\begin{syntax}
-\cs{Print} \Arg{tokens}
+\cs{prgPrint} \Arg{tokens}
\end{syntax}
Prints \meta{tokens} directly to the input stream.
-If there is no function defined with \cs{PrgNewFunction} in \meta{tokens},
-you can omit \cs{Print} and write only \meta{tokens}.
-But if there is any function defined with \cs{PrgNewFunction} in \meta{tokens},
-you \emph{have to} use \cs{Print} function.
+If there is no function defined with \cs{prgNewFunction} in \meta{tokens},
+you can omit \cs{prgPrint} and write only \meta{tokens}.
+But if there is any function defined with \cs{prgNewFunction} in \meta{tokens},
+you \emph{have to} use \cs{prgPrint} function.
\end{function}
\section{Running Code with Anonymous Functions}
-\begin{function}{\Do}
+\begin{function}{\prgDo}
\begin{syntax}
-\cs{Do} \Arg{code}
+\cs{prgDo} \Arg{code}
\end{syntax}
Treats \meta{code} as an anonymous function without arguments and evaluates it.
\end{function}
-\begin{function}{\PrgRunOneArgCode,\PrgRunTwoArgCode,\PrgRunThreeArgCode,\PrgRunFourArgCode}
+\begin{function}{\prgRunOneArgCode,\prgRunTwoArgCode,\prgRunThreeArgCode,\prgRunFourArgCode}
\begin{syntax}
-\cs{PrgRunOneArgCode} \Arg{arg_1} \Arg{code}
-\cs{PrgRunTwoArgCode} \Arg{arg_1} \Arg{arg_2} \Arg{code}
-\cs{PrgRunThreeArgCode} \Arg{arg_1} \Arg{arg_2} \Arg{arg_3} \Arg{code}
-\cs{PrgRunFourArgCode} \Arg{arg_1} \Arg{arg_2} \Arg{arg_3} \Arg{arg_4} \Arg{code}
+\cs{prgRunOneArgCode} \Arg{arg_1} \Arg{code}
+\cs{prgRunTwoArgCode} \Arg{arg_1} \Arg{arg_2} \Arg{code}
+\cs{prgRunThreeArgCode} \Arg{arg_1} \Arg{arg_2} \Arg{arg_3} \Arg{code}
+\cs{prgRunFourArgCode} \Arg{arg_1} \Arg{arg_2} \Arg{arg_3} \Arg{arg_4} \Arg{code}
\end{syntax}
Treats \meta{code} as an anonymous function with one to four arguments respectively,
and evaluates it. In evaluating the \meta{code}, \pkg{functional} package first evaluates
@@ -642,9 +642,9 @@ with the return values respectively.
\section{Expanding Tokens}
-\begin{function}{\Name}
+\begin{function}{\expName}
\begin{syntax}
-\cs{Name} \Arg{control sequence name}
+\cs{expName} \Arg{control sequence name}
\end{syntax}
Expands the \meta{control sequence name} until only characters
remain, then converts this into a control sequence and returns it.
@@ -660,28 +660,28 @@ when exhaustively expanded.%
%\end{texnote}
\end{function}
-\begin{function}{\Value}
+\begin{function}{\expValue}
\begin{syntax}
-\cs{Value} \meta{variable}
+\cs{expValue} \meta{variable}
\end{syntax}
Recovers the content of a \meta{variable} and returns the value.
An error is raised if the variable does not exist or if it is invalid.
-Note that it is the same as \cs{TlUse} for \meta{tl var}, or \cs{IntUse} for \meta{int var}.
+Note that it is the same as \cs{tlUse} for \meta{tl var}, or \cs{intUse} for \meta{int var}.
\end{function}
-\begin{function}{\Expand}
+\begin{function}{\expWhole}
\begin{syntax}
-\cs{Expand} \Arg{tokens}
+\cs{expWhole} \Arg{tokens}
\end{syntax}
Expands the \meta{tokens} exhaustively and returns the result.
\end{function}
-\begin{function}{\UnExpand}
+\begin{function}{\unExpand}
\begin{syntax}
-\cs{UnExpand} \Arg{tokens}
+\cs{unExpand} \Arg{tokens}
\end{syntax}
-Prevents expansion of the \meta{tokens} inside the argument of \cs{Expand} function.
-The argument of \cs{UnExpand} \emph{must} be surrounded by braces.
+Prevents expansion of the \meta{tokens} inside the argument of \cs{expWhole} function.
+The argument of \cs{unExpand} \emph{must} be surrounded by braces.
%\begin{texnote}
%This is the \eTeX{} \tn{unexpanded} primitive. In an
%|x|-expanding definition (\cs{cs_new:Npx}), \cs{exp_not:n}~|{#1}|
@@ -692,14 +692,14 @@ The argument of \cs{UnExpand} \emph{must} be surrounded by braces.
%\end{texnote}
\end{function}
-\begin{function}{\OnlyName}
+\begin{function}{\onlyName}
\begin{syntax}
-\cs{OnlyName} \Arg{tokens}
+\cs{onlyName} \Arg{tokens}
\end{syntax}
Expands the \meta{tokens} until only characters remain, and then
converts this into a control sequence.
Further expansion of this control sequence is then inhibited
-inside the argument of \cs{Expand} function.
+inside the argument of \cs{expWhole} function.
%\begin{texnote}
%Protected macros that appear in a \texttt{c}-type argument are
%expanded despite being protected; \cs{exp_not:n} also has no
@@ -709,45 +709,45 @@ inside the argument of \cs{Expand} function.
%\end{texnote}
\end{function}
-\begin{function}{\OnlyValue}
+\begin{function}{\onlyValue}
\begin{syntax}
-\cs{OnlyValue} \meta{variable}
+\cs{onlyValue} \meta{variable}
\end{syntax}
Recovers the content of the \meta{variable}, then prevents expansion
-of this material inside the argument of \cs{Expand} function.
+of this material inside the argument of \cs{expWhole} function.
\end{function}
\section{Using Tokens}
-\begin{function}{\UseOne,\GobbleOne}
+\begin{function}{\useOne,\gobbleOne}
\begin{syntax}
-\cs{UseOne} \Arg{argument}
-\cs{GobbleOne} \Arg{argument}
+\cs{useOne} \Arg{argument}
+\cs{gobbleOne} \Arg{argument}
\end{syntax}
-The function \cs{UseOne} absorbs one argument and returns it.
+The function \cs{useOne} absorbs one argument and returns it.
%\begin{texnote}
%The \cs{UseOne} function is equivalent to \LaTeXe{}'s \tn{@firstofone}.
%\end{texnote}
-\cs{GobbleOne} absorbs one argument and returns nothing.
+\cs{gobbleOne} absorbs one argument and returns nothing.
%\begin{texnote}
%These are equivalent to \LaTeXe{}'s \tn{@gobble}, \tn{@gobbbletwo},
%\emph{etc.}
%\end{texnote}
For example
\begin{demohigh}
-\UseOne{abc}\GobbleOne{ijk}\UseOne{xyz}
+\useOne{abc}\gobbleOne{ijk}\useOne{xyz}
\end{demohigh}
\end{function}
-\begin{function}{\UseGobble,\GobbleUse}
+\begin{function}{\useGobble,\gobbleUse}
\begin{syntax}
-\cs{UseGobble} \Arg{arg_1} \Arg{arg_2}
-\cs{GobbleUse} \Arg{arg_1} \Arg{arg_2}
+\cs{useGobble} \Arg{arg_1} \Arg{arg_2}
+\cs{gobbleUse} \Arg{arg_1} \Arg{arg_2}
\end{syntax}
These functions absorb two arguments.
-The function \cs{UseGobble} discards the second argument,
+The function \cs{useGobble} discards the second argument,
and returns the content of the first argument.
-\cs{GobbleUse} discards the first argument,
+\cs{gobbleUse} discards the first argument,
and returns the content of the second argument.
%\begin{texnote}
%These are equivalent to \LaTeXe{}'s \tn{@firstoftwo} and
@@ -755,7 +755,7 @@ and returns the content of the second argument.
%\end{texnote}
For example
\begin{demohigh}
-\UseGobble{abc}{uvw}\GobbleUse{abc}{uvw}
+\useGobble{abc}{uvw}\gobbleUse{abc}{uvw}
\end{demohigh}
\end{function}
@@ -767,8 +767,8 @@ For example
Constants that represent \verb|true| and \verb|false|, respectively. Used to
implement predicates. For example
\begin{demohigh}
-\BoolVarIfTF \cTrueBool {\Return{True!}} {\Return{False!}}
-\BoolVarIfTF \cFalseBool {\Return{True!}} {\Return{False!}}
+\boolVarIfTF \cTrueBool {\prgReturn{True!}} {\prgReturn{False!}}
+\boolVarIfTF \cFalseBool {\prgReturn{True!}} {\prgReturn{False!}}
\end{demohigh}
\end{variable}
@@ -800,13 +800,13 @@ prefix~\verb|!| with their usual precedences (namely, \verb|&&| binds
more tightly than \verb"||"). In addition to this, parentheses can be
used to isolate sub-expressions. For example,
\begin{codehigh}
-\IntCompare {1} = {1} &&
+\intCompare {1} = {1} &&
(
- \IntCompare {2} = {3} ||
- \IntCompare {4} < {4} ||
- \StrIfEq {abc} {def}
+ \intCompare {2} = {3} ||
+ \intCompare {4} < {4} ||
+ \strIfEq {abc} {def}
) &&
-! \IntCompare {2} = {4}
+! \intCompare {2} = {4}
\end{codehigh}
is a valid boolean expression.
@@ -816,200 +816,200 @@ operand is enough to determine the result.
\section{Creating and Setting Booleans}
-\begin{function}{\BoolNew}
+\begin{function}{\boolNew}
\begin{syntax}
-\cs{BoolNew} \meta{boolean}
+\cs{boolNew} \meta{boolean}
\end{syntax}
Creates a new \meta{boolean} or raises an error if the
name is already taken. The declaration is global. The
\meta{boolean} is initially \texttt{false}.
\end{function}
-\begin{function}{\BoolConst}
+\begin{function}{\boolConst}
\begin{syntax}
-\cs{BoolConst} \meta{boolean} \Arg{boolexpr}
+\cs{boolConst} \meta{boolean} \Arg{boolexpr}
\end{syntax}
Creates a new constant \meta{boolean} or raises an error if the name
is already taken. The value of the \meta{boolean} is set globally to
the result of evaluating the \meta{boolexpr}.
For example
\begin{codehigh}
-\BoolConst \cFooSomeBool {\IntCompare{3}>{2}}
-\BoolVarLog \cFooSomeBool
+\boolConst \cFooSomeBool {\intCompare{3}>{2}}
+\boolVarLog \cFooSomeBool
\end{codehigh}
\end{function}
-\begin{function}{\BoolSet}
+\begin{function}{\boolSet}
\begin{syntax}
-\cs{BoolSet} \meta{boolean} \Arg{boolexpr}
+\cs{boolSet} \meta{boolean} \Arg{boolexpr}
\end{syntax}
Evaluates the \meta{boolean expression} and sets the \meta{boolean} variable to
the logical truth of this evaluation.
For example
\begin{codehigh}
-\BoolSet \lTmpaBool {\IntCompare{3}<{4}}
-\BoolVarLog \lTmpaBool
+\boolSet \lTmpaBool {\intCompare{3}<{4}}
+\boolVarLog \lTmpaBool
\end{codehigh}
\begin{codehigh}
-\BoolSet \lTmpaBool {\IntCompare{3}<{4} && \StrIfEq{abc}{uvw}}
-\BoolVarLog \lTmpaBool
+\boolSet \lTmpaBool {\intCompare{3}<{4} && \strIfEq{abc}{uvw}}
+\boolVarLog \lTmpaBool
\end{codehigh}
\end{function}
-\begin{function}{\BoolSetTrue}
+\begin{function}{\boolSetTrue}
\begin{syntax}
-\cs{BoolSetTrue} \meta{boolean}
+\cs{boolSetTrue} \meta{boolean}
\end{syntax}
Sets \meta{boolean} logically \texttt{true}.
\end{function}
-\begin{function}{\BoolSetFalse}
+\begin{function}{\boolSetFalse}
\begin{syntax}
-\cs{BoolSetFalse} \meta{boolean}
+\cs{boolSetFalse} \meta{boolean}
\end{syntax}
Sets \meta{boolean} logically \texttt{false}.
\end{function}
-\begin{function}{\BoolSetEq}
+\begin{function}{\boolSetEq}
\begin{syntax}
-\cs{BoolSetEq} \meta{boolean_1} \meta{boolean_2}
+\cs{boolSetEq} \meta{boolean_1} \meta{boolean_2}
\end{syntax}
Sets \meta{boolean_1} to the current value of \meta{boolean_2}.
For example
\begin{codehigh}
-\BoolSetTrue \lTmpaBool
-\BoolSetEq \lTmpbBool \lTmpaBool
-\BoolVarLog \lTmpbBool
+\boolSetTrue \lTmpaBool
+\boolSetEq \lTmpbBool \lTmpaBool
+\boolVarLog \lTmpbBool
\end{codehigh}
\end{function}
\section{Viewing Booleans}
-\begin{function}{\BoolLog}
+\begin{function}{\boolLog}
\begin{syntax}
-\cs{BoolLog} \Arg{boolean expression}
+\cs{boolLog} \Arg{boolean expression}
\end{syntax}
Writes the logical truth of the \meta{boolean expression} in the log file.
\end{function}
-\begin{function}{\BoolVarLog}
+\begin{function}{\boolVarLog}
\begin{syntax}
-\cs{BoolVarLog} \meta{boolean}
+\cs{boolVarLog} \meta{boolean}
\end{syntax}
Writes the logical truth of the \meta{boolean} in the log file.
\end{function}
-\begin{function}{\BoolShow}
+\begin{function}{\boolShow}
\begin{syntax}
-\cs{BoolShow} \Arg{boolean expression}
+\cs{boolShow} \Arg{boolean expression}
\end{syntax}
Displays the logical truth of the \meta{boolean expression} on the terminal.
\end{function}
-\begin{function}{\BoolVarShow}
+\begin{function}{\boolVarShow}
\begin{syntax}
-\cs{BoolVarShow} \meta{boolean}
+\cs{boolVarShow} \meta{boolean}
\end{syntax}
Displays the logical truth of the \meta{boolean} on the terminal.
\end{function}
\section{Booleans and Conditionals}
-\begin{function}{\BoolIfExist,\BoolIfExistT,\BoolIfExistF,\BoolIfExistTF}
+\begin{function}{\boolIfExist,\boolIfExistT,\boolIfExistF,\boolIfExistTF}
\begin{syntax}
-\cs{BoolIfExist} \meta{boolean}
-\cs{BoolIfExistT} \meta{boolean} \Arg{true code}
-\cs{BoolIfExistF} \meta{boolean} \Arg{false code}
-\cs{BoolIfExistTF} \meta{boolean} \Arg{true code} \Arg{false code}
+\cs{boolIfExist} \meta{boolean}
+\cs{boolIfExistT} \meta{boolean} \Arg{true code}
+\cs{boolIfExistF} \meta{boolean} \Arg{false code}
+\cs{boolIfExistTF} \meta{boolean} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{boolean} is currently defined. This does not
check that the \meta{boolean} really is a boolean variable.
For example
\begin{demohigh}
-\BoolIfExistTF \lTmpaBool {\Return{Yes}} {\Return{No}}
-\BoolIfExistTF \lFooUndefinedBool {\Return{Yes}} {\Return{No}}
+\boolIfExistTF \lTmpaBool {\prgReturn{Yes}} {\prgReturn{No}}
+\boolIfExistTF \lFooUndefinedBool {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarIf,\BoolVarIfT,\BoolVarIfF,\BoolVarIfTF}
+\begin{function}{\boolVarIf,\boolVarIfT,\boolVarIfF,\boolVarIfTF}
\begin{syntax}
-\cs{BoolVarIf} \meta{boolean}
-\cs{BoolVarIfT} \meta{boolean} \Arg{true code}
-\cs{BoolVarIfF} \meta{boolean} \Arg{false code}
-\cs{BoolVarIfTF} \meta{boolean} \Arg{true code} \Arg{false code}
+\cs{boolVarIf} \meta{boolean}
+\cs{boolVarIfT} \meta{boolean} \Arg{true code}
+\cs{boolVarIfF} \meta{boolean} \Arg{false code}
+\cs{boolVarIfTF} \meta{boolean} \Arg{true code} \Arg{false code}
\end{syntax}
Tests the current truth of \meta{boolean}, and continues evaluation
based on this result. For example
\begin{demohigh}
-\BoolSetTrue \lTmpaBool
-\BoolVarIfTF \lTmpaBool {\Return{True!}} {\Return{False!}}
-\BoolSetFalse \lTmpaBool
-\BoolVarIfTF \lTmpaBool {\Return{True!}} {\Return{False!}}
+\boolSetTrue \lTmpaBool
+\boolVarIfTF \lTmpaBool {\prgReturn{True!}} {\prgReturn{False!}}
+\boolSetFalse \lTmpaBool
+\boolVarIfTF \lTmpaBool {\prgReturn{True!}} {\prgReturn{False!}}
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarNot,\BoolVarNotT,\BoolVarNotF,\BoolVarNotTF}
+\begin{function}{\boolVarNot,\boolVarNotT,\boolVarNotF,\boolVarNotTF}
\begin{syntax}
-\cs{BoolVarNot} \meta{boolean}
-\cs{BoolVarNotT} \meta{boolean} \Arg{true code}
-\cs{BoolVarNotF} \meta{boolean} \Arg{false code}
-\cs{BoolVarNotTF} \meta{boolean} \Arg{true code} \Arg{false code}
+\cs{boolVarNot} \meta{boolean}
+\cs{boolVarNotT} \meta{boolean} \Arg{true code}
+\cs{boolVarNotF} \meta{boolean} \Arg{false code}
+\cs{boolVarNotTF} \meta{boolean} \Arg{true code} \Arg{false code}
\end{syntax}
Evaluates \meta{true code} if \meta{boolean} is \verb!false!,
and \meta{false code} if \meta{boolean} is \verb!true!.
For example
\begin{demohigh}
-\BoolVarNotTF {\IntCompare{3}>{2}} {\Return{Yes}} {\Return{No}}
+\boolVarNotTF {\intCompare{3}>{2}} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarAnd,\BoolVarAndT,\BoolVarAndF,\BoolVarAndTF}
+\begin{function}{\boolVarAnd,\boolVarAndT,\boolVarAndF,\boolVarAndTF}
\begin{syntax}
-\cs{BoolVarAnd} \meta{boolean_1} \meta{boolean_2}
-\cs{BoolVarAndT} \meta{boolean_1} \meta{boolean_2} \Arg{true code}
-\cs{BoolVarAndF} \meta{boolean_1} \meta{boolean_2} \Arg{false code}
-\cs{BoolVarAndTF} \meta{boolean_1} \meta{boolean_2} \Arg{true code} \Arg{false code}
+\cs{boolVarAnd} \meta{boolean_1} \meta{boolean_2}
+\cs{boolVarAndT} \meta{boolean_1} \meta{boolean_2} \Arg{true code}
+\cs{boolVarAndF} \meta{boolean_1} \meta{boolean_2} \Arg{false code}
+\cs{boolVarAndTF} \meta{boolean_1} \meta{boolean_2} \Arg{true code} \Arg{false code}
\end{syntax}
Implements the \enquote{And} operation between two booleans,
hence is \texttt{true} if both are \texttt{true}.
%Contrarily to the infix operator \verb|&&|,
%The \meta{boolean_2} is only evaluated if it is needed to determine the result of
-%\cs{BoolVarAnd}.
+%\cs{boolVarAnd}.
For example
\begin{demohigh}
-\BoolVarAndTF {\IntCompare{3}>{2}} {\IntCompare{3}>{4}} {\Return{Yes}} {\Return{No}}
+\boolVarAndTF {\intCompare{3}>{2}} {\intIfOdd{6}} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarOr,\BoolVarOrT,\BoolVarOrF,\BoolVarOrTF}
+\begin{function}{\boolVarOr,\boolVarOrT,\boolVarOrF,\boolVarOrTF}
\begin{syntax}
-\cs{BoolVarOr} \meta{boolean_1} \meta{boolean_2}
-\cs{BoolVarOrT} \meta{boolean_1} \meta{boolean_2} \Arg{true code}
-\cs{BoolVarOrF} \meta{boolean_1} \meta{boolean_2} \Arg{false code}
-\cs{BoolVarOrTF} \meta{boolean_1} \meta{boolean_2} \Arg{true code} \Arg{false code}
+\cs{boolVarOr} \meta{boolean_1} \meta{boolean_2}
+\cs{boolVarOrT} \meta{boolean_1} \meta{boolean_2} \Arg{true code}
+\cs{boolVarOrF} \meta{boolean_1} \meta{boolean_2} \Arg{false code}
+\cs{boolVarOrTF} \meta{boolean_1} \meta{boolean_2} \Arg{true code} \Arg{false code}
\end{syntax}
Implements the \enquote{Or} operation between two booleans,
hence is \texttt{true} if either one is \texttt{true}.
%Contrarily to the infix operator \verb"||",
%The \meta{boolean_2} is only evaluated if it is needed to determine the result of
-%\cs{BoolVarOr}.
+%\cs{boolVarOr}.
For example
\begin{demohigh}
-\BoolVarOrTF {\IntCompare{3}>{2}} {\IntCompare{3}>{4}} {\Return{Yes}} {\Return{No}}
+\boolVarOrTF {\intCompare{3}>{2}} {\intIfOdd{6}} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarXor,\BoolVarXorT,\BoolVarXorF,\BoolVarXorTF}
+\begin{function}{\boolVarXor,\boolVarXorT,\boolVarXorF,\boolVarXorTF}
\begin{syntax}
-\cs{BoolVarXor} \meta{boolean_1} \meta{boolean_2}
-\cs{BoolVarXorT} \meta{boolean_1} \meta{boolean_2} \Arg{true code}
-\cs{BoolVarXorF} \meta{boolean_1} \meta{boolean_2} \Arg{false code}
-\cs{BoolVarXorTF} \meta{boolean_1} \meta{boolean_2} \Arg{true code} \Arg{false code}
+\cs{boolVarXor} \meta{boolean_1} \meta{boolean_2}
+\cs{boolVarXorT} \meta{boolean_1} \meta{boolean_2} \Arg{true code}
+\cs{boolVarXorF} \meta{boolean_1} \meta{boolean_2} \Arg{false code}
+\cs{boolVarXorTF} \meta{boolean_1} \meta{boolean_2} \Arg{true code} \Arg{false code}
\end{syntax}
Implements an \enquote{exclusive or} operation between two booleans.
For example
\begin{demohigh}
-\BoolVarXorTF {\IntCompare{3}>{2}} {\IntCompare{3}>{4}} {\Return{Yes}} {\Return{No}}
+\boolVarXorTF {\intCompare{3}>{2}} {\intIfOdd{6}} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
@@ -1017,9 +1017,9 @@ For example
Loops using either boolean expressions or stored boolean values.
-\begin{function}{\BoolVarDoUntil}
+\begin{function}{\boolVarDoUntil}
\begin{syntax}
-\cs{BoolVarDoUntil} \meta{boolean} \Arg{code}
+\cs{boolVarDoUntil} \meta{boolean} \Arg{code}
\end{syntax}
Places the \meta{code} in the input stream for \TeX{} to process,
and then checks the logical value of the \meta{boolean}. If it is
@@ -1028,22 +1028,22 @@ stream again and the process loops until the \meta{boolean} is
\texttt{true}.
\begin{demohigh}
\IgnoreSpacesOn
-\BoolSetFalse \lTmpaBool
-\IntZero \lTmpaInt
-\ClistClear \lTmpaClist
-\BoolVarDoUntil \lTmpaBool {
- \IntIncr \lTmpaInt
- \ClistPutRight \lTmpaClist {\Value\lTmpaInt}
- \IntCompareT {\lTmpaInt} = {10} {\BoolSetTrue \lTmpaBool}
+\boolSetFalse \lTmpaBool
+\intZero \lTmpaInt
+\clistClear \lTmpaClist
+\boolVarDoUntil \lTmpaBool {
+ \intIncr \lTmpaInt
+ \clistPutRight \lTmpaClist {\expValue\lTmpaInt}
+ \intCompareT {\lTmpaInt} = {10} {\boolSetTrue \lTmpaBool}
}
-\ClistVarJoin \lTmpaClist {:}
+\clistVarJoin \lTmpaClist {:}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarDoWhile}
+\begin{function}{\boolVarDoWhile}
\begin{syntax}
-\cs{BoolVarDoWhile} \meta{boolean} \Arg{code}
+\cs{boolVarDoWhile} \meta{boolean} \Arg{code}
\end{syntax}
Places the \meta{code} in the input stream for \TeX{} to process,
and then checks the logical value of the \meta{boolean}. If it is
@@ -1052,22 +1052,22 @@ stream again and the process loops until the \meta{boolean} is
\texttt{false}.
\begin{demohigh}
\IgnoreSpacesOn
-\BoolSetTrue \lTmpaBool
-\IntZero \lTmpaInt
-\ClistClear \lTmpaClist
-\BoolVarDoWhile \lTmpaBool {
- \IntIncr \lTmpaInt
- \ClistPutRight \lTmpaClist {\Value\lTmpaInt}
- \IntCompareT {\lTmpaInt} = {10} {\BoolSetFalse \lTmpaBool}
+\boolSetTrue \lTmpaBool
+\intZero \lTmpaInt
+\clistClear \lTmpaClist
+\boolVarDoWhile \lTmpaBool {
+ \intIncr \lTmpaInt
+ \clistPutRight \lTmpaClist {\expValue\lTmpaInt}
+ \intCompareT {\lTmpaInt} = {10} {\boolSetFalse \lTmpaBool}
}
-\ClistVarJoin \lTmpaClist {:}
+\clistVarJoin \lTmpaClist {:}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarUntilDo}
+\begin{function}{\boolVarUntilDo}
\begin{syntax}
-\cs{BoolVarUntilDo} \meta{boolean} \Arg{code}
+\cs{boolVarUntilDo} \meta{boolean} \Arg{code}
\end{syntax}
This function firsts checks the logical value of the \meta{boolean}.
If it is \texttt{false} the \meta{code} is placed in the input stream
@@ -1076,22 +1076,22 @@ of the \meta{boolean} is re-evaluated. The process then loops
until the \meta{boolean} is \texttt{true}.
\begin{demohigh}
\IgnoreSpacesOn
-\BoolSetFalse \lTmpaBool
-\IntZero \lTmpaInt
-\ClistClear \lTmpaClist
-\BoolVarUntilDo \lTmpaBool {
- \IntIncr \lTmpaInt
- \ClistPutRight \lTmpaClist {\Value\lTmpaInt}
- \IntCompareT {\lTmpaInt} = {10} {\BoolSetTrue \lTmpaBool}
+\boolSetFalse \lTmpaBool
+\intZero \lTmpaInt
+\clistClear \lTmpaClist
+\boolVarUntilDo \lTmpaBool {
+ \intIncr \lTmpaInt
+ \clistPutRight \lTmpaClist {\expValue\lTmpaInt}
+ \intCompareT {\lTmpaInt} = {10} {\boolSetTrue \lTmpaBool}
}
-\ClistVarJoin \lTmpaClist {:}
+\clistVarJoin \lTmpaClist {:}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\BoolVarWhileDo}
+\begin{function}{\boolVarWhileDo}
\begin{syntax}
-\cs{BoolVarWhileDo} \meta{boolean} \Arg{code}
+\cs{boolVarWhileDo} \meta{boolean} \Arg{code}
\end{syntax}
This function firsts checks the logical value of the \meta{boolean}.
If it is \texttt{true} the \meta{code} is placed in the input stream
@@ -1100,15 +1100,15 @@ of the \meta{boolean} is re-evaluated. The process then loops
until the \meta{boolean} is \texttt{false}.
\begin{demohigh}
\IgnoreSpacesOn
-\BoolSetTrue \lTmpaBool
-\IntZero \lTmpaInt
-\ClistClear \lTmpaClist
-\BoolVarWhileDo \lTmpaBool {
- \IntIncr \lTmpaInt
- \ClistPutRight \lTmpaClist {\Value\lTmpaInt}
- \IntCompareT {\lTmpaInt} = {10} {\BoolSetFalse \lTmpaBool}
+\boolSetTrue \lTmpaBool
+\intZero \lTmpaInt
+\clistClear \lTmpaClist
+\boolVarWhileDo \lTmpaBool {
+ \intIncr \lTmpaInt
+ \clistPutRight \lTmpaClist {\expValue\lTmpaInt}
+ \intCompareT {\lTmpaInt} = {10} {\boolSetFalse \lTmpaBool}
}
-\ClistVarJoin \lTmpaClist {:}
+\clistVarJoin \lTmpaClist {:}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
@@ -1119,13 +1119,13 @@ until the \meta{boolean} is \texttt{false}.
functions to deal with lists of tokens. Token lists may be present
directly in the argument to a function:
\begin{codehigh}
-\TlFoo {a collection of \tokens}
+\tlFoo {a collection of \tokens}
\end{codehigh}
or may be stored in a so-called \enquote{token list variable}, which
have the suffix \texttt{Tl}: a token list variable can also be used as
the argument to a function, for example
\begin{codehigh}
-\TlVarFoo \lSomeTl
+\tlVarFoo \lSomeTl
\end{codehigh}
In both cases, functions are available to test and manipulate the lists
of tokens, and these have the module prefix \texttt{Tl}.
@@ -1136,7 +1136,7 @@ together here.
A token list (explicit, or stored in a variable) can be seen either
as a list of \enquote{items},
-or a list of \enquote{tokens}. An item is whatever \cs{UseOne} would
+or a list of \enquote{tokens}. An item is whatever \cs{useOne} would
grab as its argument: a single non-space token or a brace group,
with optional leading explicit space characters (each item is thus
itself a token list). A token is either a normal \texttt{N} argument,
@@ -1171,7 +1171,7 @@ Constant that is always empty.
%will \emph{not} match the simple text input \verb|-NoValue-|, \emph{i.e.}
%that
%\begin{demohigh}
-%\TlIfEqTF {\TlUse\cNoValueTl} {-NoValue-} {Result{Yes}} {\Return{No}}
+%\tlIfEqTF {\tlUse\cNoValueTl} {-NoValue-} {Result{Yes}} {\prgReturn{No}}
%\end{demohigh}
%The \cs{cNoValueTl} marker is intended for
%use in creating document-level interfaces, where it serves as an indicator
@@ -1195,53 +1195,53 @@ code and so should only be used for short-term storage.
\section{Creating and Using Token Lists}
-\begin{function}{\TlNew}
+\begin{function}{\tlNew}
\begin{syntax}
-\cs{TlNew} \meta{tl var}
+\cs{tlNew} \meta{tl var}
\end{syntax}
Creates a new \meta{tl var} or raises an error if the
name is already taken. The declaration is global. The
\meta{tl~var} is initially empty.
\begin{codehigh}
-\TlNew \lFooSomeTl
+\tlNew \lFooSomeTl
\end{codehigh}
\end{function}
-\begin{function}{\TlConst}
+\begin{function}{\tlConst}
\begin{syntax}
-\cs{TlConst} \meta{tl var} \Arg{token list}
+\cs{tlConst} \meta{tl var} \Arg{token list}
\end{syntax}
Creates a new constant \meta{tl var} or raises an error
if the name is already taken. The value of the
\meta{tl var} is set globally to the \meta{token list}.
\begin{codehigh}
-\TlConst \cFooSomeTl {abc}
+\tlConst \cFooSomeTl {abc}
\end{codehigh}
\end{function}
-\begin{function}{\TlUse}
+\begin{function}{\tlUse}
\begin{syntax}
-\cs{TlUse} \meta{tl~var}
+\cs{tlUse} \meta{tl~var}
\end{syntax}
Recovers the content of a \meta{tl~var} and returns the value.
An error is raised if the variable
does not exist or if it is invalid. Note that it is possible to use
a \meta{tl~var} directly without an accessor function.
\begin{codehigh}
-\TlUse \lTmpbTl
+\tlUse \lTmpbTl
\end{codehigh}
\end{function}
-\begin{function}{\TlToStr}
+\begin{function}{\tlToStr}
\begin{syntax}
-\cs{TlToStr} \Arg{token list}
+\cs{tlToStr} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string}, returning the
resulting character tokens. A \meta{string}
is a series of tokens with category code $12$ (other) with the exception
of spaces, which retain category code $10$ (space).
\begin{demohigh}
-\TlToStr {12\abc34}
+\tlToStr {12\abc34}
\end{demohigh}
%This function requires only a single expansion.
%Its argument \emph{must} be braced.
@@ -1274,52 +1274,52 @@ of spaces, which retain category code $10$ (space).
%\end{texnote}
\end{function}
-\begin{function}{\TlVarToStr}
+\begin{function}{\tlVarToStr}
\begin{syntax}
-\cs{TlVarToStr} \meta{tl var}
+\cs{tlVarToStr} \meta{tl var}
\end{syntax}
Converts the content of the \meta{tl var} to a string, returning the
resulting character tokens. A \meta{string}
is a series of tokens with category code $12$ (other) with the exception
of spaces, which retain category code $10$ (space).
\begin{demohigh}
-\TlSet \lTmpaTl {12\abc34}
-\TlVarToStr \lTmpaTl
+\tlSet \lTmpaTl {12\abc34}
+\tlVarToStr \lTmpaTl
\end{demohigh}
\end{function}
\section{Viewing Token Lists}
-\begin{function}{\TlLog}
+\begin{function}{\tlLog}
\begin{syntax}
-\cs{TlLog} \Arg{token list}
+\cs{tlLog} \Arg{token list}
\end{syntax}
Writes the \meta{token list} in the log file. See also
-\cs{TlShow} which displays the result in the terminal.
+\cs{tlShow} which displays the result in the terminal.
\begin{codehigh}
-\TlLog {123\abc456}
+\tlLog {123\abc456}
\end{codehigh}
\end{function}
-\begin{function}{\TlVarLog}
+\begin{function}{\tlVarLog}
\begin{syntax}
-\cs{TlVarLog} \meta{tl var}
+\cs{tlVarLog} \meta{tl var}
\end{syntax}
Writes the content of the \meta{tl var} in the log file. See also
-\cs{TlVarShow} which displays the result in the terminal.
+\cs{tlVarShow} which displays the result in the terminal.
\begin{codehigh}
-\TlSet \lTmpaTl {123\abc456}
-\TlVarLog \lTmpaTl
+\tlSet \lTmpaTl {123\abc456}
+\tlVarLog \lTmpaTl
\end{codehigh}
\end{function}
-\begin{function}{\TlShow}
+\begin{function}{\tlShow}
\begin{syntax}
-\cs{TlShow} \Arg{token list}
+\cs{tlShow} \Arg{token list}
\end{syntax}
Displays the \meta{token list} on the terminal.
\begin{codehigh}
-\TlShow {123\abc456}
+\tlShow {123\abc456}
\end{codehigh}
%\begin{texnote}
%This is similar to the \eTeX{} primitive \tn{showtokens}, wrapped
@@ -1327,14 +1327,14 @@ Displays the \meta{token list} on the terminal.
%\end{texnote}
\end{function}
-\begin{function}{\TlVarShow}
+\begin{function}{\tlVarShow}
\begin{syntax}
-\cs{TlVarShow} \meta{tl var}
+\cs{tlVarShow} \meta{tl var}
\end{syntax}
Displays the content of the \meta{tl var} on the terminal.
\begin{codehigh}
-\TlSet \lTmpaTl {123\abc456}
-\TlVarShow \lTmpaTl
+\tlSet \lTmpaTl {123\abc456}
+\tlVarShow \lTmpaTl
\end{codehigh}
%\begin{texnote}
%This is similar to the \TeX{} primitive \tn{show}, wrapped to a
@@ -1344,91 +1344,91 @@ Displays the content of the \meta{tl var} on the terminal.
\section{Setting Token List Variables}
-\begin{function}{\TlSet}
+\begin{function}{\tlSet}
\begin{syntax}
-\cs{TlSet} \meta{tl~var} \Arg{tokens}
+\cs{tlSet} \meta{tl~var} \Arg{tokens}
\end{syntax}
Sets \meta{tl~var} to contain \meta{tokens},
removing any previous content from the variable.
\begin{demohigh}
-\TlSet \lTmpiTl {\IntMathMult{4}{5}}
-\TlUse \lTmpiTl
+\tlSet \lTmpiTl {\intMathMult{4}{5}}
+\tlUse \lTmpiTl
\end{demohigh}
\end{function}
-\begin{function}{\TlSetEq}
+\begin{function}{\tlSetEq}
\begin{syntax}
-\cs{TlSetEq} \meta{tl var_1} \meta{tl var_2}
+\cs{tlSetEq} \meta{tl var_1} \meta{tl var_2}
\end{syntax}
Sets the content of \meta{tl var_1} equal to that of \meta{tl var_2}.
\begin{demohigh}
-\TlSet \lTmpaTl {abc}
-\TlSetEq \lTmpbTl \lTmpaTl
-\TlUse \lTmpbTl
+\tlSet \lTmpaTl {abc}
+\tlSetEq \lTmpbTl \lTmpaTl
+\tlUse \lTmpbTl
\end{demohigh}
\end{function}
-\begin{function}{\TlClear}
+\begin{function}{\tlClear}
\begin{syntax}
-\cs{TlClear} \meta{tl~var}
+\cs{tlClear} \meta{tl~var}
\end{syntax}
Clears all entries from the \meta{tl~var}.
\begin{demohigh}
-\TlSet \lTmpjTl {One}
-\TlClear \lTmpjTl
-\TlSet \lTmpjTl {Two}
-\TlUse \lTmpjTl
+\tlSet \lTmpjTl {One}
+\tlClear \lTmpjTl
+\tlSet \lTmpjTl {Two}
+\tlUse \lTmpjTl
\end{demohigh}
\end{function}
-\begin{function}{\TlClearNew}
+\begin{function}{\tlClearNew}
\begin{syntax}
-\cs{TlClearNew} \meta{tl var}
+\cs{tlClearNew} \meta{tl var}
\end{syntax}
Ensures that the \meta{tl var} exists globally by applying
-\cs{TlNew} if necessary, then applies \cs{TlClear} to leave
+\cs{tlNew} if necessary, then applies \cs{tlClear} to leave
the \meta{tl var} empty.
\begin{codehigh}
-\TlClearNew \lFooSomeTl
+\tlClearNew \lFooSomeTl
\end{codehigh}
\end{function}
-\begin{function}{\TlConcat}
+\begin{function}{\tlConcat}
\begin{syntax}
-\cs{TlConcat} \meta{tl var_1} \meta{tl var_2} \meta{tl var_3}
+\cs{tlConcat} \meta{tl var_1} \meta{tl var_2} \meta{tl var_3}
\end{syntax}
Concatenates the content of \meta{tl var_2} and \meta{tl var_3}
together and saves the result in \meta{tl var_1}. The \meta{tl var_2}
is placed at the left side of the new token list.
\begin{demohigh}
-\TlSet \lTmpbTl {con}
-\TlSet \lTmpcTl {cat}
-\TlConcat \lTmpaTl \lTmpbTl \lTmpcTl
-\TlUse \lTmpaTl
+\tlSet \lTmpbTl {con}
+\tlSet \lTmpcTl {cat}
+\tlConcat \lTmpaTl \lTmpbTl \lTmpcTl
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlPutLeft}
+\begin{function}{\tlPutLeft}
\begin{syntax}
-\cs{TlPutLeft} \meta{tl~var} \Arg{tokens}
+\cs{tlPutLeft} \meta{tl~var} \Arg{tokens}
\end{syntax}
Appends \meta{tokens} to the left side of the current content of \meta{tl~var}.
\begin{demohigh}
-\TlSet \lTmpkTl {Functional}
-\TlPutLeft \lTmpkTl {Hello}
-\TlUse \lTmpkTl
+\tlSet \lTmpkTl {Functional}
+\tlPutLeft \lTmpkTl {Hello}
+\tlUse \lTmpkTl
\end{demohigh}
\end{function}
-\begin{function}{\TlPutRight}
+\begin{function}{\tlPutRight}
\begin{syntax}
-\cs{TlPutRight} \meta{tl~var} \Arg{tokens}
+\cs{tlPutRight} \meta{tl~var} \Arg{tokens}
\end{syntax}
Appends \meta{tokens} to the right side of the current content of \meta{tl~var}.
\begin{demohigh}
-\TlSet \lTmpkTl {Functional}
-\TlPutRight \lTmpkTl {World}
-\TlUse \lTmpkTl
+\tlSet \lTmpkTl {Functional}
+\tlPutRight \lTmpkTl {World}
+\tlUse \lTmpkTl
\end{demohigh}
\end{function}
@@ -1438,9 +1438,9 @@ Within token lists, replacement takes place at the top level: there is
no recursion into brace groups (more precisely, within a group defined by
a categroy code $1$/$2$ pair).
-\begin{function}{\TlVarReplaceOnce}
+\begin{function}{\tlVarReplaceOnce}
\begin{syntax}
-\cs{TlVarReplaceOnce} \meta{tl var} \Arg{old tokens} \Arg{new tokens}
+\cs{tlVarReplaceOnce} \meta{tl var} \Arg{old tokens} \Arg{new tokens}
\end{syntax}
Replaces the first (leftmost) occurrence of \meta{old tokens} in the
\meta{tl var} with \meta{new tokens}. \meta{Old tokens}
@@ -1448,15 +1448,15 @@ cannot contain \verb|{|, \verb|}| or \verb|#|
(more precisely, explicit character tokens with category code $1$
(begin-group) or $2$ (end-group), and tokens with category code $6$).
\begin{demohigh}
-\TlSet \lTmpaTl {1{bc}2bc3}
-\TlVarReplaceOnce \lTmpaTl {bc} {xx}
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {1{bc}2bc3}
+\tlVarReplaceOnce \lTmpaTl {bc} {xx}
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlVarReplaceAll}
+\begin{function}{\tlVarReplaceAll}
\begin{syntax}
-\cs{TlVarReplaceAll} \meta{tl var} \Arg{old tokens} \Arg{new tokens}
+\cs{tlVarReplaceAll} \meta{tl var} \Arg{old tokens} \Arg{new tokens}
\end{syntax}
Replaces all occurrences of \meta{old tokens} in the
\meta{tl var} with \meta{new tokens}. \meta{Old tokens}
@@ -1465,32 +1465,32 @@ cannot contain \verb|{|, \verb|}| or \verb|#|
(begin-group) or $2$ (end-group), and tokens with category code $6$).
As this function
operates from left to right, the pattern \meta{old tokens}
-may remain after the replacement (see \cs{TlVarRemoveAll} for an example).
+may remain after the replacement (see \cs{tlVarRemoveAll} for an example).
\begin{demohigh}
-\TlSet \lTmpaTl {1{bc}2bc3}
-\TlVarReplaceAll \lTmpaTl {bc} {xx}
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {1{bc}2bc3}
+\tlVarReplaceAll \lTmpaTl {bc} {xx}
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlVarRemoveOnce}
+\begin{function}{\tlVarRemoveOnce}
\begin{syntax}
-\cs{TlVarRemoveOnce} \meta{tl var} \Arg{tokens}
+\cs{tlVarRemoveOnce} \meta{tl var} \Arg{tokens}
\end{syntax}
Removes the first (leftmost) occurrence of \meta{tokens} from the
\meta{tl var}. \meta{Tokens} cannot contain \verb|{|, \verb|}| or \verb|#|
(more precisely, explicit character tokens with category code $1$
(begin-group) or $2$ (end-group), and tokens with category code $6$).
\begin{demohigh}
-\TlSet \lTmpaTl {1{bc}2bc3}
-\TlVarRemoveOnce \lTmpaTl {bc}
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {1{bc}2bc3}
+\tlVarRemoveOnce \lTmpaTl {bc}
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlVarRemoveAll}
+\begin{function}{\tlVarRemoveAll}
\begin{syntax}
-\cs{TlVarRemoveAll} \meta{tl var} \Arg{tokens}
+\cs{tlVarRemoveAll} \meta{tl var} \Arg{tokens}
\end{syntax}
Removes all occurrences of \meta{tokens} from the
\meta{tl var}. \meta{Tokens} cannot contain \verb|{|, \verb|}| or \verb|#|
@@ -1500,21 +1500,21 @@ As this function
operates from left to right, the pattern \meta{tokens}
may remain after the removal, for instance,
\begin{demohigh}
-\TlSet \lTmpaTl {abbccd}
-\TlVarRemoveAll \lTmpaTl {bc}
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {abbccd}
+\tlVarRemoveAll \lTmpaTl {bc}
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlTrimSpaces}
+\begin{function}{\tlTrimSpaces}
\begin{syntax}
-\cs{TlTrimSpaces} \Arg{token list}
+\cs{tlTrimSpaces} \Arg{token list}
\end{syntax}
Removes any leading and trailing explicit space characters
(explicit tokens with character code $32$ and category code $10$)
from the \meta{token list} and returns the result.
\begin{demohigh}
-Foo\TlTrimSpaces { 12 34 }Bar
+Foo\tlTrimSpaces { 12 34 }Bar
\end{demohigh}
%\begin{texnote}
%The result is returned within \tn{unexpanded}, which means that the token
@@ -1523,52 +1523,52 @@ Foo\TlTrimSpaces { 12 34 }Bar
%\end{texnote}
\end{function}
-\begin{function}{\TlVarTrimSpaces}
+\begin{function}{\tlVarTrimSpaces}
\begin{syntax}
-\cs{TlVarTrimSpaces} \meta{tl var}
+\cs{tlVarTrimSpaces} \meta{tl var}
\end{syntax}
Sets the \meta{tl var} to contain the result of removing any leading
and trailing explicit space characters (explicit tokens with
character code $32$ and category code $10$) from its contents.
\begin{demohigh}
-\TlSet \lTmpaTl { 12 34 }
-\TlVarTrimSpaces \lTmpaTl
-Foo\TlUse \lTmpaTl Bar
+\tlSet \lTmpaTl { 12 34 }
+\tlVarTrimSpaces \lTmpaTl
+Foo\tlUse \lTmpaTl Bar
\end{demohigh}
\end{function}
\section{Working with the Content of Token Lists}
-\begin{function}{\TlCount}
+\begin{function}{\tlCount}
\begin{syntax}
-\cs{TlCount} \Arg{tokens}
+\cs{tlCount} \Arg{tokens}
\end{syntax}
Counts the number of \meta{items} in \meta{tokens} and returns this information.
Unbraced tokens count as one element as do each token group (\verb|{|$\cdots$\verb|}|).
-This process ignores any unprotected spaces within \meta{tokens}. %See also \cs{TlVarCount}.
+This process ignores any unprotected spaces within \meta{tokens}. %See also \cs{tlVarCount}.
%This function requires three expansions, giving an \meta{integer denotation}.
\begin{demohigh}
-\TlCount {12\abc34}
+\tlCount {12\abc34}
\end{demohigh}
\end{function}
-\begin{function}{\TlVarCount}
+\begin{function}{\tlVarCount}
\begin{syntax}
-\cs{TlVarCount} \meta{tl var}
+\cs{tlVarCount} \meta{tl var}
\end{syntax}
Counts the number of \meta{items} in the \meta{tl var} and returns this information.
Unbraced tokens count as one element as do each token group (\verb|{|$\cdots$\verb|}|).
-This process ignores any unprotected spaces within the \meta{tl var}. %See also \cs{TlCount}.
+This process ignores any unprotected spaces within the \meta{tl var}. %See also \cs{tlCount}.
%This function requires three expansions, giving an \meta{integer denotation}.
\begin{demohigh}
-\TlSet \lTmpaTl {12\abc34}
-\TlVarCount \lTmpaTl
+\tlSet \lTmpaTl {12\abc34}
+\tlVarCount \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlHead}
+\begin{function}{\tlHead}
\begin{syntax}
-\cs{TlHead} \Arg{token list}
+\cs{tlHead} \Arg{token list}
\end{syntax}
Returns the first \meta{item} in the \meta{token list},
discarding the rest of the \meta{token list}.
@@ -1576,17 +1576,17 @@ All leading explicit space characters
(explicit tokens with character code $32$ and category code $10$)
are discarded; for example
\begin{demohigh}
-\fbox {1\TlHead{ abc }2}
-\fbox {1\TlHead{ abc }2}
+\fbox {1\tlHead{ abc }2}
+\fbox {1\tlHead{ abc }2}
\end{demohigh}
If the \enquote{head} is a brace group, rather than a single token,
the braces are removed, and so
\begin{codehigh}
-\TlHead { { ab} c }
+\tlHead { { ab} c }
\end{codehigh}
yields \verb*| ab|.
-A blank \meta{token list} (see \cs{TlIfBlank}) results in
-\cs{TlHead} returning nothing.
+A blank \meta{token list} (see \cs{tlIfBlank}) results in
+\cs{tlHead} returning nothing.
%\begin{texnote}
%The result is returned within \cs{exp_not:n}, which means that the token
%list does not expand further when appearing in an \texttt{x}-type
@@ -1594,37 +1594,37 @@ A blank \meta{token list} (see \cs{TlIfBlank}) results in
%\end{texnote}
\end{function}
-\begin{function}{\TlVarHead}
+\begin{function}{\tlVarHead}
\begin{syntax}
-\cs{TlVarHead} \meta{tl var}
+\cs{tlVarHead} \meta{tl var}
\end{syntax}
Returns the first \meta{item} in the \meta{tl var},
discarding the rest of the \meta{tl var}.
All leading explicit space characters (explicit tokens with character code $32$
and category code $10$) are discarded.
\begin{demohigh}
-\TlSet \lTmpaTl {HELLO}
-\TlVarHead \lTmpaTl
+\tlSet \lTmpaTl {HELLO}
+\tlVarHead \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlTail}
+\begin{function}{\tlTail}
\begin{syntax}
-\cs{TlTail} \Arg{token list}
+\cs{tlTail} \Arg{token list}
\end{syntax}
Discards all leading explicit space characters
(explicit tokens with character code $32$ and category code $10$)
and the first \meta{item} in the \meta{token list}, and returns the
remaining tokens. Thus for example
\begin{codehigh}
-\TlTail { a {bc} d }
+\tlTail { a {bc} d }
\end{codehigh}
and
\begin{codehigh}
-\TlTail { a {bc} d }
+\tlTail { a {bc} d }
\end{codehigh}
-both return \verb*| {bc} d |. A blank \meta{token list} (see \cs{TlIfBlank})
-results in \cs{TlTail} returning nothing.
+both return \verb*| {bc} d |. A blank \meta{token list} (see \cs{tlIfBlank})
+results in \cs{tlTail} returning nothing.
%\begin{texnote}
%The result is returned within \cs{exp_not:n}, which means that the
%token list does not expand further when appearing in an \texttt{x}-type
@@ -1632,24 +1632,24 @@ results in \cs{TlTail} returning nothing.
%\end{texnote}
\end{function}
-\begin{function}{\TlVarTail}
+\begin{function}{\tlVarTail}
\begin{syntax}
-\cs{TlVarTail} \meta{tl var}
+\cs{tlVarTail} \meta{tl var}
\end{syntax}
Discards all leading explicit space characters
(explicit tokens with character code $32$ and category code $10$)
and the first \meta{item} in the \meta{tl var}, and returns the
remaining tokens.
\begin{demohigh}
-\TlSet \lTmpaTl {HELLO}
-\TlVarTail \lTmpaTl
+\tlSet \lTmpaTl {HELLO}
+\tlVarTail \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\TlItem,\TlVarItem}
+\begin{function}{\tlItem,\tlVarItem}
\begin{syntax}
-\cs{TlItem} \Arg{token list} \Arg{integer expression}
-\cs{TlVarItem} \meta{tl var} \Arg{integer expression}
+\cs{tlItem} \Arg{token list} \Arg{integer expression}
+\cs{tlVarItem} \meta{tl var} \Arg{integer expression}
\end{syntax}
Indexing items in the \meta{token list} from $1$ on the left, this
function evaluates the \meta{integer expression} and returns the
@@ -1658,7 +1658,7 @@ If the \meta{integer expression} is negative, indexing occurs from
the right of the token list, starting at $-1$ for the right-most item.
If the index is out of bounds, then the function returns nothing.
\begin{demohigh}
-\TlItem {abcd} {3}
+\tlItem {abcd} {3}
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -1668,17 +1668,17 @@ If the index is out of bounds, then the function returns nothing.
%\end{texnote}
\end{function}
-\begin{function}{\TlRandItem,\TlVarRandItem}
+\begin{function}{\tlRandItem,\tlVarRandItem}
\begin{syntax}
-\cs{TlRandItem} \Arg{token list}
-\cs{TlVarRandItem} \meta{tl var}
+\cs{tlRandItem} \Arg{token list}
+\cs{tlVarRandItem} \meta{tl var}
\end{syntax}
Selects and returns a pseudo-random item of the \meta{token list}.
If the \meta{token list} is blank, the result is empty.
%This is not available in older versions of \XeTeX{}.
\begin{demohigh}
-\TlRandItem {abcdef}
-\TlRandItem {abcdef}
+\tlRandItem {abcdef}
+\tlRandItem {abcdef}
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -1694,9 +1694,9 @@ All mappings are done at the current group level, \emph{i.e.} any
local assignments made by the \meta{function} or \meta{code} discussed
below remain in effect after the loop.
-%\begin{function}{\TlMapFunction}
+%\begin{function}{\tlMapFunction}
%\begin{syntax}
-%\cs{TlMapFunction} \Arg{token list} \meta{function}
+%\cs{tlMapFunction} \Arg{token list} \meta{function}
%\end{syntax}
%Applies \meta{function} to every \meta{item} in the \meta{token list},
%The \meta{function} receives one argument for each iteration.
@@ -1705,9 +1705,9 @@ below remain in effect after the loop.
%\texttt{n}-type arguments.
%\end{function}
%
-%\begin{function}{\TlVarMapFunction}
+%\begin{function}{\tlVarMapFunction}
%\begin{syntax}
-%\cs{TlVarMapFunction} \meta{tl var} \meta{function}
+%\cs{tlVarMapFunction} \meta{tl var} \meta{function}
%\end{syntax}
%Applies \meta{function} to every \meta{item} in the \meta{tl var}.
%The \meta{function} receives one argument for each iteration.
@@ -1716,47 +1716,47 @@ below remain in effect after the loop.
%\texttt{n}-type arguments.
%\end{function}
-\begin{function}{\TlMapInline}
+\begin{function}{\tlMapInline}
\begin{syntax}
-\cs{TlMapInline} \Arg{token list} \Arg{inline function}
+\cs{tlMapInline} \Arg{token list} \Arg{inline function}
\end{syntax}
Applies the \meta{inline function} to every \meta{item} stored within the
\meta{token list}. The \meta{inline function} should consist of code which
receives the \meta{item} as \verb|#1|.
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\TlMapInline {one} {
- \TlPutRight \lTmpaTl {[#1]}
+\tlClear \lTmpaTl
+\tlMapInline {one} {
+ \tlPutRight \lTmpaTl {[#1]}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\TlVarMapInline}
+\begin{function}{\tlVarMapInline}
\begin{syntax}
-\cs{TlVarMapInline} \meta{tl var} \Arg{inline function}
+\cs{tlVarMapInline} \meta{tl var} \Arg{inline function}
\end{syntax}
Applies the \meta{inline function} to every \meta{item} stored within the
\meta{tl var}. The \meta{inline function} should consist of code which
receives the \meta{item} as \verb|#1|.
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\TlSet \lTmpkTl {one}
-\TlVarMapInline \lTmpkTl {
- \TlPutRight \lTmpaTl {[#1]}
+\tlClear \lTmpaTl
+\tlSet \lTmpkTl {one}
+\tlVarMapInline \lTmpkTl {
+ \tlPutRight \lTmpaTl {[#1]}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\TlMapTokens,\TlVarMapTokens}
+%\begin{function}{\tlMapTokens,\tlVarMapTokens}
%\begin{syntax}
-%\cs{TlMapTokens} \Arg{tokens} \Arg{code}
-%\cs{TlVarMapTokens} \meta{tl var} \Arg{code}
+%\cs{tlMapTokens} \Arg{tokens} \Arg{code}
+%\cs{tlVarMapTokens} \meta{tl var} \Arg{code}
%\end{syntax}
%Analogue of \cs{tl_map_function:NN} which maps several tokens
%instead of a single function. The \meta{code} receives each \meta{item} in
@@ -1771,9 +1771,9 @@ receives the \meta{item} as \verb|#1|.
%\cs{tl_map_inline:Nn} is typically faster but is not expandable.
%\end{function}
-\begin{function}{\TlMapVariable}
+\begin{function}{\tlMapVariable}
\begin{syntax}
-\cs{TlMapVariable} \Arg{token list} \meta{variable} \Arg{code}
+\cs{tlMapVariable} \Arg{token list} \meta{variable} \Arg{code}
\end{syntax}
Stores each \meta{item} of the \meta{token list} in turn in the
(token list) \meta{variable} and applies the \meta{code}. The
@@ -1783,18 +1783,18 @@ Its value after the loop is the last \meta{item} in the
\meta{tl var}, or its original value if the \meta{tl var} is blank.
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\TlMapVariable {one} \lTmpiTl {
- \TlPutRight \lTmpaTl {\Expand {[\lTmpiTl]}}
+\tlClear \lTmpaTl
+\tlMapVariable {one} \lTmpiTl {
+ \tlPutRight \lTmpaTl {\expWhole {[\lTmpiTl]}}
}
-\Return{\TlUse\lTmpaTl}
+\prgReturn{\tlUse\lTmpaTl}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\TlVarMapVariable}
+\begin{function}{\tlVarMapVariable}
\begin{syntax}
-\cs{TlVarMapVariable} \meta{tl var} \meta{variable} \Arg{code}
+\cs{tlVarMapVariable} \meta{tl var} \meta{variable} \Arg{code}
\end{syntax}
Stores each \meta{item} of the \meta{tl var} in turn in the (token
list) \meta{variable} and applies the \meta{code}. The \meta{code}
@@ -1804,19 +1804,19 @@ value after the loop is the last \meta{item} in the \meta{tl var},
or its original value if the \meta{tl var} is blank.
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\TlSet \lTmpkTl {one}
-\TlVarMapVariable \lTmpkTl \lTmpiTl {
- \TlPutRight \lTmpaTl {\Expand {[\lTmpiTl]}}
+\tlClear \lTmpaTl
+\tlSet \lTmpkTl {one}
+\tlVarMapVariable \lTmpkTl \lTmpiTl {
+ \tlPutRight \lTmpaTl {\expWhole {[\lTmpiTl]}}
}
-\Return{\TlUse\lTmpaTl}
+\prgReturn{\tlUse\lTmpaTl}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\TlMapBreak}
+%\begin{function}{\tlMapBreak}
%\begin{syntax}
-%\cs{TlMapBreak}
+%\cs{tlMapBreak}
%\end{syntax}
%Used to terminate a tl map function before all
%entries in the \meta{token list variable} have been processed. This
@@ -1839,9 +1839,9 @@ or its original value if the \meta{tl var} is blank.
%\end{texnote}
%\end{function}
%
-%\begin{function}{\TlMapBreakDo}
+%\begin{function}{\tlMapBreakDo}
%\begin{syntax}
-%\cs{TlMapBreakDo} \Arg{code}
+%\cs{tlMapBreakDo} \Arg{code}
%\end{syntax}
%Used to terminate a tl map function before all
%entries in the \meta{token list variable} have been processed, inserting
@@ -1867,59 +1867,59 @@ or its original value if the \meta{tl var} is blank.
\section{Token List Conditionals}
-\begin{function}{\TlIfExist,\TlIfExistT,\TlIfExistF,\TlIfExistTF}
+\begin{function}{\tlIfExist,\tlIfExistT,\tlIfExistF,\tlIfExistTF}
\begin{syntax}
-\cs{TlIfExist} \meta{tl var}
-\cs{TlIfExistT} \meta{tl var} \Arg{true code}
-\cs{TlIfExistF} \meta{tl var} \Arg{false code}
-\cs{TlIfExistTF} \meta{tl var} \Arg{true code} \Arg{false code}
+\cs{tlIfExist} \meta{tl var}
+\cs{tlIfExistT} \meta{tl var} \Arg{true code}
+\cs{tlIfExistF} \meta{tl var} \Arg{false code}
+\cs{tlIfExistTF} \meta{tl var} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{tl var} is currently defined. This does not
check that the \meta{tl var} really is a token list variable.
\begin{demohigh}
-\TlIfExistTF \lTmpaTl {\Return{Yes}} {\Return{No}}
-\TlIfExistTF \lFooUndefinedTl {\Return{Yes}} {\Return{No}}
+\tlIfExistTF \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
+\tlIfExistTF \lFooUndefinedTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\TlIfEmpty,\TlIfEmptyT,\TlIfEmptyF,\TlIfEmptyTF}
+\begin{function}{\tlIfEmpty,\tlIfEmptyT,\tlIfEmptyF,\tlIfEmptyTF}
\begin{syntax}
-\cs{TlIfEmpty} \Arg{token list}
-\cs{TlIfEmptyT} \Arg{token list} \Arg{true code}
-\cs{TlIfEmptyF} \Arg{token list} \Arg{false code}
-\cs{TlIfEmptyTF} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{tlIfEmpty} \Arg{token list}
+\cs{tlIfEmptyT} \Arg{token list} \Arg{true code}
+\cs{tlIfEmptyF} \Arg{token list} \Arg{false code}
+\cs{tlIfEmptyTF} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{token list} is entirely empty
(\emph{i.e.}~contains no tokens at all). For example
\begin{demohigh}
-\TlIfEmptyTF {abc} {\Return{Empty}} {\Return{NonEmpty}}
-\TlIfEmptyTF {} {\Return{Empty}} {\Return{NonEmpty}}
+\tlIfEmptyTF {abc} {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\tlIfEmptyTF {} {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\TlVarIfEmpty,\TlVarIfEmptyT,\TlVarIfEmptyF,\TlVarIfEmptyTF}
+\begin{function}{\tlVarIfEmpty,\tlVarIfEmptyT,\tlVarIfEmptyF,\tlVarIfEmptyTF}
\begin{syntax}
-\cs{TlVarIfEmpty} \meta{tl~var}
-\cs{TlVarIfEmptyT} \meta{tl~var} \Arg{true code}
-\cs{TlVarIfEmptyF} \meta{tl~var} \Arg{false code}
-\cs{TlVarIfEmptyTF} \meta{tl~var} \Arg{true code} \Arg{false code}
+\cs{tlVarIfEmpty} \meta{tl~var}
+\cs{tlVarIfEmptyT} \meta{tl~var} \Arg{true code}
+\cs{tlVarIfEmptyF} \meta{tl~var} \Arg{false code}
+\cs{tlVarIfEmptyTF} \meta{tl~var} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{token list variable} is entirely empty
(\emph{i.e.}~contains no tokens at all). For example
\begin{demohigh}
-\TlSet \lTmpaTl {abc}
-\TlVarIfEmptyTF \lTmpaTl {\Return{Empty}} {\Return{NonEmpty}}
-\TlClear \lTmpaTl
-\TlVarIfEmptyTF \lTmpaTl {\Return{Empty}} {\Return{NonEmpty}}
+\tlSet \lTmpaTl {abc}
+\tlVarIfEmptyTF \lTmpaTl {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\tlClear \lTmpaTl
+\tlVarIfEmptyTF \lTmpaTl {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\TlIfBlank,\TlIfBlankT,\TlIfBlankF,\TlIfBlankTF}
+\begin{function}{\tlIfBlank,\tlIfBlankT,\tlIfBlankF,\tlIfBlankTF}
\begin{syntax}
-\cs{TlIfBlank} \Arg{token list}
-\cs{TlIfBlankT} \Arg{token list} \Arg{true code}
-\cs{TlIfBlankF} \Arg{token list} \Arg{false code}
-\cs{TlIfBlankTF} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{tlIfBlank} \Arg{token list}
+\cs{tlIfBlankT} \Arg{token list} \Arg{true code}
+\cs{tlIfBlankF} \Arg{token list} \Arg{false code}
+\cs{tlIfBlankTF} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{token list} consists only of blank spaces
(\emph{i.e.} contains no item). The test is \texttt{true} if
@@ -1927,62 +1927,62 @@ Tests if the \meta{token list} consists only of blank spaces
(explicit tokens with character code $32$ and category code $10$),
and is \texttt{false} otherwise.
\begin{demohigh}
-\TlIfEmptyTF { } {\Return{Yes}} {\Return{No}}
-\TlIfBlankTF { } {\Return{Yes}} {\Return{No}}
+\tlIfEmptyTF { } {\prgReturn{Yes}} {\prgReturn{No}}
+\tlIfBlankTF { } {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\TlIfEq,\TlIfEqT,\TlIfEqF,\TlIfEqTF}
+\begin{function}{\tlIfEq,\tlIfEqT,\tlIfEqF,\tlIfEqTF}
\begin{syntax}
-\cs{TlIfEq} \Arg{token list_1} \Arg{token list_2}
-\cs{TlIfEqT} \Arg{token list_1} \Arg{token list_2} \Arg{true code}
-\cs{TlIfEqF} \Arg{token list_1} \Arg{token list_2} \Arg{false code}
-\cs{TlIfEqTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
+\cs{tlIfEq} \Arg{token list_1} \Arg{token list_2}
+\cs{tlIfEqT} \Arg{token list_1} \Arg{token list_2} \Arg{true code}
+\cs{tlIfEqF} \Arg{token list_1} \Arg{token list_2} \Arg{false code}
+\cs{tlIfEqTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if \meta{token list_1} and \meta{token list_2} contain the
same list of tokens, both in respect of character codes and category
-codes. See \cs{StrIfEq} if category codes are not important.
+codes. See \cs{strIfEq} if category codes are not important.
For example
\begin{demohigh}
-\TlIfEqTF {abc} {abc} {\Return{Yes}} {\Return{No}}
-\TlIfEqTF {abc} {xyz} {\Return{Yes}} {\Return{No}}
+\tlIfEqTF {abc} {abc} {\prgReturn{Yes}} {\prgReturn{No}}
+\tlIfEqTF {abc} {xyz} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
%\begin{demohigh}
-%\TlSet\lTmpaTl{abc}
-%\TlSet\lTmpbTl{abc}
-%\TlSet\lTmpcTl{xyz}
-%\TlIfEqTF{\TlUse\lTmpaTl}{\TlUse\lTmpbTl}{\Return{Yes}}{\Return{No}}
-%\TlIfEqTF{\TlUse\lTmpaTl}{\TlUse\lTmpcTl}{\Return{Yes}}{\Return{No}}
+%\tlSet\lTmpaTl{abc}
+%\tlSet\lTmpbTl{abc}
+%\tlSet\lTmpcTl{xyz}
+%\tlIfEqTF{\tlUse\lTmpaTl}{\tlUse\lTmpbTl}{\prgReturn{Yes}}{\prgReturn{No}}
+%\tlIfEqTF{\tlUse\lTmpaTl}{\tlUse\lTmpcTl}{\prgReturn{Yes}}{\prgReturn{No}}
%\end{demohigh}
\end{function}
-\begin{function}{\TlVarIfEq,\TlVarIfEqT,\TlVarIfEqF,\TlVarIfEqTF}
+\begin{function}{\tlVarIfEq,\tlVarIfEqT,\tlVarIfEqF,\tlVarIfEqTF}
\begin{syntax}
-\cs{TlVarIfEq} \meta{tl var_1} \meta{tl var_2}
-\cs{TlVarIfEqT} \meta{tl var_1} \meta{tl var_2} \Arg{true code}
-\cs{TlVarIfEqF} \meta{tl var_1} \meta{tl var_2} \Arg{false code}
-\cs{TlVarIfEqTF} \meta{tl var_1} \meta{tl var_2} \Arg{true code} \Arg{false code}
+\cs{tlVarIfEq} \meta{tl var_1} \meta{tl var_2}
+\cs{tlVarIfEqT} \meta{tl var_1} \meta{tl var_2} \Arg{true code}
+\cs{tlVarIfEqF} \meta{tl var_1} \meta{tl var_2} \Arg{false code}
+\cs{tlVarIfEqTF} \meta{tl var_1} \meta{tl var_2} \Arg{true code} \Arg{false code}
\end{syntax}
Compares the content of two \meta{token list variables} and
is logically \texttt{true} if the two contain the same list of
tokens (\emph{i.e.}~identical in both the list of characters they
contain and the category codes of those characters). For example
\begin{demohigh}
-\TlSet \lTmpaTl {abc}
-\TlSet \lTmpbTl {abc}
-\TlSet \lTmpcTl {xyz}
-\TlVarIfEqTF \lTmpaTl \lTmpbTl {\Return{Yes}} {\Return{No}}
-\TlVarIfEqTF \lTmpaTl \lTmpcTl {\Return{Yes}} {\Return{No}}
+\tlSet \lTmpaTl {abc}
+\tlSet \lTmpbTl {abc}
+\tlSet \lTmpcTl {xyz}
+\tlVarIfEqTF \lTmpaTl \lTmpbTl {\prgReturn{Yes}} {\prgReturn{No}}
+\tlVarIfEqTF \lTmpaTl \lTmpcTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
-See also \cs{StrVarIfEq} for a comparison that ignores category codes.
+See also \cs{strVarIfEq} for a comparison that ignores category codes.
\end{function}
-\begin{function}{\TlIfIn,\TlIfInT,\TlIfInF,\TlIfInTF}
+\begin{function}{\tlIfIn,\tlIfInT,\tlIfInF,\tlIfInTF}
\begin{syntax}
-\cs{TlIfIn} \Arg{token list_1} \Arg{token list_2}
-\cs{TlIfInT} \Arg{token list_1} \Arg{token list_2} \Arg{true code}
-\cs{TlIfInF} \Arg{token list_1} \Arg{token list_2} \Arg{false code}
-\cs{TlIfInTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
+\cs{tlIfIn} \Arg{token list_1} \Arg{token list_2}
+\cs{tlIfInT} \Arg{token list_1} \Arg{token list_2} \Arg{true code}
+\cs{tlIfInF} \Arg{token list_1} \Arg{token list_2} \Arg{false code}
+\cs{tlIfInTF} \Arg{token list_1} \Arg{token list_2} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if \meta{token list_2} is found inside \meta{token list_1}.
The \meta{token list_2} cannot contain the tokens \verb|{|, \verb|}| or \verb|#|
@@ -1990,17 +1990,17 @@ The \meta{token list_2} cannot contain the tokens \verb|{|, \verb|}| or \verb|#|
(begin-group) or $2$ (end-group), and tokens with category code $6$).
The search does \emph{not} enter brace (category code $1$/$2$) groups.
\begin{demohigh}
-\TlIfInTF {hello world} {o} {\Return{Yes}} {\Return{No}}
-\TlIfInTF {hello world} {a} {\Return{Yes}} {\Return{No}}
+\tlIfInTF {hello world} {o} {\prgReturn{Yes}} {\prgReturn{No}}
+\tlIfInTF {hello world} {a} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\TlVarIfIn,\TlVarIfInT,\TlVarIfInF,\TlVarIfInTF}
+\begin{function}{\tlVarIfIn,\tlVarIfInT,\tlVarIfInF,\tlVarIfInTF}
\begin{syntax}
-\cs{TlVarIfIn} \meta{tl var} \Arg{token list}
-\cs{TlVarIfInT} \meta{tl var} \Arg{token list} \Arg{true code}
-\cs{TlVarIfInF} \meta{tl var} \Arg{token list} \Arg{false code}
-\cs{TlVarIfInTF} \meta{tl var} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{tlVarIfIn} \meta{tl var} \Arg{token list}
+\cs{tlVarIfInT} \meta{tl var} \Arg{token list} \Arg{true code}
+\cs{tlVarIfInF} \meta{tl var} \Arg{token list} \Arg{false code}
+\cs{tlVarIfInTF} \meta{tl var} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{token list} is found in the content of the
\meta{tl var}. The \meta{token list} cannot contain
@@ -2008,55 +2008,55 @@ the tokens \verb|{|, \verb|}| or \verb|#|
(more precisely, explicit character tokens with category code $1$
(begin-group) or $2$ (end-group), and tokens with category code $6$).
\begin{demohigh}
-\TlSet \lTmpaTl {hello world}
-\TlVarIfInTF \lTmpaTl {o} {\Return{Yes}} {\Return{No}}
-\TlVarIfInTF \lTmpaTl {a} {\Return{Yes}} {\Return{No}}
+\tlSet \lTmpaTl {hello world}
+\tlVarIfInTF \lTmpaTl {o} {\prgReturn{Yes}} {\prgReturn{No}}
+\tlVarIfInTF \lTmpaTl {a} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\TlIfSingle,\TlIfSingleT,\TlIfSingleF,\TlIfSingleTF}
+\begin{function}{\tlIfSingle,\tlIfSingleT,\tlIfSingleF,\tlIfSingleTF}
\begin{syntax}
-\cs{TlIfSingle} \Arg{token list}
-\cs{TlIfSingleT} \Arg{token list} \Arg{true code}
-\cs{TlIfSingleF} \Arg{token list} \Arg{false code}
-\cs{TlIfSingleTF} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{tlIfSingle} \Arg{token list}
+\cs{tlIfSingleT} \Arg{token list} \Arg{true code}
+\cs{tlIfSingleF} \Arg{token list} \Arg{false code}
+\cs{tlIfSingleTF} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{token list} has exactly one \meta{item}, \emph{i.e.} is
a single normal token (neither an explicit space character nor a
begin-group character) or a single brace group, surrounded by
optional spaces on both sides. In other words, such a token list has
-token count $1$ according to \cs{TlCount}.
+token count $1$ according to \cs{tlCount}.
\begin{demohigh}
-\TlIfSingleTF {a} {\Return{Yes}} {\Return{No}}
-\TlIfSingleTF {abc} {\Return{Yes}} {\Return{No}}
+\tlIfSingleTF {a} {\prgReturn{Yes}} {\prgReturn{No}}
+\tlIfSingleTF {abc} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\TlVarIfSingle,\TlVarIfSingleT,\TlVarIfSingleF,\TlVarIfSingleTF}
+\begin{function}{\tlVarIfSingle,\tlVarIfSingleT,\tlVarIfSingleF,\tlVarIfSingleTF}
\begin{syntax}
-\cs{TlVarIfSingle} \meta{tl var}
-\cs{TlVarIfSingleT} \meta{tl var} \Arg{true code}
-\cs{TlVarIfSingleF} \meta{tl var} \Arg{false code}
-\cs{TlVarIfSingleTF} \meta{tl var} \Arg{true code} \Arg{false code}
+\cs{tlVarIfSingle} \meta{tl var}
+\cs{tlVarIfSingleT} \meta{tl var} \Arg{true code}
+\cs{tlVarIfSingleF} \meta{tl var} \Arg{false code}
+\cs{tlVarIfSingleTF} \meta{tl var} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the content of the \meta{tl var} consists of a single \meta{item},
\emph{i.e.} is a single normal token (neither an explicit space
character nor a begin-group character) or a single brace group,
surrounded by optional spaces on both sides. In other words, such a
-token list has token count $1$ according to \cs{TlVarCount}.
+token list has token count $1$ according to \cs{tlVarCount}.
\begin{demohigh}
-\TlSet \lTmpaTl {a}
-\TlVarIfSingleTF \lTmpaTl {\Return{Yes}} {\Return{No}}
-\TlSet \lTmpaTl {abc}
-\TlVarIfSingleTF \lTmpaTl {\Return{Yes}} {\Return{No}}
+\tlSet \lTmpaTl {a}
+\tlVarIfSingleTF \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
+\tlSet \lTmpaTl {abc}
+\tlVarIfSingleTF \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
\section{Token List Case Functions}
-\begin{function}{\TlVarCase}
+\begin{function}{\tlVarCase}
\begin{syntax}
-\cs{TlVarCase} \meta{test token list variable}
+\cs{tlVarCase} \meta{test token list variable}
~ ~ \verb"{"
~ ~ ~ ~ \meta{token list variable case_1} \Arg{code case_1}
~ ~ ~ ~ \meta{token list variable case_2} \Arg{code case_2}
@@ -2066,28 +2066,28 @@ token list has token count $1$ according to \cs{TlVarCount}.
\end{syntax}
This function compares the \meta{test token list variable} in turn
with each of the \meta{token list variable cases}. If the two
-are equal (as described for \cs{TlVarIfEq})
+are equal (as described for \cs{tlVarIfEq})
then the associated \meta{code} is left in the input
stream and other cases are discarded. The function
does nothing if there is no match.
\begin{demohigh}
\IgnoreSpacesOn
-\TlSet \lTmpaTl {a}
-\TlSet \lTmpbTl {b}
-\TlSet \lTmpcTl {c}
-\TlSet \lTmpkTl {b}
-\TlVarCase \lTmpkTl {
- \lTmpaTl {\Return {First}}
- \lTmpbTl {\Return {Second}}
- \lTmpcTl {\Return {Third}}
+\tlSet \lTmpaTl {a}
+\tlSet \lTmpbTl {b}
+\tlSet \lTmpcTl {c}
+\tlSet \lTmpkTl {b}
+\tlVarCase \lTmpkTl {
+ \lTmpaTl {\prgReturn {First}}
+ \lTmpbTl {\prgReturn {Second}}
+ \lTmpcTl {\prgReturn {Third}}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\TlVarCaseT}
+\begin{function}{\tlVarCaseT}
\begin{syntax}
-\cs{TlVarCaseT} \meta{test token list variable}
+\cs{tlVarCaseT} \meta{test token list variable}
~ ~ \verb"{"
~ ~ ~ ~ \meta{token list variable case_1} \Arg{code case_1}
~ ~ ~ ~ \meta{token list variable case_2} \Arg{code case_2}
@@ -2098,31 +2098,31 @@ does nothing if there is no match.
\end{syntax}
This function compares the \meta{test token list variable} in turn
with each of the \meta{token list variable cases}. If the two
-are equal (as described for \cs{TlVarIfEq})
+are equal (as described for \cs{tlVarIfEq})
then the associated \meta{code} is left in the input
stream and other cases are discarded. If any of the
cases are matched, the \meta{true code} is also inserted into the
input stream (after the code for the appropriate case).
\begin{demohigh}
\IgnoreSpacesOn
-\TlSet \lTmpaTl {a}
-\TlSet \lTmpbTl {b}
-\TlSet \lTmpcTl {c}
-\TlSet \lTmpkTl {b}
-\TlVarCaseT \lTmpkTl {
- \lTmpaTl {\IntSet \lTmpkInt {1}}
- \lTmpbTl {\IntSet \lTmpkInt {2}}
- \lTmpcTl {\IntSet \lTmpkInt {3}}
+\tlSet \lTmpaTl {a}
+\tlSet \lTmpbTl {b}
+\tlSet \lTmpcTl {c}
+\tlSet \lTmpkTl {b}
+\tlVarCaseT \lTmpkTl {
+ \lTmpaTl {\intSet \lTmpkInt {1}}
+ \lTmpbTl {\intSet \lTmpkInt {2}}
+ \lTmpcTl {\intSet \lTmpkInt {3}}
}{
- \Return {\IntUse \lTmpkInt}
+ \prgReturn {\intUse \lTmpkInt}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\TlVarCaseF}
+\begin{function}{\tlVarCaseF}
\begin{syntax}
-\cs{TlVarCaseF} \meta{test token list variable}
+\cs{tlVarCaseF} \meta{test token list variable}
~ ~ \verb"{"
~ ~ ~ ~ \meta{token list variable case_1} \Arg{code case_1}
~ ~ ~ ~ \meta{token list variable case_2} \Arg{code case_2}
@@ -2133,30 +2133,30 @@ input stream (after the code for the appropriate case).
\end{syntax}
This function compares the \meta{test token list variable} in turn
with each of the \meta{token list variable cases}. If the two
-are equal (as described for \cs{TlVarIfEq})
+are equal (as described for \cs{tlVarIfEq})
then the associated \meta{code} is left in the input
stream and other cases are discarded. If none match then the \meta{false code}
is inserted into the input stream (after the code for the appropriate case).
\begin{demohigh}
\IgnoreSpacesOn
-\TlSet \lTmpaTl {a}
-\TlSet \lTmpbTl {b}
-\TlSet \lTmpcTl {c}
-\TlSet \lTmpkTl {b}
-\TlVarCaseF \lTmpkTl{
- \lTmpaTl {\Return {First}}
- \lTmpbTl {\Return {Second}}
- \lTmpcTl {\Return {Third}}
+\tlSet \lTmpaTl {a}
+\tlSet \lTmpbTl {b}
+\tlSet \lTmpcTl {c}
+\tlSet \lTmpkTl {b}
+\tlVarCaseF \lTmpkTl{
+ \lTmpaTl {\prgReturn {First}}
+ \lTmpbTl {\prgReturn {Second}}
+ \lTmpcTl {\prgReturn {Third}}
}{
- \Return {No~Match!}
+ \prgReturn {No~Match!}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\TlVarCaseTF}
+\begin{function}{\tlVarCaseTF}
\begin{syntax}
-\cs{TlVarCaseTF} \meta{test token list variable}
+\cs{tlVarCaseTF} \meta{test token list variable}
~ ~ \verb"{"
~ ~ ~ ~ \meta{token list variable case_1} \Arg{code case_1}
~ ~ ~ ~ \meta{token list variable case_2} \Arg{code case_2}
@@ -2168,27 +2168,27 @@ is inserted into the input stream (after the code for the appropriate case).
\end{syntax}
This function compares the \meta{test token list variable} in turn
with each of the \meta{token list variable cases}. If the two
-are equal (as described for \cs{TlVarIfEq})
+are equal (as described for \cs{tlVarIfEq})
then the associated \meta{code} is left in the input
stream and other cases are discarded. If any of the
cases are matched, the \meta{true code} is also inserted into the
input stream (after the code for the appropriate case), while if none
-match then the \meta{false code} is inserted. The function \cs{TlVarCase},
+match then the \meta{false code} is inserted. The function \cs{tlVarCase},
which does nothing if there is no match, is also available.
\begin{demohigh}
\IgnoreSpacesOn
-\TlSet \lTmpaTl {a}
-\TlSet \lTmpbTl {b}
-\TlSet \lTmpcTl {c}
-\TlSet \lTmpkTl {b}
-\TlVarCaseTF \lTmpkTl {
- \lTmpaTl {\IntSet \lTmpkInt {1}}
- \lTmpbTl {\IntSet \lTmpkInt {2}}
- \lTmpcTl {\IntSet \lTmpkInt {3}}
+\tlSet \lTmpaTl {a}
+\tlSet \lTmpbTl {b}
+\tlSet \lTmpcTl {c}
+\tlSet \lTmpkTl {b}
+\tlVarCaseTF \lTmpkTl {
+ \lTmpaTl {\intSet \lTmpkInt {1}}
+ \lTmpbTl {\intSet \lTmpkInt {2}}
+ \lTmpcTl {\intSet \lTmpkInt {3}}
}{
- \Return {\IntUse \lTmpkInt}
+ \prgReturn {\intUse \lTmpkInt}
}{
- \Return {0}
+ \prgReturn {0}
}
\IgnoreSpacesOff
\end{demohigh}
@@ -2214,7 +2214,7 @@ should be named with the suffix \texttt{Str}. Such variables
should contain characters with category code $12$ (other), except
spaces, which have category code $10$ (blank space). All the
functions in this module which accept a token list argument first
-convert it to a string using \cs{TlToStr} for internal processing,
+convert it to a string using \cs{tlToStr} for internal processing,
and do not treat a token list or the corresponding string
representation differently.
@@ -2225,7 +2225,7 @@ and for which a level of protection from unwanted expansion is suitable.
This data type simplifies comparison of variables since there are no concerns
about expansion of their contents.
-%The functions \cs{CsToStr}, \cs{TlToStr}, \cs{TlVarToStr} and
+%The functions \cs{CsToStr}, \cs{tlToStr}, \cs{tlVarToStr} and
%\cs{TokenToStr} (and variants) generate strings from the appropriate
%input: these are documented in modules \pkg{Cs}, \pkg{Tl} and \pkg{Token},
%respectively.
@@ -2253,142 +2253,142 @@ code and so should only be used for short-term storage.
\section{Creating and Using Strings}
-\begin{function}{\StrNew}
+\begin{function}{\strNew}
\begin{syntax}
-\cs{StrNew} \meta{str var}
+\cs{strNew} \meta{str var}
\end{syntax}
Creates a new \meta{str var} or raises an error if the name is
already taken. The declaration is global. The \meta{str var} is
initially empty.
\begin{codehigh}
-\StrNew \lFooSomeStr
+\strNew \lFooSomeStr
\end{codehigh}
\end{function}
-\begin{function}{\StrConst}
+\begin{function}{\strConst}
\begin{syntax}
-\cs{StrConst} \meta{str var} \Arg{token list}
+\cs{strConst} \meta{str var} \Arg{token list}
\end{syntax}
Creates a new constant \meta{str var} or raises an error if the name
is already taken. The value of the \meta{str var} is set
globally to the \meta{token list}, converted to a string.
\begin{codehigh}
-\StrConst \cFooSomeStr {12\abc34}
+\strConst \cFooSomeStr {12\abc34}
\end{codehigh}
\end{function}
-\begin{function}{\StrUse}
+\begin{function}{\strUse}
\begin{syntax}
-\cs{StrUse} \meta{str var}
+\cs{strUse} \meta{str var}
\end{syntax}
Recovers the content of a \meta{str var} and returns the value.
An error is raised if the variable
does not exist or if it is invalid. Note that it is possible to use
a \meta{str} directly without an accessor function.
\begin{codehigh}
-\StrUse \lTmpaStr
+\strUse \lTmpaStr
\end{codehigh}
\end{function}
\section{Viewing Strings}
-\begin{function}{\StrLog}
+\begin{function}{\strLog}
\begin{syntax}
-\cs{StrLog} \Arg{token list}
+\cs{strLog} \Arg{token list}
\end{syntax}
Writes \meta{token list} in the log file.
\begin{codehigh}
-\StrLog {1234\abcd5678}
+\strLog {1234\abcd5678}
\end{codehigh}
\end{function}
-\begin{function}{\StrVarLog}
+\begin{function}{\strVarLog}
\begin{syntax}
-\cs{StrVarLog} \meta{str var}
+\cs{strVarLog} \meta{str var}
\end{syntax}
Writes the content of the \meta{str var} in the log file.
\begin{codehigh}
-\StrSet \lTmpiStr {1234\abcd5678}
-\StrVarLog \lTmpiStr
+\strSet \lTmpiStr {1234\abcd5678}
+\strVarLog \lTmpiStr
\end{codehigh}
\end{function}
-\begin{function}{\StrShow}
+\begin{function}{\strShow}
\begin{syntax}
-\cs{StrShow} \Arg{token list}
+\cs{strShow} \Arg{token list}
\end{syntax}
Displays \meta{token list} on the terminal.
\begin{codehigh}
-\StrShow {1234\abcd5678}
+\strShow {1234\abcd5678}
\end{codehigh}
\end{function}
-\begin{function}{\StrVarShow}
+\begin{function}{\strVarShow}
\begin{syntax}
-\cs{StrVarShow} \meta{str var}
+\cs{strVarShow} \meta{str var}
\end{syntax}
Displays the content of the \meta{str var} on the terminal.
\begin{codehigh}
-\StrSet \lTmpiStr {1234\abcd5678}
-\StrVarShow \lTmpiStr
+\strSet \lTmpiStr {1234\abcd5678}
+\strVarShow \lTmpiStr
\end{codehigh}
\end{function}
\section{Setting String Variables}
-\begin{function}{\StrSet}
+\begin{function}{\strSet}
\begin{syntax}
-\cs{StrSet} \meta{str var} \Arg{token list}
+\cs{strSet} \meta{str var} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string}, and stores the
result in \meta{str var}.
\begin{demohigh}
-\StrSet \lTmpiStr {\IntMathMult{4}{5}}
-\StrUse \lTmpiStr
+\strSet \lTmpiStr {\intMathMult{4}{5}}
+\strUse \lTmpiStr
\end{demohigh}
\end{function}
-\begin{function}{\StrSetEq}
+\begin{function}{\strSetEq}
\begin{syntax}
-\cs{StrSetEq} \meta{str var_1} \meta{str var_2}
+\cs{strSetEq} \meta{str var_1} \meta{str var_2}
\end{syntax}
Sets the content of \meta{str var_1} equal to that of \meta{str var_2}.
\begin{demohigh}
-\StrSet \lTmpaStr {abc}
-\StrSetEq \lTmpbStr \lTmpaStr
-\StrUse \lTmpbStr
+\strSet \lTmpaStr {abc}
+\strSetEq \lTmpbStr \lTmpaStr
+\strUse \lTmpbStr
\end{demohigh}
\end{function}
-\begin{function}{\StrClear}
+\begin{function}{\strClear}
\begin{syntax}
-\cs{StrClear} \meta{str var}
+\cs{strClear} \meta{str var}
\end{syntax}
Clears the content of the \meta{str var}. For example
\begin{demohigh}
-\StrSet \lTmpjStr {One}
-\StrClear \lTmpjStr
-\StrSet \lTmpjStr {Two}
-\StrUse \lTmpjStr
+\strSet \lTmpjStr {One}
+\strClear \lTmpjStr
+\strSet \lTmpjStr {Two}
+\strUse \lTmpjStr
\end{demohigh}
\end{function}
-\begin{function}{\StrClearNew}
+\begin{function}{\strClearNew}
\begin{syntax}
-\cs{StrClearNew} \meta{str var}
+\cs{strClearNew} \meta{str var}
\end{syntax}
Ensures that the \meta{str var} exists globally by applying
-\cs{StrNew} if necessary, then applies \cs{StrClear} to leave
+\cs{strNew} if necessary, then applies \cs{strClear} to leave
the \meta{str var} empty.
\begin{codehigh}
-\StrClearNew \lFooSomeStr
-\StrUse \lFooSomeStr
+\strClearNew \lFooSomeStr
+\strUse \lFooSomeStr
\end{codehigh}
\end{function}
-\begin{function}{\StrConcat}
+\begin{function}{\strConcat}
\begin{syntax}
-\cs{StrConcat} \meta{str var_1} \meta{str var_2} \meta{str var_3}
+\cs{strConcat} \meta{str var_1} \meta{str var_2} \meta{str var_3}
\end{syntax}
Concatenates the content of \meta{str var_2} and \meta{str var_3}
together and saves the result in \meta{str var_1}. The \meta{str var_2}
@@ -2396,60 +2396,60 @@ is placed at the left side of the new string variable.
The \meta{str var_2} and \meta{str var_3} must indeed be strings, as
this function does not convert their contents to a string.
\begin{demohigh}
-\StrSet \lTmpbStr {con}
-\StrSet \lTmpcStr {cat}
-\StrConcat \lTmpaStr \lTmpbStr \lTmpcStr
-\StrUse \lTmpaStr
+\strSet \lTmpbStr {con}
+\strSet \lTmpcStr {cat}
+\strConcat \lTmpaStr \lTmpbStr \lTmpcStr
+\strUse \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrPutLeft}
+\begin{function}{\strPutLeft}
\begin{syntax}
-\cs{StrPutLeft} \meta{str var} \Arg{token list}
+\cs{strPutLeft} \meta{str var} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string}, and prepends the
result to \meta{str var}. The current contents of the \meta{str
var} are not automatically converted to a string.
\begin{demohigh}
-\StrSet \lTmpkStr {Functional}
-\StrPutLeft \lTmpkStr {Hello}
-\StrUse \lTmpkStr
+\strSet \lTmpkStr {Functional}
+\strPutLeft \lTmpkStr {Hello}
+\strUse \lTmpkStr
\end{demohigh}
\end{function}
-\begin{function}{\StrPutRight}
+\begin{function}{\strPutRight}
\begin{syntax}
-\cs{StrPutRight} \meta{str var} \Arg{token list}
+\cs{strPutRight} \meta{str var} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string}, and appends the
result to \meta{str var}. The current contents of the \meta{str
var} are not automatically converted to a string.
\begin{demohigh}
-\StrSet \lTmpkStr {Functional}
-\StrPutRight \lTmpkStr {World}
-\StrUse \lTmpkStr
+\strSet \lTmpkStr {Functional}
+\strPutRight \lTmpkStr {World}
+\strUse \lTmpkStr
\end{demohigh}
\end{function}
\section{Modifying String Variables}
-\begin{function}{\StrVarReplaceOnce}
+\begin{function}{\strVarReplaceOnce}
\begin{syntax}
-\cs{StrVarReplaceOnce} \meta{str var} \Arg{old} \Arg{new}
+\cs{strVarReplaceOnce} \meta{str var} \Arg{old} \Arg{new}
\end{syntax}
Converts the \meta{old} and \meta{new} token lists to strings, then
replaces the first (leftmost) occurrence of \meta{old string} in the
\meta{str var} with \meta{new string}.
\begin{demohigh}
-\StrSet \lTmpaStr {a{bc}bcd}
-\StrVarReplaceOnce \lTmpaStr {bc} {xx}
-\StrUse \lTmpaStr
+\strSet \lTmpaStr {a{bc}bcd}
+\strVarReplaceOnce \lTmpaStr {bc} {xx}
+\strUse \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrVarReplaceAll}
+\begin{function}{\strVarReplaceAll}
\begin{syntax}
-\cs{StrVarReplaceAll} \meta{str var} \Arg{old} \Arg{new}
+\cs{strVarReplaceAll} \meta{str var} \Arg{old} \Arg{new}
\end{syntax}
Converts the \meta{old} and \meta{new} token lists to strings, then
replaces all occurrences of \meta{old string} in the
@@ -2458,70 +2458,70 @@ As this function
operates from left to right, the pattern \meta{old string}
may remain after the replacement.
\begin{demohigh}
-\StrSet \lTmpaStr {a{bc}bcd}
-\StrVarReplaceAll \lTmpaStr {bc} {xx}
-\StrUse \lTmpaStr
+\strSet \lTmpaStr {a{bc}bcd}
+\strVarReplaceAll \lTmpaStr {bc} {xx}
+\strUse \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrVarRemoveOnce}
+\begin{function}{\strVarRemoveOnce}
\begin{syntax}
-\cs{StrVarRemoveOnce} \meta{str var} \Arg{token list}
+\cs{strVarRemoveOnce} \meta{str var} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string} then
removes the first (leftmost) occurrence of \meta{string} from the \meta{str var}.
\begin{demohigh}
-\StrSet \lTmpaStr {a{bc}bcd}
-\StrVarRemoveOnce \lTmpaStr {bc}
-\StrUse \lTmpaStr
+\strSet \lTmpaStr {a{bc}bcd}
+\strVarRemoveOnce \lTmpaStr {bc}
+\strUse \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrVarRemoveAll}
+\begin{function}{\strVarRemoveAll}
\begin{syntax}
-\cs{StrVarRemoveAll} \meta{str var} \Arg{token list}
+\cs{strVarRemoveAll} \meta{str var} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string} then
removes all occurrences of \meta{string} from the \meta{str var}.
As this function operates from left to right,
the pattern \meta{string} may remain after the removal, for instance,
\begin{demohigh}
-\StrSet \lTmpaStr {abbccd}
-\StrVarRemoveAll \lTmpaStr {bc}
-\TlUse \lTmpaStr
+\strSet \lTmpaStr {abbccd}
+\strVarRemoveAll \lTmpaStr {bc}
+\tlUse \lTmpaStr
\end{demohigh}
\end{function}
\section{Working with the Content of Strings}
-\begin{function}{\StrCount}
+\begin{function}{\strCount}
\begin{syntax}
-\cs{StrCount} \Arg{token list}
+\cs{strCount} \Arg{token list}
\end{syntax}
Returns the number of characters in the string representation of \meta{token list},
as an integer denotation. All characters including spaces are counted.
\begin{demohigh}
-\StrCount {12\abc34}
+\strCount {12\abc34}
\end{demohigh}
-Due to naming conflict, you need to use \cs{StrSize} instead of \cs{StrCount}
+Due to naming conflict, you need to use \cs{strSize} instead of \cs{strCount}
if you want to use \verb!functional! package together with \verb!xstring! package.
\end{function}
\begin{function}{\StVarCount}
\begin{syntax}
-\cs{StrVarCount} \meta{tl var}
+\cs{strVarCount} \meta{tl var}
\end{syntax}
Returns the number of characters in the string representation of the \meta{tl var},
as an integer denotation. All characters including spaces are counted.
\begin{demohigh}
-\StrSet \lTmpaStr {12\abc34}
-\StrVarCount \lTmpaStr
+\strSet \lTmpaStr {12\abc34}
+\strVarCount \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrHead}
+\begin{function}{\strHead}
\begin{syntax}
-\cs{StrHead} \Arg{token list}
+\cs{strHead} \Arg{token list}
\end{syntax}
Converts the \meta{token list} into a \meta{string}.
The first character in the \meta{string} is then returned,
@@ -2529,13 +2529,13 @@ with category code \enquote{other}. If the first character is a space,
it returns a space token with category code $10$ (blank space).
If the \meta{string} is empty, then nothing is returned.
\begin{demohigh}
-\StrHead {HELLO}
+\strHead {HELLO}
\end{demohigh}
\end{function}
-\begin{function}{\StrVarHead}
+\begin{function}{\strVarHead}
\begin{syntax}
-\cs{StrVarHead} \meta{tl var}
+\cs{strVarHead} \meta{tl var}
\end{syntax}
Converts the \meta{tl var} into a \meta{string}.
The first character in the \meta{string} is then returned,
@@ -2543,14 +2543,14 @@ with category code \enquote{other}. If the first character is a space,
it returns a space token with category code $10$ (blank space).
If the \meta{string} is empty, then nothing is returned.
\begin{demohigh}
-\StrSet \lTmpaStr {HELLO}
-\StrVarHead \lTmpaStr
+\strSet \lTmpaStr {HELLO}
+\strVarHead \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrTail}
+\begin{function}{\strTail}
\begin{syntax}
-\cs{StrTail} \Arg{token list}
+\cs{strTail} \Arg{token list}
\end{syntax}
Converts the \meta{token list} to a \meta{string}, removes the first
character, and returns the remaining characters (if any)
@@ -2559,13 +2559,13 @@ If the first character is a space, it only trims that space.
If the \meta{token list} is empty,
then nothing is left on the input stream.
\begin{demohigh}
-\StrTail {HELLO}
+\strTail {HELLO}
\end{demohigh}
\end{function}
-\begin{function}{\StrVarTail}
+\begin{function}{\strVarTail}
\begin{syntax}
-\cs{StrVarTail} \meta{tl var}
+\cs{strVarTail} \meta{tl var}
\end{syntax}
Converts the \meta{tl var} to a \meta{string}, removes the first
character, and returns the remaining characters (if any)
@@ -2574,14 +2574,14 @@ If the first character is a space, it only trims that space.
If the \meta{token list} is empty,
then nothing is left on the input stream.
\begin{demohigh}
-\StrSet \lTmpaStr {HELLO}
-\StrVarTail \lTmpaStr
+\strSet \lTmpaStr {HELLO}
+\strVarTail \lTmpaStr
\end{demohigh}
\end{function}
-\begin{function}{\StrItem}
+\begin{function}{\strItem}
\begin{syntax}
-\cs{StrItem} \Arg{token list} \Arg{integer expression}
+\cs{strItem} \Arg{token list} \Arg{integer expression}
\end{syntax}
Converts the \meta{token list} to a \meta{string},
and returns the character in position \meta{integer expression} of
@@ -2591,13 +2591,13 @@ If the \meta{integer expression} is negative,
characters are counted from the end of the \meta{string}. Hence,
$-1$ is the right-most character, \emph{etc.}
\begin{demohigh}
-\StrItem {abcd} {3}
+\strItem {abcd} {3}
\end{demohigh}
\end{function}
-\begin{function}{\StrVarItem}
+\begin{function}{\strVarItem}
\begin{syntax}
-\cs{StrVarItem} \meta{tl var} \Arg{integer expression}
+\cs{strVarItem} \meta{tl var} \Arg{integer expression}
\end{syntax}
Converts the \meta{tl var} to a \meta{string},
and returns the character in position \meta{integer expression} of
@@ -2607,8 +2607,8 @@ If the \meta{integer expression} is negative,
characters are counted from the end of the \meta{string}. Hence,
$-1$ is the right-most character, \emph{etc.}
\begin{demohigh}
-\StrSet \lTmpaStr {abcd}
-\StrVarItem \lTmpaStr {3}
+\strSet \lTmpaStr {abcd}
+\strVarItem \lTmpaStr {3}
\end{demohigh}
\end{function}
@@ -2618,20 +2618,20 @@ All mappings are done at the current group level, \emph{i.e.} any
local assignments made by the \meta{function} or \meta{code} discussed
below remain in effect after the loop.
-%\begin{function}{\StrMapFunction,\StrVarMapFunction}
+%\begin{function}{\strMapFunction,\strVarMapFunction}
%\begin{syntax}
-%\cs{StrMapFunction} \Arg{token list} \meta{function}
-%\cs{StrVarMapFunction} \meta{str var} \meta{function}
+%\cs{strMapFunction} \Arg{token list} \meta{function}
+%\cs{strVarMapFunction} \meta{str var} \meta{function}
%\end{syntax}
%Converts the \meta{token list} to a \meta{string} then
%applies \meta{function} to every \meta{character} in the
%\meta{string} including spaces.
%\end{function}
-\begin{function}{\StrMapInline,\StrVarMapInline}
+\begin{function}{\strMapInline,\strVarMapInline}
\begin{syntax}
-\cs{StrMapInline} \Arg{token list} \Arg{inline function}
-\cs{StrVarMapInline} \meta{str var} \Arg{inline function}
+\cs{strMapInline} \Arg{token list} \Arg{inline function}
+\cs{strVarMapInline} \meta{str var} \Arg{inline function}
\end{syntax}
Converts the \meta{token list} to a \meta{string} then
applies the \meta{inline function} to every \meta{character} in the
@@ -2640,31 +2640,31 @@ The \meta{inline function} should consist of code which
receives the \meta{character} as \verb|#1|.
\begin{demohigh}
\IgnoreSpacesOn
-\StrClear \lTmpaStr
-\StrMapInline {one} {
- \StrPutRight \lTmpaStr {[#1]}
+\strClear \lTmpaStr
+\strMapInline {one} {
+ \strPutRight \lTmpaStr {[#1]}
}
-\StrUse \lTmpaStr
+\strUse \lTmpaStr
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\StrMapTokens, \StrVarMapTokens}
+%\begin{function}{\strMapTokens, \strVarMapTokens}
%\begin{syntax}
-%\cs{StrMapTokens} \Arg{token list} \Arg{code}
-%\cs{StrVarMapTokens} \meta{str var} \Arg{code}
+%\cs{strMapTokens} \Arg{token list} \Arg{code}
+%\cs{strVarMapTokens} \meta{str var} \Arg{code}
%\end{syntax}
%Converts the \meta{token list} to a \meta{string} then applies
%\meta{code} to every \meta{character} in the \meta{string} including spaces.
%The \meta{code} receives each character as a trailing brace group.
-%This is equivalent to \cs{StrMapFunction} if the
+%This is equivalent to \cs{strMapFunction} if the
%\meta{code} consists of a single function.
%\end{function}
-\begin{function}{\StrMapVariable,\StrMapVariable}
+\begin{function}{\strMapVariable,\strMapVariable}
\begin{syntax}
-\cs{StrMapVariable} \Arg{token list} \meta{variable} \Arg{code}
-\cs{StrVarMapVariable} \meta{str var} \meta{variable} \Arg{code}
+\cs{strMapVariable} \Arg{token list} \meta{variable} \Arg{code}
+\cs{strVarMapVariable} \meta{str var} \meta{variable} \Arg{code}
\end{syntax}
Converts the \meta{token list} to a \meta{string} then stores each
\meta{character} in the \meta{string} (including spaces) in turn in
@@ -2676,18 +2676,18 @@ the (string or token list) \meta{variable} and applies the
\meta{string} is empty.
\begin{demohigh}
\IgnoreSpacesOn
-\StrClear \lTmpaStr
-\StrMapVariable {one} \lTmpiStr {
- \StrPutRight \lTmpaStr {\Expand {[\lTmpiStr]}}
+\strClear \lTmpaStr
+\strMapVariable {one} \lTmpiStr {
+ \strPutRight \lTmpaStr {\expWhole {[\lTmpiStr]}}
}
-\StrUse \lTmpaStr
+\strUse \lTmpaStr
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\StrMapBreak}
+%\begin{function}{\strMapBreak}
%\begin{syntax}
-%\cs{StrMapBreak}
+%\cs{strMapBreak}
%\end{syntax}
%Used to terminate a string map function before all
%characters in the \meta{string} have been processed. This
@@ -2699,7 +2699,7 @@ the (string or token list) \meta{variable} and applies the
%Do something useful
%}
%\end{verbatim}
-%See also \cs{StrMapBreakDo}.
+%See also \cs{strMapBreakDo}.
%Use outside of a string map scenario leads to low
%level \TeX{} errors.
%\begin{texnote}
@@ -2710,9 +2710,9 @@ the (string or token list) \meta{variable} and applies the
%\end{texnote}
%\end{function}
%
-%\begin{function}{\StrMapBreakDo}
+%\begin{function}{\strMapBreakDo}
%\begin{syntax}
-%\cs{StrMapBreakDo} \Arg{code}
+%\cs{strMapBreakDo} \Arg{code}
%\end{syntax}
%Used to terminate a string map function before all
%characters in the \meta{string} have been processed, inserting
@@ -2738,44 +2738,44 @@ the (string or token list) \meta{variable} and applies the
\section{String Conditionals}
-\begin{function}{\StrIfExist,\StrIfExistT,\StrIfExistF,\StrIfExistTF}
+\begin{function}{\strIfExist,\strIfExistT,\strIfExistF,\strIfExistTF}
\begin{syntax}
-\cs{StrIfExist} \meta{str var}
-\cs{StrIfExistT} \meta{str var} \Arg{true code}
-\cs{StrIfExistF} \meta{str var} \Arg{false code}
-\cs{StrIfExistTF} \meta{str var} \Arg{true code} \Arg{false code}
+\cs{strIfExist} \meta{str var}
+\cs{strIfExistT} \meta{str var} \Arg{true code}
+\cs{strIfExistF} \meta{str var} \Arg{false code}
+\cs{strIfExistTF} \meta{str var} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{str var} is currently defined. This does not
check that the \meta{str var} really is a string.
\begin{demohigh}
-\StrIfExistTF \lTmpaStr {\Return{Yes}} {\Return{No}}
-\StrIfExistTF \lFooUndefinedStr {\Return{Yes}} {\Return{No}}
+\strIfExistTF \lTmpaStr {\prgReturn{Yes}} {\prgReturn{No}}
+\strIfExistTF \lFooUndefinedStr {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\StrVarIfEmpty,\StrVarIfEmptyT,\StrVarIfEmptyF,\StrVarIfEmptyTF}
+\begin{function}{\strVarIfEmpty,\strVarIfEmptyT,\strVarIfEmptyF,\strVarIfEmptyTF}
\begin{syntax}
-\cs{StrVarIfEmpty} \meta{str var}
-\cs{StrVarIfEmptyT} \meta{str var} \Arg{true code}
-\cs{StrVarIfEmptyF} \meta{str var} \Arg{false code}
-\cs{StrVarIfEmptyTF} \meta{str var} \Arg{true code} \Arg{false code}
+\cs{strVarIfEmpty} \meta{str var}
+\cs{strVarIfEmptyT} \meta{str var} \Arg{true code}
+\cs{strVarIfEmptyF} \meta{str var} \Arg{false code}
+\cs{strVarIfEmptyTF} \meta{str var} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{string variable} is entirely empty
(\emph{i.e.} contains no characters at all).
\begin{demohigh}
-\StrSet \lTmpaStr {abc}
-\StrVarIfEmptyTF \lTmpaStr {\Return{Empty}} {\Return{NonEmpty}}
-\StrClear \lTmpaStr
-\StrVarIfEmptyTF \lTmpaStr {\Return{Empty}} {\Return{NonEmpty}}
+\strSet \lTmpaStr {abc}
+\strVarIfEmptyTF \lTmpaStr {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\strClear \lTmpaStr
+\strVarIfEmptyTF \lTmpaStr {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\StrIfEq,\StrIfEqT,\StrIfEqF,\StrIfEqTF}
+\begin{function}{\strIfEq,\strIfEqT,\strIfEqF,\strIfEqTF}
\begin{syntax}
-\cs{StrIfEq} \Arg{tl_1} \Arg{tl_2}
-\cs{StrIfEqT} \Arg{tl_1} \Arg{tl_2} \Arg{true code}
-\cs{StrIfEqF} \Arg{tl_1} \Arg{tl_2} \Arg{false code}
-\cs{StrIfEqTF} \Arg{tl_1} \Arg{tl_2} \Arg{true code} \Arg{false code}
+\cs{strIfEq} \Arg{tl_1} \Arg{tl_2}
+\cs{strIfEqT} \Arg{tl_1} \Arg{tl_2} \Arg{true code}
+\cs{strIfEqF} \Arg{tl_1} \Arg{tl_2} \Arg{false code}
+\cs{strIfEqTF} \Arg{tl_1} \Arg{tl_2} \Arg{true code} \Arg{false code}
\end{syntax}
Compares the two \meta{token lists} on a character by character
basis (namely after converting them to strings),
@@ -2783,84 +2783,84 @@ and is \texttt{true} if the two \meta{strings} contain the same
characters in the same order.
%Thus for example
%\begin{codehigh}
-%\StrIfEq{abc}{\TlToStr{abc}}
+%\strIfEq{abc}{\tlToStr{abc}}
%\end{codehigh}
%is logically \texttt{true}.
-See \cs{TlIfEq} to compare
+See \cs{tlIfEq} to compare
tokens (including their category codes) rather than characters.
For example
\begin{demohigh}
-\StrIfEqTF {abc} {abc} {\Return{Yes}} {\Return{No}}
-\StrIfEqTF {abc} {xyz} {\Return{Yes}} {\Return{No}}
+\strIfEqTF {abc} {abc} {\prgReturn{Yes}} {\prgReturn{No}}
+\strIfEqTF {abc} {xyz} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
%\begin{demohigh}
-%\StrSet\lTmpaStr{abc}
-%\StrSet\lTmpbStr{abc}
-%\StrSet\lTmpcStr{xyz}
-%\StrIfEqTF{\lTmpaStr}{\lTmpbStr}{\Return{Yes}}{\Return{No}}
-%\StrIfEqTF{\lTmpaStr}{\lTmpcStr}{\Return{Yes}}{\Return{No}}
-%\StrIfEqTF{\StrUse\lTmpaStr}{\StrUse\lTmpbStr}{\Return{Yes}}{\Return{No}}
-%\StrIfEqTF{\StrUse\lTmpaStr}{\StrUse\lTmpcStr}{\Return{Yes}}{\Return{No}}
+%\strSet\lTmpaStr{abc}
+%\strSet\lTmpbStr{abc}
+%\strSet\lTmpcStr{xyz}
+%\strIfEqTF{\lTmpaStr}{\lTmpbStr}{\prgReturn{Yes}}{\prgReturn{No}}
+%\strIfEqTF{\lTmpaStr}{\lTmpcStr}{\prgReturn{Yes}}{\prgReturn{No}}
+%\strIfEqTF{\strUse\lTmpaStr}{\strUse\lTmpbStr}{\prgReturn{Yes}}{\prgReturn{No}}
+%\strIfEqTF{\strUse\lTmpaStr}{\strUse\lTmpcStr}{\prgReturn{Yes}}{\prgReturn{No}}
%\end{demohigh}
\end{function}
-\begin{function}{\StrVarIfEq,\StrVarIfEqT,\StrVarIfEqF,\StrVarIfEqTF}
+\begin{function}{\strVarIfEq,\strVarIfEqT,\strVarIfEqF,\strVarIfEqTF}
\begin{syntax}
-\cs{StrVarIfEq} \meta{str var_1} \meta{str var_2}
-\cs{StrVarIfEqT} \meta{str var_1} \meta{str var_2} \Arg{true code}
-\cs{StrVarIfEqF} \meta{str var_1} \meta{str var_2} \Arg{false code}
-\cs{StrVarIfEqTF} \meta{str var_1} \meta{str var_2} \Arg{true code} \Arg{false code}
+\cs{strVarIfEq} \meta{str var_1} \meta{str var_2}
+\cs{strVarIfEqT} \meta{str var_1} \meta{str var_2} \Arg{true code}
+\cs{strVarIfEqF} \meta{str var_1} \meta{str var_2} \Arg{false code}
+\cs{strVarIfEqTF} \meta{str var_1} \meta{str var_2} \Arg{true code} \Arg{false code}
\end{syntax}
Compares the content of two \meta{str variables} and
is logically \texttt{true} if the two contain the same characters
-in the same order. See \cs{TlVarIfEq} to compare tokens
+in the same order. See \cs{tlVarIfEq} to compare tokens
(including their category codes) rather than characters.
\begin{demohigh}
-\StrSet \lTmpaStr {abc}
-\StrSet \lTmpbStr {abc}
-\StrSet \lTmpcStr {xyz}
-\StrVarIfEqTF \lTmpaStr \lTmpbStr {\Return{Yes}} {\Return{No}}
-\StrVarIfEqTF \lTmpaStr \lTmpcStr {\Return{Yes}} {\Return{No}}
+\strSet \lTmpaStr {abc}
+\strSet \lTmpbStr {abc}
+\strSet \lTmpcStr {xyz}
+\strVarIfEqTF \lTmpaStr \lTmpbStr {\prgReturn{Yes}} {\prgReturn{No}}
+\strVarIfEqTF \lTmpaStr \lTmpcStr {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\StrIfIn,\StrIfInT,\StrIfInF,\StrIfInTF}
+\begin{function}{\strIfIn,\strIfInT,\strIfInF,\strIfInTF}
\begin{syntax}
-\cs{StrIfIn} \Arg{tl_1} \Arg{tl_2}
-\cs{StrIfInT} \Arg{tl_1} \Arg{tl_2} \Arg{true code}
-\cs{StrIfInF} \Arg{tl_1} \Arg{tl_2} \Arg{false code}
-\cs{StrIfInTF} \Arg{tl_1} \Arg{tl_2} \Arg{true code} \Arg{false code}
+\cs{strIfIn} \Arg{tl_1} \Arg{tl_2}
+\cs{strIfInT} \Arg{tl_1} \Arg{tl_2} \Arg{true code}
+\cs{strIfInF} \Arg{tl_1} \Arg{tl_2} \Arg{false code}
+\cs{strIfInTF} \Arg{tl_1} \Arg{tl_2} \Arg{true code} \Arg{false code}
\end{syntax}
Converts both \meta{token lists} to \meta{strings} and
tests whether \meta{string_2} is found inside \meta{string_1}.
\begin{demohigh}
-\StrIfInTF {hello world} {o} {\Return{Yes}}{\Return{No}}
-\StrIfInTF {hello world} {a} {\Return{Yes}}{\Return{No}}
+\strIfInTF {hello world} {o} {\prgReturn{Yes}}{\prgReturn{No}}
+\strIfInTF {hello world} {a} {\prgReturn{Yes}}{\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\StrVarIfIn,\StrVarIfInT,\StrVarIfInF,\StrVarIfInTF}
+\begin{function}{\strVarIfIn,\strVarIfInT,\strVarIfInF,\strVarIfInTF}
\begin{syntax}
-\cs{StrVarIfIn} \meta{str var} \Arg{token list}
-\cs{StrVarIfInT} \meta{str var} \Arg{token list} \Arg{true code}
-\cs{StrVarIfInF} \meta{str var} \Arg{token list} \Arg{false code}
-\cs{StrVarIfInTF} \meta{str var} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{strVarIfIn} \meta{str var} \Arg{token list}
+\cs{strVarIfInT} \meta{str var} \Arg{token list} \Arg{true code}
+\cs{strVarIfInF} \meta{str var} \Arg{token list} \Arg{false code}
+\cs{strVarIfInTF} \meta{str var} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Converts the \meta{token list} to a \meta{string} and
tests if that \meta{string} is found in the content of the \meta{str var}.
\begin{demohigh}
-\StrSet \lTmpaStr {hello world}
-\StrVarIfInTF \lTmpaStr {o} {\Return{Yes}}{\Return{No}}
-\StrVarIfInTF \lTmpaStr {a} {\Return{Yes}}{\Return{No}}
+\strSet \lTmpaStr {hello world}
+\strVarIfInTF \lTmpaStr {o} {\prgReturn{Yes}}{\prgReturn{No}}
+\strVarIfInTF \lTmpaStr {a} {\prgReturn{Yes}}{\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\StrCompare,\StrCompareT,\StrCompareF,\StrCompareTF}
+\begin{function}{\strCompare,\strCompareT,\strCompareF,\strCompareTF}
\begin{syntax}
-\cs{StrCompare} \Arg{tl_1} \meta{relation} \Arg{tl_2}
-\cs{StrCompareT} \Arg{tl_1} \meta{relation} \Arg{tl_2} \Arg{true code}
-\cs{StrCompareF} \Arg{tl_1} \meta{relation} \Arg{tl_2} \Arg{false code}
-\cs{StrCompareTF} \Arg{tl_1} \meta{relation} \Arg{tl_2} \Arg{true code} \Arg{false code}
+\cs{strCompare} \Arg{tl_1} \meta{relation} \Arg{tl_2}
+\cs{strCompareT} \Arg{tl_1} \meta{relation} \Arg{tl_2} \Arg{true code}
+\cs{strCompareF} \Arg{tl_1} \meta{relation} \Arg{tl_2} \Arg{false code}
+\cs{strCompareTF} \Arg{tl_1} \meta{relation} \Arg{tl_2} \Arg{true code} \Arg{false code}
\end{syntax}
Compares the two \meta{token lists} on a character by character
basis (namely after converting them to strings) in a lexicographic
@@ -2874,8 +2874,8 @@ order according to the character codes of the characters. The
\end{itemize}
For example:
\begin{demohigh}
-\StrCompareTF {ab} < {abc} {\Return{Yes}} {\Return{No}}
-\StrCompareTF {ab} < {aa} {\Return{Yes}} {\Return{No}}
+\strCompareTF {ab} < {abc} {\prgReturn{Yes}} {\prgReturn{No}}
+\strCompareTF {ab} < {aa} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
%\begin{texnote}
%This is a wrapper around the \TeX{} primitive
@@ -2885,15 +2885,15 @@ For example:
%clusters, locale, etc.
%\end{texnote}
\par
-Due to naming conflict, you need to use \cs{StrIfCompare}/\cs{StrIfCompareTF} as a replacement
+Due to naming conflict, you need to use \cs{strIfCompare}/\cs{strIfCompareTF} as a replacement
if you want to use \verb!functional! package together with \verb!xstring! package.
\end{function}
\section{String Case Functions}
-\begin{function}{\StrCase}
+\begin{function}{\strCase}
\begin{syntax}
-\cs{StrCase} \Arg{test string}
+\cs{strCase} \Arg{test string}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{string case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{string case_2} \Arg{code case_2}
@@ -2904,22 +2904,22 @@ if you want to use \verb!functional! package together with \verb!xstring! packag
Compares the \meta{test string} in turn with each
of the \meta{string cases} (all token lists are converted to strings).
If the two are equal (as described for
-\cs{StrIfEq}) then the associated \meta{code} is left in the
+\cs{strIfEq}) then the associated \meta{code} is left in the
input stream and other cases are discarded.
\begin{demohigh}
\IgnoreSpacesOn
-\StrCase {bbb} {
- {aaa} {\Return{First}}
- {bbb} {\Return{Second}}
- {ccb} {\Return{Third}}
+\strCase {bbb} {
+ {aaa} {\prgReturn{First}}
+ {bbb} {\prgReturn{Second}}
+ {ccb} {\prgReturn{Third}}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\StrCaseT}
+\begin{function}{\strCaseT}
\begin{syntax}
-\cs{StrCaseT} \Arg{test string}
+\cs{strCaseT} \Arg{test string}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{string case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{string case_2} \Arg{code case_2}
@@ -2931,26 +2931,26 @@ input stream and other cases are discarded.
Compares the \meta{test string} in turn with each
of the \meta{string cases} (all token lists are converted to strings).
If the two are equal (as described for
-\cs{StrIfEq}) then the associated \meta{code} is left in the
+\cs{strIfEq}) then the associated \meta{code} is left in the
input stream and other cases are discarded. If any of the
cases are matched, the \meta{true code} is also inserted into the
input stream (after the code for the appropriate case).
\begin{demohigh}
\IgnoreSpacesOn
-\StrCaseT {bbb} {
- {aaa} {\TlSet\lTmpkTl{First}}
- {bbb} {\TlSet\lTmpkTl{Second}}
- {ccb} {\TlSet\lTmpkTl{Third}}
+\strCaseT {bbb} {
+ {aaa} {\tlSet\lTmpkTl{First}}
+ {bbb} {\tlSet\lTmpkTl{Second}}
+ {ccb} {\tlSet\lTmpkTl{Third}}
}{
- \Return{\TlUse\lTmpkTl}
+ \prgReturn{\tlUse\lTmpkTl}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\StrCaseF}
+\begin{function}{\strCaseF}
\begin{syntax}
-\cs{StrCaseF} \Arg{test string}
+\cs{strCaseF} \Arg{test string}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{string case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{string case_2} \Arg{code case_2}
@@ -2962,25 +2962,25 @@ input stream (after the code for the appropriate case).
Compares the \meta{test string} in turn with each
of the \meta{string cases} (all token lists are converted to strings).
If the two are equal (as described for
-\cs{StrIfEq}) then the associated \meta{code} is left in the
+\cs{strIfEq}) then the associated \meta{code} is left in the
input stream and other cases are discarded. If none
match then the \meta{false code} is inserted.
\begin{demohigh}
\IgnoreSpacesOn
-\StrCaseF {bbb} {
- {aaa} {\Return{First}}
- {bbb} {\Return{Second}}
- {ccb} {\Return{Third}}
+\strCaseF {bbb} {
+ {aaa} {\prgReturn{First}}
+ {bbb} {\prgReturn{Second}}
+ {ccb} {\prgReturn{Third}}
}{
- \Return{No~Match!}
+ \prgReturn{No~Match!}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\StrCaseTF}
+\begin{function}{\strCaseTF}
\begin{syntax}
-\cs{StrCaseTF} \Arg{test string}
+\cs{strCaseTF} \Arg{test string}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{string case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{string case_2} \Arg{code case_2}
@@ -2993,21 +2993,21 @@ match then the \meta{false code} is inserted.
Compares the \meta{test string} in turn with each
of the \meta{string cases} (all token lists are converted to strings).
If the two are equal (as described for
-\cs{StrIfEq}) then the associated \meta{code} is left in the
+\cs{strIfEq}) then the associated \meta{code} is left in the
input stream and other cases are discarded. If any of the
cases are matched, the \meta{true code} is also inserted into the
input stream (after the code for the appropriate case), while if none
match then the \meta{false code} is inserted.
\begin{demohigh}
\IgnoreSpacesOn
-\StrCaseTF {bbb} {
- {aaa} {\TlSet\lTmpkTl{First}}
- {bbb} {\TlSet\lTmpkTl{Second}}
- {ccb} {\TlSet\lTmpkTl{Third}}
+\strCaseTF {bbb} {
+ {aaa} {\tlSet\lTmpkTl{First}}
+ {bbb} {\tlSet\lTmpkTl{Second}}
+ {ccb} {\tlSet\lTmpkTl{Third}}
}{
- \Return{\TlUse\lTmpkTl}
+ \prgReturn{\tlUse\lTmpkTl}
}{
- \Return{No~Match!}
+ \prgReturn{No~Match!}
}
\IgnoreSpacesOff
\end{demohigh}
@@ -3072,19 +3072,19 @@ of an expression or after \texttt{+}, \texttt{-}, \texttt{*},
\texttt{/} or~\texttt{(} leads to an error.
\end{itemize}
Each integer operand can be either an integer variable (with no need
-for \cs{IntUse}) or an integer denotation.
+for \cs{intUse}) or an integer denotation.
For example both of the following give the same result
because \cs{lFooSomeTl} expands to the integer denotation~$5$
while the integer variable \cs{lFooSomeInt} takes the value~$4$.
\begin{demohigh}
-\IntEval {5 + 4 * 3 - (3 + 4 * 5)}
+\intEval {5 + 4 * 3 - (3 + 4 * 5)}
\end{demohigh}
\begin{demohigh}
-\TlNew \lFooSomeTl
-\TlSet \lFooSomeTl {5}
-\IntNew \lFooSomeInt
-\IntSet \lFooSomeInt {4}
-\IntEval {\lFooSomeTl + \lFooSomeInt * 3 - (3 + 4 * 5)}
+\tlNew \lFooSomeTl
+\tlSet \lFooSomeTl {5}
+\intNew \lFooSomeInt
+\intSet \lFooSomeInt {4}
+\intEval {\lFooSomeTl + \lFooSomeInt * 3 - (3 + 4 * 5)}
\end{demohigh}
%\begin{texnote}
@@ -3100,9 +3100,9 @@ while the integer variable \cs{lFooSomeInt} takes the value~$4$.
\section{Using Integer Expressions}
-\begin{function}{\IntEval}
+\begin{function}{\intEval}
\begin{syntax}
-\cs{IntEval} \Arg{integer expression}
+\cs{intEval} \Arg{integer expression}
\end{syntax}
Evaluates the \meta{integer expression} and returns the result:
for positive results an
@@ -3110,49 +3110,49 @@ explicit sequence of decimal digits not starting with~\texttt{0},
for negative results \texttt{-}~followed by such a sequence, and
\texttt{0}~for zero. For example
\begin{demohigh}
-\IntEval {(1+4)*(2-3)/5}
+\intEval {(1+4)*(2-3)/5}
\end{demohigh}
\begin{demohigh}
-\IntEval {\StrCount{12\TeX34} - \TlCount{12\TeX34}}
+\intEval {\strCount{12\TeX34} - \tlCount{12\TeX34}}
\end{demohigh}
\end{function}
-\begin{function}{\IntMathAdd}
+\begin{function}{\intMathAdd}
\begin{syntax}
-\cs{IntMathAdd} \Arg{integer expression_1} \Arg{integer expression_2}
+\cs{intMathAdd} \Arg{integer expression_1} \Arg{integer expression_2}
\end{syntax}
Adds \Arg{integer expression_1} and \Arg{integer expression_2},
and returns the result. For example
\begin{demohigh}
-\IntMathAdd {7} {3}
+\intMathAdd {7} {3}
\end{demohigh}
\end{function}
-\begin{function}{\IntMathSub}
+\begin{function}{\intMathSub}
\begin{syntax}
-\cs{IntMathSub} \Arg{integer expression_1} \Arg{integer expression_2}
+\cs{intMathSub} \Arg{integer expression_1} \Arg{integer expression_2}
\end{syntax}
Subtracts \Arg{integer expression_2} from \Arg{integer expression_1},
and returns the result. For example
\begin{demohigh}
-\IntMathSub {7} {3}
+\intMathSub {7} {3}
\end{demohigh}
\end{function}
-\begin{function}{\IntMathMult}
+\begin{function}{\intMathMult}
\begin{syntax}
-\cs{IntMathMult} \Arg{integer expression_1} \Arg{integer expression_2}
+\cs{intMathMult} \Arg{integer expression_1} \Arg{integer expression_2}
\end{syntax}
Multiplies \Arg{integer expression_1} by \Arg{integer expression_2},
and returns the result. For example
\begin{demohigh}
-\IntMathMult {7} {3}
+\intMathMult {7} {3}
\end{demohigh}
\end{function}
-\begin{function}{\IntMathDiv}
+\begin{function}{\intMathDiv}
\begin{syntax}
-\cs{IntMathDiv} \Arg{integer expression_1} \Arg{integer expression_2}
+\cs{intMathDiv} \Arg{integer expression_1} \Arg{integer expression_2}
\end{syntax}
Evaluates the two \meta{integer expressions} as described earlier,
then divides the first value by the second, and rounds the result
@@ -3161,13 +3161,13 @@ this is identical to using \verb|/| directly in an \meta{integer expression}.
The result is returned as an \meta{integer denotation}.
For example
\begin{demohigh}
-\IntMathDiv {8} {3}
+\intMathDiv {8} {3}
\end{demohigh}
\end{function}
-\begin{function}{\IntMathDivTrancate}
+\begin{function}{\intMathDivTrancate}
\begin{syntax}
-\cs{IntMathDivTrancate} \Arg{integer expression_1} \Arg{integer expression_2}
+\cs{intMathDivTrancate} \Arg{integer expression_1} \Arg{integer expression_2}
\end{syntax}
Evaluates the two \meta{integer expressions} as described earlier,
then divides the first value by the second, and rounds the result towards zero.
@@ -3175,56 +3175,56 @@ Note that division using \verb|/| rounds to the closest integer instead.
The result is returned as an \meta{integer denotation}.
For example
\begin{demohigh}
-\IntMathDivTruncate {8} {3}
+\intMathDivTruncate {8} {3}
\end{demohigh}
\end{function}
-\begin{function}{\IntMathSign}
+\begin{function}{\intMathSign}
\begin{syntax}
-\cs{IntMathSign} \Arg{intexpr}
+\cs{intMathSign} \Arg{intexpr}
\end{syntax}
Evaluates the \meta{integer expression} then leaves $1$ or $0$ or
$-1$ in the input stream according to the sign of the result.
\end{function}
-\begin{function}{\IntMathAbs}
+\begin{function}{\intMathAbs}
\begin{syntax}
-\cs{IntMathAbs} \Arg{integer expression}
+\cs{intMathAbs} \Arg{integer expression}
\end{syntax}
Evaluates the \meta{integer expression} as described for
-\cs{IntEval} and leaves the absolute value of the result in
+\cs{intEval} and leaves the absolute value of the result in
the input stream as an \meta{integer denotation} after two
expansions.
\end{function}
-\begin{function}{\IntMathMax,\IntMathMin}
+\begin{function}{\intMathMax,\intMathMin}
\begin{syntax}
-\cs{IntMathMax} \Arg{intexpr_1} \Arg{intexpr_2}
-\cs{IntMathMin} \Arg{intexpr_1} \Arg{intexpr_2}
+\cs{intMathMax} \Arg{intexpr_1} \Arg{intexpr_2}
+\cs{intMathMin} \Arg{intexpr_1} \Arg{intexpr_2}
\end{syntax}
Evaluates the \meta{integer expressions} as described for
-\cs{IntEval} and leaves either the larger or smaller value
+\cs{intEval} and leaves either the larger or smaller value
in the input stream as an \meta{integer denotation} after two
expansions.
\end{function}
-\begin{function}{\IntMathMod}
+\begin{function}{\intMathMod}
\begin{syntax}
-\cs{IntMathMod} \Arg{intexpr_1} \Arg{intexpr_2}
+\cs{intMathMod} \Arg{intexpr_1} \Arg{intexpr_2}
\end{syntax}
Evaluates the two \meta{integer expressions} as described earlier,
then calculates the integer remainder of dividing the first
expression by the second. This is obtained by subtracting
-\cs{IntMathDivTruncate} \Arg{intexpr_1} \Arg{intexpr_2} times
+\cs{intMathDivTruncate} \Arg{intexpr_1} \Arg{intexpr_2} times
\meta{intexpr_2} from \meta{intexpr_1}. Thus, the result has the
same sign as \meta{intexpr_1} and its absolute value is strictly
less than that of \meta{intexpr_2}. The result is left in the input
stream as an \meta{integer denotation} after two expansions.
\end{function}
-\begin{function}{\IntMathRand}
+\begin{function}{\intMathRand}
\begin{syntax}
-\cs{IntMathRand} \Arg{intexpr_1} \Arg{intexpr_2}
+\cs{intMathRand} \Arg{intexpr_1} \Arg{intexpr_2}
\end{syntax}
Evaluates the two \meta{integer expressions} and produces a
pseudo-random number between the two (with bounds included).
@@ -3233,27 +3233,27 @@ pseudo-random number between the two (with bounds included).
\section{Creating and Using Integers}
-\begin{function}{\IntNew}
+\begin{function}{\intNew}
\begin{syntax}
-\cs{IntNew} \meta{integer}
+\cs{intNew} \meta{integer}
\end{syntax}
Creates a new \meta{integer} or raises an error if the name is
already taken. The declaration is global. The \meta{integer} is
initially equal to $0$.
\end{function}
-\begin{function}{\IntConst}
+\begin{function}{\intConst}
\begin{syntax}
-\cs{IntConst} \meta{integer} \Arg{integer expression}
+\cs{intConst} \meta{integer} \Arg{integer expression}
\end{syntax}
Creates a new constant \meta{integer} or raises an error if the name
is already taken. The value of the \meta{integer} is set
globally to the \meta{integer expression}.
\end{function}
-\begin{function}{\IntUse}
+\begin{function}{\intUse}
\begin{syntax}
-\cs{IntUse} \meta{integer}
+\cs{intUse} \meta{integer}
\end{syntax}
Recovers the content of an \meta{integer} and returns the value.
An error is raised if the variable does not exist or if it is invalid.
@@ -3261,148 +3261,148 @@ An error is raised if the variable does not exist or if it is invalid.
\section{Viewing Integers}
-\begin{function}{\IntLog}
+\begin{function}{\intLog}
\begin{syntax}
-\cs{IntLog} \Arg{integer expression}
+\cs{intLog} \Arg{integer expression}
\end{syntax}
Writes the result of evaluating the \meta{integer expression}
in the log file.
\end{function}
-\begin{function}{\IntVarLog}
+\begin{function}{\intVarLog}
\begin{syntax}
-\cs{IntVarLog} \meta{integer}
+\cs{intVarLog} \meta{integer}
\end{syntax}
Writes the value of the \meta{integer} in the log file.
\end{function}
-\begin{function}{\IntShow}
+\begin{function}{\intShow}
\begin{syntax}
-\cs{IntShow} \Arg{integer expression}
+\cs{intShow} \Arg{integer expression}
\end{syntax}
Displays the result of evaluating the \meta{integer expression}
on the terminal.
\end{function}
-\begin{function}{\IntVarShow}
+\begin{function}{\intVarShow}
\begin{syntax}
-\cs{IntVarShow} \meta{integer}
+\cs{intVarShow} \meta{integer}
\end{syntax}
Displays the value of the \meta{integer} on the terminal.
\end{function}
\section{Setting Integer Variables}
-\begin{function}{\IntSet}
+\begin{function}{\intSet}
\begin{syntax}
-\cs{IntSet} \meta{integer} \Arg{integer expression}
+\cs{intSet} \meta{integer} \Arg{integer expression}
\end{syntax}
Sets \meta{integer} to the value of \meta{integer expression},
-which must evaluate to an integer (as described for \cs{IntEval}).
+which must evaluate to an integer (as described for \cs{intEval}).
For example
\begin{demohigh}
-\IntSet \lTmpaInt {3+5}
-\IntUse \lTmpaInt
+\intSet \lTmpaInt {3+5}
+\intUse \lTmpaInt
\end{demohigh}
\end{function}
-\begin{function}{\IntSetEq}
+\begin{function}{\intSetEq}
\begin{syntax}
-\cs{IntSetEq} \meta{integer_1} \meta{integer_2}
+\cs{intSetEq} \meta{integer_1} \meta{integer_2}
\end{syntax}
Sets the content of \meta{integer_1} equal to that of
\meta{integer_2}.
\end{function}
-\begin{function}{\IntZero}
+\begin{function}{\intZero}
\begin{syntax}
-\cs{IntZero} \meta{integer}
+\cs{intZero} \meta{integer}
\end{syntax}
Sets \meta{integer} to $0$. For example
\begin{demohigh}
-\IntSet \lTmpaInt {5}
-\IntZero \lTmpaInt
-\IntUse \lTmpaInt
+\intSet \lTmpaInt {5}
+\intZero \lTmpaInt
+\intUse \lTmpaInt
\end{demohigh}
\end{function}
-\begin{function}{\IntZeroNew}
+\begin{function}{\intZeroNew}
\begin{syntax}
-\cs{IntZeroNew} \meta{integer}
+\cs{intZeroNew} \meta{integer}
\end{syntax}
Ensures that the \meta{integer} exists globally by applying
-\cs{IntNew} if necessary, then applies \cs{IntZero} to leave
+\cs{intNew} if necessary, then applies \cs{intZero} to leave
the \meta{integer} set to zero.
\end{function}
-\begin{function}{\IntIncr}
+\begin{function}{\intIncr}
\begin{syntax}
-\cs{IntIncr} \meta{integer}
+\cs{intIncr} \meta{integer}
\end{syntax}
Increases the value stored in \meta{integer} by $1$.
For example
\begin{demohigh}
-\IntSet \lTmpaInt {5}
-\IntIncr \lTmpaInt
-\IntUse \lTmpaInt
+\intSet \lTmpaInt {5}
+\intIncr \lTmpaInt
+\intUse \lTmpaInt
\end{demohigh}
\end{function}
-\begin{function}{\IntDecr}
+\begin{function}{\intDecr}
\begin{syntax}
-\cs{IntDecr} \meta{integer}
+\cs{intDecr} \meta{integer}
\end{syntax}
Decreases the value stored in \meta{integer} by $1$.
For example
\begin{demohigh}
-\IntSet \lTmpaInt {5}
-\IntDecr \lTmpaInt
-\IntUse \lTmpaInt
+\intSet \lTmpaInt {5}
+\intDecr \lTmpaInt
+\intUse \lTmpaInt
\end{demohigh}
\end{function}
-\begin{function}{\IntAdd}
+\begin{function}{\intAdd}
\begin{syntax}
-\cs{IntAdd} \meta{integer} \Arg{integer expression}
+\cs{intAdd} \meta{integer} \Arg{integer expression}
\end{syntax}
Adds the result of the \meta{integer expression} to the current
content of the \meta{integer}. For example
\begin{demohigh}
-\IntSet \lTmpaInt {5}
-\IntAdd \lTmpaInt {2}
-\IntUse \lTmpaInt
+\intSet \lTmpaInt {5}
+\intAdd \lTmpaInt {2}
+\intUse \lTmpaInt
\end{demohigh}
\end{function}
-\begin{function}{\IntSub}
+\begin{function}{\intSub}
\begin{syntax}
-\cs{IntSub} \meta{integer} \Arg{integer expression}
+\cs{intSub} \meta{integer} \Arg{integer expression}
\end{syntax}
Subtracts the result of the \meta{integer expression} from the
current content of the \meta{integer}. For example
\begin{demohigh}
-\IntSet \lTmpaInt {5}
-\IntSub \lTmpaInt {3}
-\IntUse \lTmpaInt
+\intSet \lTmpaInt {5}
+\intSub \lTmpaInt {3}
+\intUse \lTmpaInt
\end{demohigh}
\end{function}
\section{Integer Step Functions}
-\begin{function}{\IntReplicate}
+\begin{function}{\intReplicate}
\begin{syntax}
-\cs{IntReplicate} \Arg{integer expression} \Arg{tokens}
+\cs{intReplicate} \Arg{integer expression} \Arg{tokens}
\end{syntax}
Evaluates the \meta{integer expression} (which should be zero or positive)
and returns the resulting number of copies of the \meta{tokens}.
\begin{demohigh}
-\IntReplicate {4} {Hello}
+\intReplicate {4} {Hello}
\end{demohigh}
\end{function}
-%\begin{function}{\IntStepFunction}
+%\begin{function}{\intStepFunction}
%\begin{syntax}
-%\cs{IntStepFunction} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
+%\cs{intStepFunction} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
%\end{syntax}
%This function first evaluates the \meta{initial value}, \meta{step}
%and \meta{final value}, all of which should be integer expressions.
@@ -3428,9 +3428,9 @@ and returns the resulting number of copies of the \meta{tokens}.
%\end{quote}
%\end{function}
-\begin{function}{\IntStepInline}
+\begin{function}{\intStepInline}
\begin{syntax}
-\cs{IntStepInline} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
+\cs{intStepInline} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value}, \meta{step}
and \meta{final value}, all of which should be integer expressions.
@@ -3441,18 +3441,18 @@ with \verb|#1| replaced by the current \meta{value}. Thus the
\meta{code} should define a function of one argument~(\verb|#1|).
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\IntStepInline {1} {3} {30} {
- \TlPutRight \lTmpaTl {[#1]}
+\tlClear \lTmpaTl
+\intStepInline {1} {3} {30} {
+ \tlPutRight \lTmpaTl {[#1]}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\IntStepOneInline}
+\begin{function}{\intStepOneInline}
\begin{syntax}
-\cs{IntStepOneInline} \Arg{initial value} \Arg{final value} \Arg{code}
+\cs{intStepOneInline} \Arg{initial value} \Arg{final value} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value} and \meta{final value},
all of which should be integer expressions.
@@ -3463,18 +3463,18 @@ with \verb|#1| replaced by the current \meta{value}. Thus the
\meta{code} should define a function of one argument~(\verb|#1|).
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\IntStepOneInline {1} {10} {
- \TlPutRight \lTmpaTl {[#1]}
+\tlClear \lTmpaTl
+\intStepOneInline {1} {10} {
+ \tlPutRight \lTmpaTl {[#1]}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\IntStepVariable}
+\begin{function}{\intStepVariable}
\begin{syntax}
-\cs{IntStepVariable} \Arg{initial value} \Arg{step} \Arg{final value} \meta{tl var} \Arg{code}
+\cs{intStepVariable} \Arg{initial value} \Arg{step} \Arg{final value} \meta{tl var} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value}, \meta{step}
and \meta{final value}, all of which should be integer expressions.
@@ -3486,19 +3486,19 @@ the \meta{code} should make use of the \meta{tl~var}.
%For example
%\begin{demohigh}
%\IgnoreSpacesOn
-%\TlClear\lTmpaTl
-%\IntStepVariable{1}{3}{30}\lTmpiTl{
-% \TlPutRight\lTmpaTl{\Value\lTmpiTl}
-% \TlPutRight\lTmpaTl{~}
+%\tlClear\lTmpaTl
+%\intStepVariable{1}{3}{30}\lTmpiTl{
+% \tlPutRight\lTmpaTl{\expValue\lTmpiTl}
+% \tlPutRight\lTmpaTl{~}
%}
-%\Return{\Value\lTmpaTl}
+%\prgReturn{\expValue\lTmpaTl}
%\IgnoreSpacesOff
%\end{demohigh}
\end{function}
-\begin{function}{\IntStepOneVariable}
+\begin{function}{\intStepOneVariable}
\begin{syntax}
-\cs{IntStepOneVariable} \Arg{initial value} \Arg{final value} \meta{tl var} \Arg{code}
+\cs{intStepOneVariable} \Arg{initial value} \Arg{final value} \meta{tl var} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value} and \meta{final value},
all of which should be integer expressions.
@@ -3511,50 +3511,50 @@ the \meta{code} should make use of the \meta{tl~var}.
\section{Integer Conditionals}
-\begin{function}{\IntIfExist,\IntIfExistT,\IntIfExistF,\IntIfExistTF}
+\begin{function}{\intIfExist,\intIfExistT,\intIfExistF,\intIfExistTF}
\begin{syntax}
-\cs{IntIfExist} \meta{integer}
-\cs{IntIfExistT} \meta{integer} \Arg{true code}
-\cs{IntIfExistF} \meta{integer} \Arg{false code}
-\cs{IntIfExistTF} \meta{integer} \Arg{true code} \Arg{false code}
+\cs{intIfExist} \meta{integer}
+\cs{intIfExistT} \meta{integer} \Arg{true code}
+\cs{intIfExistF} \meta{integer} \Arg{false code}
+\cs{intIfExistTF} \meta{integer} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{integer} is currently defined. This does not
check that the \meta{integer} really is an integer variable.
\end{function}
-\begin{function}{\IntIfOdd,\IntIfOddT,\IntIfOddF,\IntIfOddTF}
+\begin{function}{\intIfOdd,\intIfOddT,\intIfOddF,\intIfOddTF}
\begin{syntax}
-\cs{IntIfOdd} \Arg{integer expression}
-\cs{IntIfOddT} \Arg{integer expression} \Arg{true code}
-\cs{IntIfOddF} \Arg{integer expression} \Arg{false code}
-\cs{IntIfOddTF} \Arg{integer expression} \Arg{true code} \Arg{false code}
+\cs{intIfOdd} \Arg{integer expression}
+\cs{intIfOddT} \Arg{integer expression} \Arg{true code}
+\cs{intIfOddF} \Arg{integer expression} \Arg{false code}
+\cs{intIfOddTF} \Arg{integer expression} \Arg{true code} \Arg{false code}
\end{syntax}
This function first evaluates the \meta{integer expression}
-as described for \cs{IntEval}.
+as described for \cs{intEval}.
It then evaluates if this is odd or even, as appropriate.
\end{function}
-\begin{function}{\IntIfEven,\IntIfEvenT,\IntIfEvenF,\IntIfEvenTF}
+\begin{function}{\intIfEven,\intIfEvenT,\intIfEvenF,\intIfEvenTF}
\begin{syntax}
-\cs{IntIfEven} \Arg{integer expression}
-\cs{IntIfEvenT} \Arg{integer expression} \Arg{true code}
-\cs{IntIfEvenF} \Arg{integer expression} \Arg{false code}
-\cs{IntIfEvenTF} \Arg{integer expression} \Arg{true code} \Arg{false code}
+\cs{intIfEven} \Arg{integer expression}
+\cs{intIfEvenT} \Arg{integer expression} \Arg{true code}
+\cs{intIfEvenF} \Arg{integer expression} \Arg{false code}
+\cs{intIfEvenTF} \Arg{integer expression} \Arg{true code} \Arg{false code}
\end{syntax}
This function first evaluates the \meta{integer expression}
-as described for \cs{IntEval}.
+as described for \cs{intEval}.
It then evaluates if this is even or odd, as appropriate.
\end{function}
-\begin{function}{\IntCompare,\IntCompareT,\IntCompareF,\IntCompareTF}
+\begin{function}{\intCompare,\intCompareT,\intCompareF,\intCompareTF}
\begin{syntax}
-\cs{IntCompare} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2}
-\cs{IntCompareT} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{true code}
-\cs{IntCompareF} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{false code}
-\cs{IntCompareTF} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{true code} \Arg{false code}
+\cs{intCompare} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2}
+\cs{intCompareT} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{true code}
+\cs{intCompareF} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{false code}
+\cs{intCompareTF} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{true code} \Arg{false code}
\end{syntax}
This function first evaluates each of the \meta{integer expressions}
-as described for \cs{IntEval}. The two results are then
+as described for \cs{intEval}. The two results are then
compared using the \meta{relation}:\par
{\centering\begin{tabular}{ll}
Equal & \texttt{=} \\
@@ -3563,16 +3563,16 @@ Less than & \texttt{<} \\
\end{tabular}\par}
For example
\begin{demohigh}
-\IntCompareTF {2} > {1} {\Return{Greater}} {\Return{Less}}
-\IntCompareTF {2} > {3} {\Return{Greater}} {\Return{Less}}
+\intCompareTF {2} > {1} {\prgReturn{Greater}} {\prgReturn{Less}}
+\intCompareTF {2} > {3} {\prgReturn{Greater}} {\prgReturn{Less}}
\end{demohigh}
\end{function}
\section{Integer Case Functions}
-\begin{function}{\IntCase}
+\begin{function}{\intCase}
\begin{syntax}
-\cs{IntCase} \Arg{test integer expression}
+\cs{intCase} \Arg{test integer expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{intexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{intexpr case_2} \Arg{code case_2}
@@ -3587,9 +3587,9 @@ associated \meta{code} is left in the input stream
and other cases are discarded.
\end{function}
-\begin{function}{\IntCaseT}
+\begin{function}{\intCaseT}
\begin{syntax}
-\cs{IntCaseT} \Arg{test integer expression}
+\cs{intCaseT} \Arg{test integer expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{intexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{intexpr case_2} \Arg{code case_2}
@@ -3607,9 +3607,9 @@ cases are matched, the \meta{true code} is also inserted into the
input stream (after the code for the appropriate case).
\end{function}
-\begin{function}{\IntCaseF}
+\begin{function}{\intCaseF}
\begin{syntax}
-\cs{IntCaseF} \Arg{test integer expression}
+\cs{intCaseF} \Arg{test integer expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{intexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{intexpr case_2} \Arg{code case_2}
@@ -3628,7 +3628,7 @@ match then the \meta{false code} is into the input stream
For example
\begin{demohigh}
\IgnoreSpacesOn
-\IntCaseF { 2 * 5 }
+\intCaseF { 2 * 5 }
{
{ 5 } { Small }
{ 4 + 6 } { Medium }
@@ -3639,9 +3639,9 @@ For example
\end{demohigh}
\end{function}
-\begin{function}{\IntCaseTF}
+\begin{function}{\intCaseTF}
\begin{syntax}
-\cs{IntCaseTF} \Arg{test integer expression}
+\cs{intCaseTF} \Arg{test integer expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{intexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{intexpr case_2} \Arg{code case_2}
@@ -3768,7 +3768,7 @@ towards $+\infty$ if $t>0$ and towards $-\infty$ if $t<0$.
\item Constants: \texttt{pi}, \texttt{deg} (one degree in radians).
\item Dimensions, automatically expressed in points, \emph{e.g.},
\texttt{pc} is $12$.
-\item Automatic conversion (no need for \cs{IntUse}, etc) of
+\item Automatic conversion (no need for \cs{intUse}, etc) of
integer, dimension, and skip variables to floating point numbers,
expressing dimensions in points and ignoring the stretch and
shrink components of skips.
@@ -3789,7 +3789,7 @@ A \enquote{floating point} is a floating point number or a tuple thereof.
An example of use could be the following.
\begin{demohigh}
\LaTeX{} can now compute: $ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3}
-= \FpEval {sin(3.5)/2 + 2e-3} $.
+= \fpEval {sin(3.5)/2 + 2e-3} $.
\end{demohigh}
The operation \texttt{round} can be used to limit the result's
@@ -3816,9 +3816,9 @@ replacing it by \verb|+0|.
\section{Using Floating Point Expressions}
-\begin{function}{\FpEval}
+\begin{function}{\fpEval}
\begin{syntax}
-\cs{FpEval} \Arg{floating point expression}
+\cs{fpEval} \Arg{floating point expression}
\end{syntax}
Evaluates the \meta{floating point expression} and returns the
result as a decimal number with no
@@ -3827,98 +3827,98 @@ for the exponent. Non-significant trailing zeros are trimmed, and
integers are expressed without a decimal separator. The values
$\pm\infty$ and \nan{} trigger an \enquote{invalid operation}
exception.
-For a tuple, each item is converted using \cs{FpEval} and they are combined as
+For a tuple, each item is converted using \cs{fpEval} and they are combined as
\verb|(|\meta{fp_1}\verb*|, |\meta{fp_2}\verb*|, |\ldots{}\meta{fp_n}\verb|)|
if $n>1$ and \verb|(|\meta{fp_1}\verb|,)| or \verb|()| for fewer items.
%This function is identical to \cs{fp_to_decimal:n}.
For example
\begin{demohigh}
-\FpEval {(1.2+3.4)*(5.6-7.8)/9}
+\fpEval {(1.2+3.4)*(5.6-7.8)/9}
\end{demohigh}
\end{function}
-\begin{function}{\FpMathAdd}
+\begin{function}{\fpMathAdd}
\begin{syntax}
-\cs{FpMathAdd} \Arg{fpexpr_1} \Arg{fpexpr_2}
+\cs{fpMathAdd} \Arg{fpexpr_1} \Arg{fpexpr_2}
\end{syntax}
Adds \Arg{fpexpr_1} and \Arg{fpexpr_2},
and returns the result. For example
\begin{demohigh}
-\FpMathAdd {2.8} {3.7}
-\FpMathAdd {3.8-1} {2.7+1}
+\fpMathAdd {2.8} {3.7}
+\fpMathAdd {3.8-1} {2.7+1}
\end{demohigh}
\end{function}
-\begin{function}{\FpMathSub}
+\begin{function}{\fpMathSub}
\begin{syntax}
-\cs{FpMathSub} \Arg{fpexpr_1} \Arg{fpexpr_2}
+\cs{fpMathSub} \Arg{fpexpr_1} \Arg{fpexpr_2}
\end{syntax}
Subtracts \Arg{fpexpr_2} from \Arg{fpexpr_1},
and returns the result. For example
\begin{demohigh}
-\FpMathSub {2.8} {3.7}
-\FpMathSub {3.8-1} {2.7+1}
+\fpMathSub {2.8} {3.7}
+\fpMathSub {3.8-1} {2.7+1}
\end{demohigh}
\end{function}
-\begin{function}{\FpMathMult}
+\begin{function}{\fpMathMult}
\begin{syntax}
-\cs{FpMathMult} \Arg{fpexpr_1} \Arg{fpexpr_2}
+\cs{fpMathMult} \Arg{fpexpr_1} \Arg{fpexpr_2}
\end{syntax}
Multiplies \Arg{fpexpr_1} by \Arg{fpexpr_2},
and returns the result. For example
\begin{demohigh}
-\FpMathMult {2.8} {3.7}
-\FpMathMult {3.8-1} {2.7+1}
+\fpMathMult {2.8} {3.7}
+\fpMathMult {3.8-1} {2.7+1}
\end{demohigh}
\end{function}
-\begin{function}{\FpMathDiv}
+\begin{function}{\fpMathDiv}
\begin{syntax}
-\cs{FpMathDiv} \Arg{fpexpr_1} \Arg{fpexpr_2}
+\cs{fpMathDiv} \Arg{fpexpr_1} \Arg{fpexpr_2}
\end{syntax}
Divides \Arg{fpexpr_1} by \Arg{fpexpr_2},
and returns the result. For example
\begin{demohigh}
-\FpMathDiv {2.8} {3.7}
-\FpMathDiv {3.8-1} {2.7+1}
+\fpMathDiv {2.8} {3.7}
+\fpMathDiv {3.8-1} {2.7+1}
\end{demohigh}
\end{function}
-\begin{function}{\FpMathSign}
+\begin{function}{\fpMathSign}
\begin{syntax}
-\cs{FpMathSign} \Arg{fpexpr}
+\cs{fpMathSign} \Arg{fpexpr}
\end{syntax}
Evaluates the \meta{fpexpr} and returns the value
-using \cs{FpEval}\verb|{sign(|\meta{result}\verb|)}|: $+1$ for positive
+using \cs{fpEval}\verb|{sign(|\meta{result}\verb|)}|: $+1$ for positive
numbers and for $+\infty$, $-1$ for negative numbers and for
$-\infty$, $\pm 0$ for $\pm 0$. If the operand is a tuple or is
\nan{}, then \enquote{invalid operation} occurs and the result
is $0$. For example
\begin{demohigh}
-\FpMathSign {3.5}
-\FpMathSign {-2.7}
+\fpMathSign {3.5}
+\fpMathSign {-2.7}
\end{demohigh}
\end{function}
-\begin{function}{\FpMathAbs}
+\begin{function}{\fpMathAbs}
\begin{syntax}
-\cs{FpMathAbs} \Arg{floating point expression}
+\cs{fpMathAbs} \Arg{floating point expression}
\end{syntax}
Evaluates the \meta{floating point expression} as described for
-\cs{FpEval} and returns the absolute value.
+\cs{fpEval} and returns the absolute value.
If the argument is $\pm\infty$, \nan{} or a tuple,
\enquote{invalid operation} occurs. Within floating point
expressions, \verb|abs()| can be used; it accepts $\pm\infty$ and \nan{}
as arguments.
\end{function}
-\begin{function}{\FpMathMax,\FpMathMin}
+\begin{function}{\fpMathMax,\fpMathMin}
\begin{syntax}
-\cs{FpMathMax} \Arg{fp expression_1} \Arg{fp expression_2}
-\cs{FpMathMin} \Arg{fp expression_1} \Arg{fp expression_2}
+\cs{fpMathMax} \Arg{fp expression_1} \Arg{fp expression_2}
+\cs{fpMathMin} \Arg{fp expression_1} \Arg{fp expression_2}
\end{syntax}
-Evaluates the \meta{floating point expressions} as described for \cs{FpEval}
+Evaluates the \meta{floating point expressions} as described for \cs{fpEval}
and returns the resulting larger (\texttt{max}) or smaller (\texttt{min}) value.
If the argument is a tuple, \enquote{invalid operation} occurs,
but no other case raises exceptions. Within floating point expressions,
@@ -3927,32 +3927,32 @@ but no other case raises exceptions. Within floating point expressions,
\section{Creating and Using Floating Points}
-\begin{function}{\FpNew}
+\begin{function}{\fpNew}
\begin{syntax}
-\cs{FpNew} \meta{fp var}
+\cs{fpNew} \meta{fp var}
\end{syntax}
Creates a new \meta{fp var} or raises an error if the name is
already taken. The declaration is global. The \meta{fp~var} is
initially $+0$.
\end{function}
-\begin{function}{\FpConst}
+\begin{function}{\fpConst}
\begin{syntax}
-\cs{FpConst} \meta{fp var} \Arg{floating point expression}
+\cs{fpConst} \meta{fp var} \Arg{floating point expression}
\end{syntax}
Creates a new constant \meta{fp var} or raises an error if the name
is already taken. The \meta{fp var} is set globally equal to
the result of evaluating the \meta{floating point expression}.
For example
\begin{demohigh}
-\FpConst \cMyPiFp {3.1415926}
-\FpUse \cMyPiFp
+\fpConst \cMyPiFp {3.1415926}
+\fpUse \cMyPiFp
\end{demohigh}
\end{function}
-\begin{function}{\FpUse}
+\begin{function}{\fpUse}
\begin{syntax}
-\cs{FpUse} \meta{fp var}
+\cs{fpUse} \meta{fp var}
\end{syntax}
Recovers the value of the \meta{fp var} and returns the value as a
decimal number with no exponent.
@@ -3968,114 +3968,114 @@ decimal number with no exponent.
\section{Viewing Floating Points}
-\begin{function}{\FpLog}
+\begin{function}{\fpLog}
\begin{syntax}
-\cs{FpLog} \Arg{floating point expression}
+\cs{fpLog} \Arg{floating point expression}
\end{syntax}
Evaluates the \meta{floating point expression} and writes the
result in the log file.
\end{function}
-\begin{function}{\FpVarLog}
+\begin{function}{\fpVarLog}
\begin{syntax}
-\cs{FpVarLog} \meta{fp var}
+\cs{fpVarLog} \meta{fp var}
\end{syntax}
Writes the value of \meta{fp var} in the log file.
\end{function}
-\begin{function}{\FpShow}
+\begin{function}{\fpShow}
\begin{syntax}
-\cs{FpShow} \Arg{floating point expression}
+\cs{fpShow} \Arg{floating point expression}
\end{syntax}
Evaluates the \meta{floating point expression} and displays the
result in the terminal.
\end{function}
-\begin{function}{\FpVarShow}
+\begin{function}{\fpVarShow}
\begin{syntax}
-\cs{FpVarShow} \meta{fp var}
+\cs{fpVarShow} \meta{fp var}
\end{syntax}
Displays the value of \meta{fp var} in the terminal.
\end{function}
\section{Setting Floating Point Variables}
-\begin{function}{\FpSet}
+\begin{function}{\fpSet}
\begin{syntax}
-\cs{FpSet} \meta{fp var} \Arg{floating point expression}
+\cs{fpSet} \meta{fp var} \Arg{floating point expression}
\end{syntax}
Sets \meta{fp var} equal to the result of computing the
\meta{floating point expression}. For example
\begin{demohigh}
-\FpSet \lTmpaFp {4/7}
-\FpUse \lTmpaFp
+\fpSet \lTmpaFp {4/7}
+\fpUse \lTmpaFp
\end{demohigh}
\end{function}
-\begin{function}{\FpSetEq}
+\begin{function}{\fpSetEq}
\begin{syntax}
-\cs{FpSetEq} \meta{fp var_1} \meta{fp var_2}
+\cs{fpSetEq} \meta{fp var_1} \meta{fp var_2}
\end{syntax}
Sets the floating point variable \meta{fp var_1} equal to the current
value of \meta{fp var_2}.
\end{function}
-\begin{function}{\FpZero}
+\begin{function}{\fpZero}
\begin{syntax}
-\cs{FpZero} \meta{fp var}
+\cs{fpZero} \meta{fp var}
\end{syntax}
Sets the \meta{fp var} to $+0$. For example
\begin{demohigh}
-\FpSet \lTmpaFp {5.3}
-\FpZero \lTmpaFp
-\FpUse \lTmpaFp
+\fpSet \lTmpaFp {5.3}
+\fpZero \lTmpaFp
+\fpUse \lTmpaFp
\end{demohigh}
\end{function}
-\begin{function}{\FpZeroNew}
+\begin{function}{\fpZeroNew}
\begin{syntax}
-\cs{FpZeroNew} \meta{fp var}
+\cs{fpZeroNew} \meta{fp var}
\end{syntax}
Ensures that the \meta{fp var} exists globally
-by applying \cs{FpNew} if necessary, then applies
-\cs{FpZero} to leave the \meta{fp var} set to $+0$.
+by applying \cs{fpNew} if necessary, then applies
+\cs{fpZero} to leave the \meta{fp var} set to $+0$.
\end{function}
-\begin{function}{\FpAdd}
+\begin{function}{\fpAdd}
\begin{syntax}
-\cs{FpAdd} \meta{fp var} \Arg{floating point expression}
+\cs{fpAdd} \meta{fp var} \Arg{floating point expression}
\end{syntax}
Adds the result of computing the \meta{floating point expression} to
the \meta{fp var}.
This also applies if \meta{fp var} and \meta{floating point
expression} evaluate to tuples of the same size. For example
\begin{demohigh}
-\FpSet \lTmpaFp {5.3}
-\FpAdd \lTmpaFp {2.11}
-\FpUse \lTmpaFp
+\fpSet \lTmpaFp {5.3}
+\fpAdd \lTmpaFp {2.11}
+\fpUse \lTmpaFp
\end{demohigh}
\end{function}
-\begin{function}{\FpSub}
+\begin{function}{\fpSub}
\begin{syntax}
-\cs{FpSub} \meta{fp var} \Arg{floating point expression}
+\cs{fpSub} \meta{fp var} \Arg{floating point expression}
\end{syntax}
Subtracts the result of computing the \meta{floating point
expression} from the \meta{fp var}.
This also applies if \meta{fp var} and \meta{floating point
expression} evaluate to tuples of the same size. For example
\begin{demohigh}
-\FpSet \lTmpaFp {5.3}
-\FpSub \lTmpaFp {2.11}
-\FpUse \lTmpaFp
+\fpSet \lTmpaFp {5.3}
+\fpSub \lTmpaFp {2.11}
+\fpUse \lTmpaFp
\end{demohigh}
\end{function}
\section{Floating Point Step Functions}
-%\begin{function}{\FpStepFunction}
+%\begin{function}{\fpStepFunction}
%\begin{syntax}
-%\cs{FpStepFunction} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
+%\cs{fpStepFunction} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
%\end{syntax}
%This function first evaluates the \meta{initial value}, \meta{step}
%and \meta{final value}, each of which should be a floating point
@@ -4108,9 +4108,9 @@ expression} evaluate to tuples of the same size. For example
%\end{texnote}
%\end{function}
-\begin{function}{\FpStepInline}
+\begin{function}{\fpStepInline}
\begin{syntax}
-\cs{FpStepInline} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
+\cs{fpStepInline} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value}, \meta{step}
and \meta{final value}, all of which should be floating point
@@ -4122,18 +4122,18 @@ with \verb|#1| replaced by the current \meta{value}. Thus the
\meta{code} should define a function of one argument (\verb|#1|).
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\FpStepInline {1} {0.1} {1.5} {
- \TlPutRight \lTmpaTl {[#1]}
+\tlClear \lTmpaTl
+\fpStepInline {1} {0.1} {1.5} {
+ \tlPutRight \lTmpaTl {[#1]}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\FpStepVariable}
+\begin{function}{\fpStepVariable}
\begin{syntax}
-\cs{FpStepVariable} \Arg{initial value} \Arg{step} \Arg{final value} \meta{tl var} \Arg{code}
+\cs{fpStepVariable} \Arg{initial value} \Arg{step} \Arg{final value} \meta{tl var} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value}, \meta{step}
and \meta{final value}, all of which should be floating point
@@ -4146,46 +4146,46 @@ the \meta{code} should make use of the \meta{tl var}.
%For example
%\begin{demohigh}
%\IgnoreSpacesOn
-%\TlClear\lTmpaTl
-%\FpStepVariable{1}{0.1}{1.5}\lTmpiTl{
-% \TlPutRight\lTmpaTl{\Value\lTmpiTl}
-% \TlPutRight\lTmpaTl{~}
+%\tlClear\lTmpaTl
+%\fpStepVariable{1}{0.1}{1.5}\lTmpiTl{
+% \tlPutRight\lTmpaTl{\expValue\lTmpiTl}
+% \tlPutRight\lTmpaTl{~}
%}
-%\Return{\Value\lTmpaTl}
+%\prgReturn{\expValue\lTmpaTl}
%\IgnoreSpacesOff
%\end{demohigh}
\end{function}
\section{Float Point Conditionals}
-\begin{function}{\FpIfExist,\FpIfExistT,\FpIfExistF,\FpIfExistTF}
+\begin{function}{\fpIfExist,\fpIfExistT,\fpIfExistF,\fpIfExistTF}
\begin{syntax}
-\cs{FpIfExist} \meta{fp var}
-\cs{FpIfExistT} \meta{fp var} \Arg{true code}
-\cs{FpIfExistF} \meta{fp var} \Arg{false code}
-\cs{FpIfExistTF} \meta{fp var} \Arg{true code} \Arg{false code}
+\cs{fpIfExist} \meta{fp var}
+\cs{fpIfExistT} \meta{fp var} \Arg{true code}
+\cs{fpIfExistF} \meta{fp var} \Arg{false code}
+\cs{fpIfExistTF} \meta{fp var} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{fp var} is currently defined. This does not
check that the \meta{fp var} really is a floating point variable.
For example
\begin{demohigh}
-\FpIfExistTF \lTmpaFp {\Return{Yes}} {\Return{No}}
-\FpIfExistTF \lMyUndefinedFp {\Return{Yes}} {\Return{No}}
+\fpIfExistTF \lTmpaFp {\prgReturn{Yes}} {\prgReturn{No}}
+\fpIfExistTF \lMyUndefinedFp {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\FpCompare,\FpCompareT,\FpCompareF,\FpCompareTF}
+\begin{function}{\fpCompare,\fpCompareT,\fpCompareF,\fpCompareTF}
\begin{syntax}
-\cs{FpCompare} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2}
-\cs{FpCompareT} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{true code}
-\cs{FpCompareF} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{false code}
-\cs{FpCompareTF} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{true code} \Arg{false code}
+\cs{fpCompare} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2}
+\cs{fpCompareT} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{true code}
+\cs{fpCompareF} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{false code}
+\cs{fpCompareTF} \Arg{fpexpr_1} \meta{relation} \Arg{fpexpr_2} \Arg{true code} \Arg{false code}
\end{syntax}
Compares the \meta{fpexpr_1} and the \meta{fpexpr_2}, and returns
\texttt{true} if the \meta{relation} is obeyed. For example
\begin{demohigh}
-\FpCompareTF {1} > {0.9999} {\Return{Greater}} {\Return{Less}}
-\FpCompareTF {1} > {1.0001} {\Return{Greater}} {\Return{Less}}
+\fpCompareTF {1} > {0.9999} {\prgReturn{Greater}} {\prgReturn{Less}}
+\fpCompareTF {1} > {1.0001} {\prgReturn{Greater}} {\prgReturn{Less}}
\end{demohigh}
Two floating points
$x$ and $y$ may obey four mutually exclusive relations:
@@ -4196,7 +4196,7 @@ any value, even another \nan{}, hence $x=x$ is not true for
a \nan{}. To test if a value is \nan{}, compare it to an arbitrary
number with the \enquote{not ordered} relation.\par
%\begin{demohigh}
-%\FpCompareTF{0/0}?{0}{\Return{Is~a~Nan}}{\Return{Isn't~a~NaN}}
+%\fpCompareTF{0/0}?{0}{\prgReturn{Is~a~Nan}}{\prgReturn{Isn't~a~NaN}}
%\end{demohigh}
Tuples are equal if they have the same number of items and items
compare equal (in particular there must be no \nan{}).
@@ -4234,13 +4234,13 @@ code and so should only be used for short-term storage.
\section{Dimension Expressions}
-\begin{function}{\DimEval}
+\begin{function}{\dimEval}
\begin{syntax}
-\cs{DimEval} \Arg{dimension expression}
+\cs{dimEval} \Arg{dimension expression}
\end{syntax}
Evaluates the \meta{dimension expression}, expanding any
dimensions and token list variables within the \meta{expression}
-to their content (without requiring \cs{DimUse}/\cs{TlUse})
+to their content (without requiring \cs{dimUse}/\cs{tlUse})
and applying the standard mathematical rules. The result of the
calculation is returned as a \meta{dimension denotation}.
%This is expressed in points (\texttt{pt}), and requires suitable
@@ -4248,38 +4248,38 @@ calculation is returned as a \meta{dimension denotation}.
%an \meta{internal dimension}.
For example
\begin{demohigh}
-\DimEval {(1.2pt+3.4pt)/9}
+\dimEval {(1.2pt+3.4pt)/9}
\end{demohigh}
-%\DimEval{(1.2pt+3.4pt)*(5.6-7.8)/9}
+%\dimEval{(1.2pt+3.4pt)*(5.6-7.8)/9}
\end{function}
-\begin{function}{\DimMathAdd}
+\begin{function}{\dimMathAdd}
\begin{syntax}
-\cs{DimMathAdd} \Arg{dimexpr_1} \Arg{dimexpr_2}
+\cs{dimMathAdd} \Arg{dimexpr_1} \Arg{dimexpr_2}
\end{syntax}
Adds \Arg{dimexpr_1} and \Arg{dimexpr_2},
and returns the result. For example
\begin{demohigh}
-\DimMathAdd {2.8pt} {3.7pt}
-\DimMathAdd {3.8pt-1pt} {2.7pt+1pt}
+\dimMathAdd {2.8pt} {3.7pt}
+\dimMathAdd {3.8pt-1pt} {2.7pt+1pt}
\end{demohigh}
\end{function}
-\begin{function}{\DimMathSub}
+\begin{function}{\dimMathSub}
\begin{syntax}
-\cs{DimMathSub} \Arg{dimexpr_1} \Arg{dimexpr_2}
+\cs{dimMathSub} \Arg{dimexpr_1} \Arg{dimexpr_2}
\end{syntax}
Subtracts \Arg{dimexpr_2} from \Arg{dimexpr_1},
and returns the result. For example
\begin{demohigh}
-\DimMathSub {2.8pt} {3.7pt}
-\DimMathSub {3.8pt-1pt} {2.7pt+1pt}
+\dimMathSub {2.8pt} {3.7pt}
+\dimMathSub {3.8pt-1pt} {2.7pt+1pt}
\end{demohigh}
\end{function}
-\begin{function}{\DimMathRatio}
+\begin{function}{\dimMathRatio}
\begin{syntax}
-\cs{DimMathRatio} \Arg{dimexpr_1} \Arg{dimexpr_2}
+\cs{dimMathRatio} \Arg{dimexpr_1} \Arg{dimexpr_2}
\end{syntax}
Parses the two \meta{dimension expressions},
then calculates the ratio of the two and returns it.
@@ -4287,81 +4287,81 @@ The result is a ratio expression
between two integers, with all distances converted to scaled points.
For example
\begin{demohigh}
-\DimMathRatio {5pt} {10pt}
+\dimMathRatio {5pt} {10pt}
\end{demohigh}
The returned value is suitable for use inside a \meta{dimension expression}
such as
\begin{codehigh}
-\DimSet \lTmpaDim {10pt*\DimMathRatio{5pt}{10pt}}
+\dimSet \lTmpaDim {10pt*\dimMathRatio{5pt}{10pt}}
\end{codehigh}
\end{function}
-\begin{function}{\DimMathSign}
+\begin{function}{\dimMathSign}
\begin{syntax}
-\cs{DimMathSign} \Arg{dimexpr}
+\cs{dimMathSign} \Arg{dimexpr}
\end{syntax}
Evaluates the \meta{dimexpr} then returns $1$ or $0$ or $-1$
according to the sign of the result. For example
\begin{demohigh}
-\DimMathSign {3.5pt}
-\DimMathSign {-2.7pt}
+\dimMathSign {3.5pt}
+\dimMathSign {-2.7pt}
\end{demohigh}
\end{function}
-\begin{function}{\DimMathAbs}
+\begin{function}{\dimMathAbs}
\begin{syntax}
-\cs{DimMathAbs} \Arg{dimexpr}
+\cs{dimMathAbs} \Arg{dimexpr}
\end{syntax}
Converts the \meta{dimexpr} to its absolute value,
returning the result as a \meta{dimension denotation}.
For example
\begin{demohigh}
-\DimMathAbs {3.5pt}
-\DimMathAbs {-2.7pt}
+\dimMathAbs {3.5pt}
+\dimMathAbs {-2.7pt}
\end{demohigh}
\end{function}
-\begin{function}{\DimMathMax,\DimMathMin}
+\begin{function}{\dimMathMax,\dimMathMin}
\begin{syntax}
-\cs{DimMathMax} \Arg{dimexpr_1} \Arg{dimexpr_2}
-\cs{DimMathMin} \Arg{dimexpr_1} \Arg{dimexpr_2}
+\cs{dimMathMax} \Arg{dimexpr_1} \Arg{dimexpr_2}
+\cs{dimMathMin} \Arg{dimexpr_1} \Arg{dimexpr_2}
\end{syntax}
Evaluates the two \meta{dimension expressions} and returns either the
maximum or minimum value as appropriate as a \meta{dimension denotation}.
For example
\begin{demohigh}
-\DimMathMax {3.5pt} {-2.7pt}
-\DimMathMin {3.5pt} {-2.7pt}
+\dimMathMax {3.5pt} {-2.7pt}
+\dimMathMin {3.5pt} {-2.7pt}
\end{demohigh}
\end{function}
\section{Creating and Using Dimensions}
-\begin{function}{\DimNew}
+\begin{function}{\dimNew}
\begin{syntax}
-\cs{DimNew} \meta{dimension}
+\cs{dimNew} \meta{dimension}
\end{syntax}
Creates a new \meta{dimension} or raises an error if the name is
already taken. The declaration is global. The \meta{dimension}
is initially equal to $0$\,pt.
\end{function}
-\begin{function}{\DimConst}
+\begin{function}{\dimConst}
\begin{syntax}
-\cs{DimConst} \meta{dimension} \Arg{dimension expression}
+\cs{dimConst} \meta{dimension} \Arg{dimension expression}
\end{syntax}
Creates a new constant \meta{dimension} or raises an error if the
name is already taken. The value of the \meta{dimension} is set
globally to the \meta{dimension expression}. For example
\begin{demohigh}
-\DimConst \cFooSomeDim {1cm}
-\DimUse \cFooSomeDim
+\dimConst \cFooSomeDim {1cm}
+\dimUse \cFooSomeDim
\end{demohigh}
\end{function}
-\begin{function}{\DimUse}
+\begin{function}{\dimUse}
\begin{syntax}
-\cs{DimUse} \meta{dimension}
+\cs{dimUse} \meta{dimension}
\end{syntax}
Recovers the content of a \meta{dimension} and returns the value.
An error is raised if the variable does not exist or if it is invalid.
@@ -4369,127 +4369,127 @@ An error is raised if the variable does not exist or if it is invalid.
\section{Viewing Dimensions}
-\begin{function}{\DimLog}
+\begin{function}{\dimLog}
\begin{syntax}
-\cs{DimLog} \Arg{dimension expression}
+\cs{dimLog} \Arg{dimension expression}
\end{syntax}
Writes the result of evaluating the \meta{dimension expression}
in the log file. For example
\begin{codehigh}
-\DimLog {\lFooSomeDim+1cm}
+\dimLog {\lFooSomeDim+1cm}
\end{codehigh}
\end{function}
-\begin{function}{\DimVarLog}
+\begin{function}{\dimVarLog}
\begin{syntax}
-\cs{DimVarLog} \meta{dimension}
+\cs{dimVarLog} \meta{dimension}
\end{syntax}
Writes the value of the \meta{dimension} in the log file. For example
\begin{codehigh}
-\DimVarLog \lFooSomeDim
+\dimVarLog \lFooSomeDim
\end{codehigh}
\end{function}
-\begin{function}{\DimShow}
+\begin{function}{\dimShow}
\begin{syntax}
-\cs{DimShow} \Arg{dimension expression}
+\cs{dimShow} \Arg{dimension expression}
\end{syntax}
Displays the result of evaluating the \meta{dimension expression}
on the terminal. For example
\begin{codehigh}
-\DimShow {\lFooSomeDim+1cm}
+\dimShow {\lFooSomeDim+1cm}
\end{codehigh}
\end{function}
-\begin{function}{\DimVarShow}
+\begin{function}{\dimVarShow}
\begin{syntax}
-\cs{DimVarShow} \meta{dimension}
+\cs{dimVarShow} \meta{dimension}
\end{syntax}
Displays the value of the \meta{dimension} on the terminal. For example
\begin{codehigh}
-\DimVarShow \lFooSomeDim
+\dimVarShow \lFooSomeDim
\end{codehigh}
\end{function}
\section{Setting Dimension Variables}
-\begin{function}{\DimSet}
+\begin{function}{\dimSet}
\begin{syntax}
-\cs{DimSet} \meta{dimension} \Arg{dimension expression}
+\cs{dimSet} \meta{dimension} \Arg{dimension expression}
\end{syntax}
Sets \meta{dimension} to the value of \meta{dimension expression}, which
must evaluate to a length with units.
\end{function}
-\begin{function}{\DimSetEq}
+\begin{function}{\dimSetEq}
\begin{syntax}
-\cs{DimSetEq} \meta{dimension_1} \meta{dimension_2}
+\cs{dimSetEq} \meta{dimension_1} \meta{dimension_2}
\end{syntax}
Sets the content of \meta{dimension_1} equal to that of
\meta{dimension_2}. For example
\begin{demohigh}
-\DimSet \lTmpaDim {10pt}
-\DimSetEq \lTmpbDim \lTmpaDim
-\DimUse \lTmpbDim
+\dimSet \lTmpaDim {10pt}
+\dimSetEq \lTmpbDim \lTmpaDim
+\dimUse \lTmpbDim
\end{demohigh}
\end{function}
-\begin{function}{\DimZero}
+\begin{function}{\dimZero}
\begin{syntax}
-\cs{DimZero} \meta{dimension}
+\cs{dimZero} \meta{dimension}
\end{syntax}
Sets \meta{dimension} to $0$\,pt. For example
\begin{demohigh}
-\DimSet \lTmpaDim {1em}
-\DimZero \lTmpaDim
-\DimUse \lTmpaDim
+\dimSet \lTmpaDim {1em}
+\dimZero \lTmpaDim
+\dimUse \lTmpaDim
\end{demohigh}
\end{function}
-\begin{function}{\DimZeroNew}
+\begin{function}{\dimZeroNew}
\begin{syntax}
-\cs{DimZeroNew} \meta{dimension}
+\cs{dimZeroNew} \meta{dimension}
\end{syntax}
Ensures that the \meta{dimension} exists globally by applying
-\cs{DimNew} if necessary, then applies
-\cs{DimZero} to set the \meta{dimension} to zero. For example
+\cs{dimNew} if necessary, then applies
+\cs{dimZero} to set the \meta{dimension} to zero. For example
\begin{demohigh}
-\DimZeroNew \lFooSomeDim
-\DimUse \lFooSomeDim
+\dimZeroNew \lFooSomeDim
+\dimUse \lFooSomeDim
\end{demohigh}
\end{function}
-\begin{function}{\DimAdd}
+\begin{function}{\dimAdd}
\begin{syntax}
-\cs{DimAdd} \meta{dimension} \Arg{dimension expression}
+\cs{dimAdd} \meta{dimension} \Arg{dimension expression}
\end{syntax}
Adds the result of the \meta{dimension expression} to the current
content of the \meta{dimension}. For example
\begin{demohigh}
-\DimSet \lTmpaDim {5.3pt}
-\DimAdd \lTmpaDim {2.11pt}
-\DimUse \lTmpaDim
+\dimSet \lTmpaDim {5.3pt}
+\dimAdd \lTmpaDim {2.11pt}
+\dimUse \lTmpaDim
\end{demohigh}
\end{function}
-\begin{function}{\DimSub}
+\begin{function}{\dimSub}
\begin{syntax}
-\cs{DimSub} \meta{dimension} \Arg{dimension expression}
+\cs{dimSub} \meta{dimension} \Arg{dimension expression}
\end{syntax}
Subtracts the result of the \meta{dimension expression} from the
current content of the \meta{dimension}. For example
\begin{demohigh}
-\DimSet \lTmpaDim {5.3pt}
-\DimSub \lTmpaDim {2.11pt}
-\DimUse \lTmpaDim
+\dimSet \lTmpaDim {5.3pt}
+\dimSub \lTmpaDim {2.11pt}
+\dimUse \lTmpaDim
\end{demohigh}
\end{function}
\section{Dimension Step Functions}
-%\begin{function}{\DimStepFunction}
+%\begin{function}{\dimStepFunction}
%\begin{syntax}
-%\cs{DimStepFunction} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
+%\cs{dimStepFunction} \Arg{initial value} \Arg{step} \Arg{final value} \meta{function}
%\end{syntax}
%This function first evaluates the \meta{initial value}, \meta{step}
%and \meta{final value}, all of which should be dimension expressions.
@@ -4503,9 +4503,9 @@ current content of the \meta{dimension}. For example
%should absorb one argument.
%\end{function}
-\begin{function}{\DimStepInline}
+\begin{function}{\dimStepInline}
\begin{syntax}
-\cs{DimStepInline} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
+\cs{dimStepInline} \Arg{initial value} \Arg{step} \Arg{final value} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value}, \meta{step}
and \meta{final value}, all of which should be dimension expressions.
@@ -4516,18 +4516,18 @@ with \verb|#1| replaced by the current \meta{value}. Thus the
\meta{code} should define a function of one argument (\verb|#1|).
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\DimStepInline {1pt} {0.1pt} {1.5pt} {
- \TlPutRight \lTmpaTl {[#1]}
+\tlClear \lTmpaTl
+\dimStepInline {1pt} {0.1pt} {1.5pt} {
+ \tlPutRight \lTmpaTl {[#1]}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\DimStepVariable}
+\begin{function}{\dimStepVariable}
\begin{syntax}
-\cs{DimStepVariable} \Arg{initial value} \Arg{step} \Arg{final value} \meta{tl var} \Arg{code}
+\cs{dimStepVariable} \Arg{initial value} \Arg{step} \Arg{final value} \meta{tl var} \Arg{code}
\end{syntax}
This function first evaluates the \meta{initial value}, \meta{step}
and \meta{final value}, all of which should be dimension expressions.
@@ -4539,43 +4539,43 @@ the \meta{code} should make use of the \meta{tl var}.
%For example
%\begin{demohigh}
%\IgnoreSpacesOn
-%\TlClear\lTmpaTl
-%\DimStepVariable{1pt}{0.1pt}{1.5pt}\lTmpiTl{
-% \TlPutRight\lTmpaTl{\Value\lTmpiTl}
-% \TlPutRight\lTmpaTl{~}
+%\tlClear\lTmpaTl
+%\dimStepVariable{1pt}{0.1pt}{1.5pt}\lTmpiTl{
+% \tlPutRight\lTmpaTl{\expValue\lTmpiTl}
+% \tlPutRight\lTmpaTl{~}
%}
-%\Return{\Value\lTmpaTl}
+%\prgReturn{\expValue\lTmpaTl}
%\IgnoreSpacesOff
%\end{demohigh}
\end{function}
\section{Dimension Conditionals}
-\begin{function}{\DimIfExist,\DimIfExistT,\DimIfExistF,\DimIfExistTF}
+\begin{function}{\dimIfExist,\dimIfExistT,\dimIfExistF,\dimIfExistTF}
\begin{syntax}
-\cs{DimIfExist} \meta{dimension}
-\cs{DimIfExistT} \meta{dimension} \Arg{true code}
-\cs{DimIfExistF} \meta{dimension} \Arg{false code}
-\cs{DimIfExistTF} \meta{dimension} \Arg{true code} \Arg{false code}
+\cs{dimIfExist} \meta{dimension}
+\cs{dimIfExistT} \meta{dimension} \Arg{true code}
+\cs{dimIfExistF} \meta{dimension} \Arg{false code}
+\cs{dimIfExistTF} \meta{dimension} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{dimension} is currently defined. This does
not check that the \meta{dimension} really is a dimension variable.
For example
\begin{demohigh}
-\DimIfExistTF \lTmpaDim {\Return{Yes}} {\Return{No}}
-\DimIfExistTF \lFooUndefinedDim {\Return{Yes}} {\Return{No}}
+\dimIfExistTF \lTmpaDim {\prgReturn{Yes}} {\prgReturn{No}}
+\dimIfExistTF \lFooUndefinedDim {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\DimCompare,\DimCompareT,\DimCompareF,\DimCompareTF}
+\begin{function}{\dimCompare,\dimCompareT,\dimCompareF,\dimCompareTF}
\begin{syntax}
-\cs{DimCompare} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2}
-\cs{DimCompareT} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2} \Arg{true code}
-\cs{DimCompareF} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2} \Arg{false code}
-\cs{DimCompareTF} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2} \Arg{true code} \Arg{false code}
+\cs{dimCompare} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2}
+\cs{dimCompareT} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2} \Arg{true code}
+\cs{dimCompareF} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2} \Arg{false code}
+\cs{dimCompareTF} \Arg{dimexpr_1} \meta{relation} \Arg{dimexpr_2} \Arg{true code} \Arg{false code}
\end{syntax}
This function first evaluates each of the \meta{dimension expressions}
-as described for \cs{DimEval}. The two results are then
+as described for \cs{dimEval}. The two results are then
compared using the \meta{relation}:\par
{\centering
\begin{tabular}{ll}
@@ -4585,16 +4585,16 @@ Less than & \verb|<| \\
\end{tabular}\par}
For example
\begin{demohigh}
-\DimCompareTF {1pt} > {0.9999pt} {\Return{Greater}} {\Return{Less}}
-\DimCompareTF {1pt} > {1.0001pt} {\Return{Greater}} {\Return{Less}}
+\dimCompareTF {1pt} > {0.9999pt} {\prgReturn{Greater}} {\prgReturn{Less}}
+\dimCompareTF {1pt} > {1.0001pt} {\prgReturn{Greater}} {\prgReturn{Less}}
\end{demohigh}
\end{function}
\section{Dimension Case Functions}
-\begin{function}{\DimCase}
+\begin{function}{\dimCase}
\begin{syntax}
-\cs{DimCase} \Arg{test dimension expression}
+\cs{dimCase} \Arg{test dimension expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{dimexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{dimexpr case_2} \Arg{code case_2}
@@ -4609,9 +4609,9 @@ associated \meta{code} is left in the input stream
and other cases are discarded.
\end{function}
-\begin{function}{\DimCaseT}
+\begin{function}{\dimCaseT}
\begin{syntax}
-\cs{DimCaseT} \Arg{test dimension expression}
+\cs{dimCaseT} \Arg{test dimension expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{dimexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{dimexpr case_2} \Arg{code case_2}
@@ -4629,9 +4629,9 @@ cases are matched, the \meta{true code} is also inserted into the
input stream (after the code for the appropriate case).
\end{function}
-\begin{function}{\DimCaseF}
+\begin{function}{\dimCaseF}
\begin{syntax}
-\cs{DimCaseF} \Arg{test dimension expression}
+\cs{dimCaseF} \Arg{test dimension expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{dimexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{dimexpr case_2} \Arg{code case_2}
@@ -4649,21 +4649,21 @@ match then the \meta{false code} is inserted.
For example
\begin{demohigh}
\IgnoreSpacesOn
-\DimSet \lTmpaDim {5pt}
-\DimCaseF {2\lTmpaDim} {
- {5pt} {\Return{Small}}
- {4pt+6pt} {\Return{Medium}}
- {-10pt} {\Return{Negative}}
+\dimSet \lTmpaDim {5pt}
+\dimCaseF {2\lTmpaDim} {
+ {5pt} {\prgReturn{Small}}
+ {4pt+6pt} {\prgReturn{Medium}}
+ {-10pt} {\prgReturn{Negative}}
}{
- \Return {No Match}
+ \prgReturn {No Match}
}
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\DimCaseTF}
+\begin{function}{\dimCaseTF}
\begin{syntax}
-\cs{DimCaseTF} \Arg{test dimension expression}
+\cs{dimCaseTF} \Arg{test dimension expression}
~ ~ \verb|{|
~ ~ ~ ~ \Arg{dimexpr case_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{dimexpr case_2} \Arg{code case_2}
@@ -4684,15 +4684,15 @@ match then the \meta{false code} is inserted.
%For example
%\begin{demohigh}
%\IgnoreSpacesOn
-%\DimSet\lTmpaDim{5pt}
-%\DimCaseTF{2\lTmpaDim}{
-% {5pt} {\Return{Small}}
-% {4pt+6pt} {\Return{Medium}}
-% {-10pt} {\Return{Negative}}
+%\dimSet\lTmpaDim{5pt}
+%\dimCaseTF{2\lTmpaDim}{
+% {5pt} {\prgReturn{Small}}
+% {4pt+6pt} {\prgReturn{Medium}}
+% {-10pt} {\prgReturn{Negative}}
%}{
-% \Return{[Some Match]}
+% \prgReturn{[Some Match]}
%}{
-% \Return{[No Match]}
+% \prgReturn{[No Match]}
%}
%\IgnoreSpacesOff
%\end{demohigh}
@@ -4722,34 +4722,34 @@ code and so should only be used for short-term storage.
\section{Creating and Using Comma Lists}
-\begin{function}{\ClistNew}
+\begin{function}{\clistNew}
\begin{syntax}
-\cs{ClistNew} \meta{comma list}
+\cs{clistNew} \meta{comma list}
\end{syntax}
Creates a new \meta{comma list} or raises an error if the name is
already taken. The declaration is global. The \meta{comma list}
initially contains no items.
\begin{codehigh}
-\ClistNew \lFooSomeClist
+\clistNew \lFooSomeClist
\end{codehigh}
\end{function}
-\begin{function}{\ClistConst}
+\begin{function}{\clistConst}
\begin{syntax}
-\cs{ClistConst} \meta{clist var} \Arg{comma list}
+\cs{clistConst} \meta{clist var} \Arg{comma list}
\end{syntax}
Creates a new constant \meta{clist var} or raises an error
if the name is already taken. The value of the
\meta{clist var} is set globally to the
\meta{comma list}.
\begin{codehigh}
-\ClistConst \cFooSomeClist {one,two,three}
+\clistConst \cFooSomeClist {one,two,three}
\end{codehigh}
\end{function}
-\begin{function}{\ClistVarJoin}
+\begin{function}{\clistVarJoin}
\begin{syntax}
-\cs{ClistVarJoin} \meta{clist var} \Arg{separator}
+\cs{clistVarJoin} \meta{clist var} \Arg{separator}
\end{syntax}
Returns the contents of the \meta{clist var},
with the \meta{separator} between the items.
@@ -4757,8 +4757,8 @@ with the \meta{separator} between the items.
%and a comma list with no items produces no output.
%An error is raised if the variable does not exist or if it is invalid.
\begin{demohigh}
-\ClistSet \lTmpaClist { a , b , , c , {de} , f }
-\ClistVarJoin \lTmpaClist { and }
+\clistSet \lTmpaClist { a , b , , c , {de} , f }
+\clistVarJoin \lTmpaClist { and }
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -4768,9 +4768,9 @@ with the \meta{separator} between the items.
%\end{texnote}
\end{function}
-\begin{function}{\ClistVarJoinExtended}
+\begin{function}{\clistVarJoinExtended}
\begin{syntax}
-\cs{ClistVarJoinExtended} \meta{clist var} \Arg{separator between two} \Arg{separator between more than two} \Arg{separator between final two}
+\cs{clistVarJoinExtended} \meta{clist var} \Arg{separator between two} \Arg{separator between more than two} \Arg{separator between final two}
\end{syntax}
Returns the contents of the \meta{clist var},
with the appropriate \meta{separator} between the items. Namely, if
@@ -4783,12 +4783,12 @@ the \meta{separator between two} and returns.
%and a comma list with no items produces no output.
%An error is raised if the variable does not exist or if it is invalid.
\begin{demohigh}
-\ClistSet \lTmpaClist { a , b }
-\ClistVarJoinExtended \lTmpaClist { and } {, } {, and }
+\clistSet \lTmpaClist { a , b }
+\clistVarJoinExtended \lTmpaClist { and } {, } {, and }
\end{demohigh}
\begin{demohigh}
-\ClistSet \lTmpaClist { a , b , , c , {de} , f }
-\ClistVarJoinExtended \lTmpaClist { and } {, } {, and }
+\clistSet \lTmpaClist { a , b , , c , {de} , f }
+\clistVarJoinExtended \lTmpaClist { and } {, } {, and }
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -4798,23 +4798,23 @@ the \meta{separator between two} and returns.
%\end{texnote}
\end{function}
-\begin{function}{\ClistJoin,\ClistJoinExtended}
+\begin{function}{\clistJoin,\clistJoinExtended}
\begin{syntax}
-\cs{ClistJoin} \meta{comma list} \Arg{separator}
-\cs{ClistJoinExtended} \meta{comma list} \Arg{separator between two} \Arg{separator between more than two} \Arg{separator between final two}
+\cs{clistJoin} \meta{comma list} \Arg{separator}
+\cs{clistJoinExtended} \meta{comma list} \Arg{separator between two} \Arg{separator between more than two} \Arg{separator between final two}
\end{syntax}
Returns the contents of the \meta{comma list},
with the appropriate \meta{separator} between the items. As for
-\cs{ClistSet}, blank items are omitted, spaces are removed from
+\cs{clistSet}, blank items are omitted, spaces are removed from
both sides of each item, then a set of braces is removed if the
resulting space-trimmed item is braced. The \meta{separators} are
-then inserted in the same way as for \cs{ClistVarJoin} and
-\cs{ClistVarJoinExtended}, respectively.
+then inserted in the same way as for \cs{clistVarJoin} and
+\cs{clistVarJoinExtended}, respectively.
\begin{demohigh}
-\ClistJoinExtended { a , b } { and } {, } {, and }
+\clistJoinExtended { a , b } { and } {, } {, and }
\end{demohigh}
\begin{demohigh}
-\ClistJoinExtended { a , b , , c , {de} , f } { and } {, } {, and }
+\clistJoinExtended { a , b , , c , {de} , f } { and } {, } {, and }
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -4826,55 +4826,55 @@ then inserted in the same way as for \cs{ClistVarJoin} and
\section{Viewing Comma Lists}
-\begin{function}{\ClistLog}
+\begin{function}{\clistLog}
\begin{syntax}
-\cs{ClistLog} \Arg{tokens}
+\cs{clistLog} \Arg{tokens}
\end{syntax}
Writes the entries in the comma list in the log file. See also
-\cs{ClistShow} which displays the result in the terminal.
+\cs{clistShow} which displays the result in the terminal.
\begin{codehigh}
-\ClistLog {one,two,three}
+\clistLog {one,two,three}
\end{codehigh}
\end{function}
-\begin{function}{\ClistVarLog}
+\begin{function}{\clistVarLog}
\begin{syntax}
-\cs{ClistVarLog} \meta{comma list}
+\cs{clistVarLog} \meta{comma list}
\end{syntax}
Writes the entries in the \meta{comma list} in the log file. See
-also \cs{ClistVarShow} which displays the result in the terminal.
+also \cs{clistVarShow} which displays the result in the terminal.
\begin{codehigh}
-\ClistSet \lTmpaClist {one,two,three}
-\ClistVarLog \lTmpaClist
+\clistSet \lTmpaClist {one,two,three}
+\clistVarLog \lTmpaClist
\end{codehigh}
\end{function}
-\begin{function}{\ClistShow}
+\begin{function}{\clistShow}
\begin{syntax}
-\cs{ClistShow} \Arg{tokens}
+\cs{clistShow} \Arg{tokens}
\end{syntax}
Displays the entries in the comma list in the terminal.
\begin{codehigh}
-\ClistShow {one,two,three}
+\clistShow {one,two,three}
\end{codehigh}
\end{function}
-\begin{function}{\ClistVarShow}
+\begin{function}{\clistVarShow}
\begin{syntax}
-\cs{ClistVarShow} \meta{comma list}
+\cs{clistVarShow} \meta{comma list}
\end{syntax}
Displays the entries in the \meta{comma list} in the terminal.
\begin{codehigh}
-\ClistSet \lTmpaClist {one,two,three}
-\ClistVarShow \lTmpaClist
+\clistSet \lTmpaClist {one,two,three}
+\clistVarShow \lTmpaClist
\end{codehigh}
\end{function}
\section{Setting Comma Lists}
-\begin{function}{\ClistSet}
+\begin{function}{\clistSet}
\begin{syntax}
-\cs{ClistSet} \meta{comma list} \verb|{|\meta{item_1},\ldots{},\meta{item_n}\verb|}|
+\cs{clistSet} \meta{comma list} \verb|{|\meta{item_1},\ldots{},\meta{item_n}\verb|}|
\end{syntax}
Sets \meta{comma list} to contain the \meta{items},
removing any previous content from the variable.
@@ -4883,87 +4883,87 @@ item, then a set of braces is removed if the resulting space-trimmed
item is braced.
To store some \meta{tokens} as a single \meta{item} even if the
\meta{tokens} contain commas or spaces, add a set of braces:
-\cs{ClistSet} \meta{comma list} \verb|{| \Arg{tokens} \verb|}|.
+\cs{clistSet} \meta{comma list} \verb|{| \Arg{tokens} \verb|}|.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,three}
-\ClistVarJoin \lTmpaClist { and }
+\clistSet \lTmpaClist {one,two,three}
+\clistVarJoin \lTmpaClist { and }
\end{demohigh}
\end{function}
-\begin{function}{\ClistSetEq}
+\begin{function}{\clistSetEq}
\begin{syntax}
-\cs{ClistSetEq} \meta{comma list_1} \meta{comma list_2}
+\cs{clistSetEq} \meta{comma list_1} \meta{comma list_2}
\end{syntax}
Sets the content of \meta{comma list_1} equal to that of
\meta{comma list_2}. To set a token list variable equal to a comma
-list variable, use \cs{TlSetEq}. Conversely, setting a comma
+list variable, use \cs{tlSetEq}. Conversely, setting a comma
list variable to a token list is unadvisable unless one checks
space-trimming and related issues.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,three,four}
-\ClistSetEq \lTmpbClist \lTmpaClist
-\ClistVarJoin \lTmpbClist { and }
+\clistSet \lTmpaClist {one,two,three,four}
+\clistSetEq \lTmpbClist \lTmpaClist
+\clistVarJoin \lTmpbClist { and }
\end{demohigh}
\end{function}
-\begin{function}{\ClistSetFromSeq}
+\begin{function}{\clistSetFromSeq}
\begin{syntax}
-\cs{ClistSetFromSeq} \meta{comma list} \meta{sequence}
+\cs{clistSetFromSeq} \meta{comma list} \meta{sequence}
\end{syntax}
Converts the data in the \meta{sequence} into a \meta{comma list}:
the original \meta{sequence} is unchanged.
Items which contain either spaces or commas are surrounded by braces.
\begin{demohigh}
-\SeqPutRight \lTmpaSeq {one}
-\SeqPutRight \lTmpaSeq {two}
-\ClistSetFromSeq \lTmpaClist \lTmpaSeq
-\ClistVarJoin \lTmpaClist { and }
+\seqPutRight \lTmpaSeq {one}
+\seqPutRight \lTmpaSeq {two}
+\clistSetFromSeq \lTmpaClist \lTmpaSeq
+\clistVarJoin \lTmpaClist { and }
\end{demohigh}
\end{function}
-\begin{function}{\ClistClear}
+\begin{function}{\clistClear}
\begin{syntax}
-\cs{ClistClear} \meta{comma list}
+\cs{clistClear} \meta{comma list}
\end{syntax}
Clears all items from the \meta{comma list}.
\begin{codehigh}
-\ClistSet \lTmpaClist {one,two,three,four}
-\ClistClear \lTmpaClist
+\clistSet \lTmpaClist {one,two,three,four}
+\clistClear \lTmpaClist
\end{codehigh}
\end{function}
-\begin{function}{\ClistClearNew}
+\begin{function}{\clistClearNew}
\begin{syntax}
-\cs{ClistClearNew} \meta{comma list}
+\cs{clistClearNew} \meta{comma list}
\end{syntax}
Ensures that the \meta{comma list} exists globally by applying
-\cs{ClistNew} if necessary, then applies \cs{ClistClear} to leave
+\cs{clistNew} if necessary, then applies \cs{clistClear} to leave
the list empty.
\begin{demohigh}
-\ClistClearNew \lFooSomeClist
-\ClistSet \lFooSomeClist {one,two,three}
-\ClistVarJoin \lFooSomeClist { and }
+\clistClearNew \lFooSomeClist
+\clistSet \lFooSomeClist {one,two,three}
+\clistVarJoin \lFooSomeClist { and }
\end{demohigh}
\end{function}
-\begin{function}{\ClistConcat}
+\begin{function}{\clistConcat}
\begin{syntax}
-\cs{ClistConcat} \meta{comma list_1} \meta{comma list_2} \meta{comma list_3}
+\cs{clistConcat} \meta{comma list_1} \meta{comma list_2} \meta{comma list_3}
\end{syntax}
Concatenates the content of \meta{comma list_2} and \meta{comma list_3}
together and saves the result in \meta{comma list_1}. The items in
\meta{comma list_2} are placed at the left side of the new comma list.
\begin{demohigh}
-\ClistSet \lTmpbClist {one,two}
-\ClistSet \lTmpcClist {three,four}
-\ClistConcat \lTmpaClist \lTmpbClist \lTmpcClist
-\ClistVarJoin \lTmpaClist { + }
+\clistSet \lTmpbClist {one,two}
+\clistSet \lTmpcClist {three,four}
+\clistConcat \lTmpaClist \lTmpbClist \lTmpcClist
+\clistVarJoin \lTmpaClist { + }
\end{demohigh}
\end{function}
-\begin{function}{\ClistPutLeft}
+\begin{function}{\clistPutLeft}
\begin{syntax}
-\cs{ClistPutLeft} \meta{comma list} \verb|{|\meta{item_1},\ldots{},\meta{item_n}\verb|}|
+\cs{clistPutLeft} \meta{comma list} \verb|{|\meta{item_1},\ldots{},\meta{item_n}\verb|}|
\end{syntax}
Appends the \meta{items} to the left of the \meta{comma list}.
Blank items are omitted, spaces are removed from both sides of each
@@ -4971,17 +4971,17 @@ item, then a set of braces is removed if the resulting space-trimmed
item is braced.
To append some \meta{tokens} as a single \meta{item} even if the
\meta{tokens} contain commas or spaces, add a set of braces:
-\cs{ClistPutLeft} \meta{comma list} \verb|{| \Arg{tokens} \verb|}|.
+\cs{clistPutLeft} \meta{comma list} \verb|{| \Arg{tokens} \verb|}|.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two}
-\ClistPutLeft \lTmpaClist {zero}
-\ClistVarJoin \lTmpaClist { and }
+\clistSet \lTmpaClist {one,two}
+\clistPutLeft \lTmpaClist {zero}
+\clistVarJoin \lTmpaClist { and }
\end{demohigh}
\end{function}
-\begin{function}{\ClistPutRight}
+\begin{function}{\clistPutRight}
\begin{syntax}
-\cs{ClistPutRight} \meta{comma list} \verb|{|\meta{item_1},\ldots{},\meta{item_n}\verb|}|
+\cs{clistPutRight} \meta{comma list} \verb|{|\meta{item_1},\ldots{},\meta{item_n}\verb|}|
\end{syntax}
Appends the \meta{items} to the right of the \meta{comma list}.
Blank items are omitted, spaces are removed from both sides of each
@@ -4989,11 +4989,11 @@ item, then a set of braces is removed if the resulting space-trimmed
item is braced.
To append some \meta{tokens} as a single \meta{item} even if the
\meta{tokens} contain commas or spaces, add a set of braces:
-\cs{ClistPutRight} \meta{comma list} \verb|{| \Arg{tokens} \verb|}|.
+\cs{clistPutRight} \meta{comma list} \verb|{| \Arg{tokens} \verb|}|.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two}
-\ClistPutRight \lTmpaClist {three}
-\ClistVarJoin \lTmpaClist { and }
+\clistSet \lTmpaClist {one,two}
+\clistPutRight \lTmpaClist {three}
+\clistVarJoin \lTmpaClist { and }
\end{demohigh}
\end{function}
@@ -5004,17 +5004,17 @@ necessary to modify the content. The functions here may be used
to update comma lists, while retaining the order of the unaffected
entries.
-\begin{function}{\ClistVarRemoveDuplicates}
+\begin{function}{\clistVarRemoveDuplicates}
\begin{syntax}
-\cs{ClistVarRemoveDuplicates} \meta{comma list}
+\cs{clistVarRemoveDuplicates} \meta{comma list}
\end{syntax}
Removes duplicate items from the \meta{comma list}, leaving the
left most copy of each item in the \meta{comma list}. The \meta{item}
-comparison takes place on a token basis, as for \cs{TlIfEqTF}.
+comparison takes place on a token basis, as for \cs{tlIfEqTF}.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,one,two,three}
-\ClistVarRemoveDuplicates \lTmpaClist
-\ClistVarJoin \lTmpaClist {,}
+\clistSet \lTmpaClist {one,two,one,two,three}
+\clistVarRemoveDuplicates \lTmpaClist
+\clistVarJoin \lTmpaClist {,}
\end{demohigh}
%\begin{texnote}
%This function iterates through every item in the \meta{comma list} and
@@ -5026,17 +5026,17 @@ comparison takes place on a token basis, as for \cs{TlIfEqTF}.
%\end{texnote}
\end{function}
-\begin{function}{\ClistVarRemoveAll}
+\begin{function}{\clistVarRemoveAll}
\begin{syntax}
-\cs{ClistVarRemoveAll} \meta{comma list} \Arg{item}
+\cs{clistVarRemoveAll} \meta{comma list} \Arg{item}
\end{syntax}
Removes every occurrence of \meta{item} from the \meta{comma list}.
The \meta{item} comparison takes place on a token basis, as for
-\cs{TlIfEqTF}.
+\cs{tlIfEqTF}.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,one,two,three}
-\ClistVarRemoveAll \lTmpaClist {two}
-\ClistVarJoin \lTmpaClist {,}
+\clistSet \lTmpaClist {one,two,one,two,three}
+\clistVarRemoveAll \lTmpaClist {two}
+\clistVarJoin \lTmpaClist {,}
\end{demohigh}
%\begin{texnote}
%The function may fail if the \meta{item} contains \verb|{|, \verb|}|, or \verb|#|
@@ -5044,21 +5044,21 @@ The \meta{item} comparison takes place on a token basis, as for
%\end{texnote}
\end{function}
-\begin{function}{\ClistVarReverse}
+\begin{function}{\clistVarReverse}
\begin{syntax}
-\cs{ClistVarReverse} \meta{comma list}
+\cs{clistVarReverse} \meta{comma list}
\end{syntax}
Reverses the order of items stored in the \meta{comma list}.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,one,two,three}
-\ClistVarReverse \lTmpaClist
-\ClistVarJoin \lTmpaClist {,}
+\clistSet \lTmpaClist {one,two,one,two,three}
+\clistVarReverse \lTmpaClist
+\clistVarJoin \lTmpaClist {,}
\end{demohigh}
\end{function}
-%\begin{function}{\ClistVarSort}
+%\begin{function}{\clistVarSort}
%\begin{syntax}
-%\cs{ClistVarSort} \meta{clist var} \Arg{comparison code}
+%\cs{clistVarSort} \meta{clist var} \Arg{comparison code}
%\end{syntax}
%Sorts the items in the \meta{clist var} according to the
%\meta{comparison code}, and assigns the result to
@@ -5068,24 +5068,24 @@ Reverses the order of items stored in the \meta{comma list}.
\section{Working with the Contents of Comma Lists}
-\begin{function}{\ClistCount,\ClistVarCount}
+\begin{function}{\clistCount,\clistVarCount}
\begin{syntax}
-\cs{ClistCount} \Arg{comma list}
-\cs{ClistVarCount} \meta{comma list}
+\cs{clistCount} \Arg{comma list}
+\cs{clistVarCount} \meta{comma list}
\end{syntax}
Returns the number of items in the \meta{comma list}
as an \meta{integer denotation}. The total number of items
in a \meta{comma list} includes those which are duplicates,
\emph{i.e.} every item in a \meta{comma list} is counted.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,three,four}
-\ClistVarCount \lTmpaClist
+\clistSet \lTmpaClist {one,two,three,four}
+\clistVarCount \lTmpaClist
\end{demohigh}
\end{function}
-\begin{function}{\ClistItem}
+\begin{function}{\clistItem}
\begin{syntax}
-\cs{ClistItem} \Arg{comma list} \Arg{integer expression}
+\cs{clistItem} \Arg{comma list} \Arg{integer expression}
\end{syntax}
Indexing items in the \meta{comma list} from $1$ at the top (left), this
function evaluates the \meta{integer expression} and returns the
@@ -5093,10 +5093,10 @@ appropriate item from the comma list. If the
\meta{integer expression} is negative, indexing occurs from the
bottom (right) of the comma list. When the \meta{integer expression}
is larger than the number of items in the \meta{comma list} (as
-calculated by \cs{ClistCount}) then the function returns nothing.
+calculated by \cs{clistCount}) then the function returns nothing.
\begin{demohigh}
-\TlSet \lTmpaTl {\ClistItem {one,two,three,four} {3}}
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {\clistItem {one,two,three,four} {3}}
+\tlUse \lTmpaTl
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -5106,9 +5106,9 @@ calculated by \cs{ClistCount}) then the function returns nothing.
%\end{texnote}
\end{function}
-\begin{function}{\ClistVarItem}
+\begin{function}{\clistVarItem}
\begin{syntax}
-\cs{ClistVarItem} \meta{comma list} \Arg{integer expression}
+\cs{clistVarItem} \meta{comma list} \Arg{integer expression}
\end{syntax}
Indexing items in the \meta{comma list} from $1$ at the top (left), this
function evaluates the \meta{integer expression} and returns the
@@ -5116,11 +5116,11 @@ appropriate item from the comma list. If the
\meta{integer expression} is negative, indexing occurs from the
bottom (right) of the comma list. When the \meta{integer expression}
is larger than the number of items in the \meta{comma list} (as
-calculated by \cs{ClistVarCount}) then the function returns nothing.
+calculated by \cs{clistVarCount}) then the function returns nothing.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two,three,four}
-\TlSet \lTmpaTl {\ClistVarItem \lTmpaClist {3}}
-\TlUse \lTmpaTl
+\clistSet \lTmpaClist {one,two,three,four}
+\tlSet \lTmpaTl {\clistVarItem \lTmpaClist {3}}
+\tlUse \lTmpaTl
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -5130,18 +5130,18 @@ calculated by \cs{ClistVarCount}) then the function returns nothing.
%\end{texnote}
\end{function}
-\begin{function}{\ClistRandItem,\ClistVarRandItem}
+\begin{function}{\clistRandItem,\clistVarRandItem}
\begin{syntax}
-\cs{ClistRandItem} \Arg{comma list}
-\cs{ClistVarRandItem} \meta{clist var}
+\cs{clistRandItem} \Arg{comma list}
+\cs{clistVarRandItem} \meta{clist var}
\end{syntax}
Selects a pseudo-random item of the \meta{comma list}.
If the \meta{comma list} has no item, the result is empty.
\begin{demohigh}
-\TlSet \lTmpaTl {\ClistRandItem {one,two,three,four,five,six}}
-\TlUse \lTmpaTl
-\TlSet \lTmpaTl {\ClistRandItem {one,two,three,four,five,six}}
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {\clistRandItem {one,two,three,four,five,six}}
+\tlUse \lTmpaTl
+\tlSet \lTmpaTl {\clistRandItem {one,two,three,four,five,six}}
+\tlUse \lTmpaTl
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -5160,9 +5160,9 @@ intended to be mixed with the general ordered data functions detailed
in the previous section: a comma list should either be used as an
ordered data type or as a stack, but not in both ways.
-\begin{function}{\ClistGet}
+\begin{function}{\clistGet}
\begin{syntax}
-\cs{ClistGet} \meta{comma list} \meta{token list variable}
+\cs{clistGet} \meta{comma list} \meta{token list variable}
\end{syntax}
Stores the left-most item from the \meta{comma list} in the
\meta{token list variable} without removing it from the
@@ -5170,17 +5170,17 @@ Stores the left-most item from the \meta{comma list} in the
If the \meta{comma list} is empty the
\meta{token list variable} is set to the marker value \cs{qNoValue}.
\begin{demohigh}
-\ClistSet \lTmpaClist {two,three,four}
-\ClistGet \lTmpaClist \lTmpaTl
-\TlUse \lTmpaTl
+\clistSet \lTmpaClist {two,three,four}
+\clistGet \lTmpaClist \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\ClistGetT,\ClistGetF,\ClistGetTF}
+\begin{function}{\clistGetT,\clistGetF,\clistGetTF}
\begin{syntax}
-\cs{ClistGetT} \meta{comma list} \meta{token list variable} \meta{true code}
-\cs{ClistGetF} \meta{comma list} \meta{token list variable} \meta{false code}
-\cs{ClistGetTF} \meta{comma list} \meta{token list variable} \meta{true code} \meta{false code}
+\cs{clistGetT} \meta{comma list} \meta{token list variable} \meta{true code}
+\cs{clistGetF} \meta{comma list} \meta{token list variable} \meta{false code}
+\cs{clistGetTF} \meta{comma list} \meta{token list variable} \meta{true code} \meta{false code}
\end{syntax}
If the \meta{comma list} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -5190,14 +5190,14 @@ not defined in this case and should not be relied upon. If the
it from the \meta{comma list}.
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\ClistSet \lTmpaClist {two,three,four}
-\ClistGetTF \lTmpaClist \lTmpaTl {\Return{Yes}} {\Return{No}}
+\clistSet \lTmpaClist {two,three,four}
+\clistGetTF \lTmpaClist \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\ClistPop}
+\begin{function}{\clistPop}
\begin{syntax}
-\cs{ClistPop} \meta{comma list} \meta{token list variable}
+\cs{clistPop} \meta{comma list} \meta{token list variable}
\end{syntax}
Pops the left-most item from a \meta{comma list} into the
\meta{token list variable}, \emph{i.e.} removes the item from the
@@ -5206,17 +5206,17 @@ The assignment of the \meta{token list variable} is local.
If the \meta{comma list} is empty the
\meta{token list variable} is set to the marker value \cs{qNoValue}.
\begin{demohigh}
-\ClistSet \lTmpaClist {two,three,four}
-\ClistPop \lTmpaClist \lTmpaTl
-\ClistVarJoin \lTmpaClist {,}
+\clistSet \lTmpaClist {two,three,four}
+\clistPop \lTmpaClist \lTmpaTl
+\clistVarJoin \lTmpaClist {,}
\end{demohigh}
\end{function}
-\begin{function}{\ClistPopT,\ClistPopF,\ClistPopTF}
+\begin{function}{\clistPopT,\clistPopF,\clistPopTF}
\begin{syntax}
-\cs{ClistPopT} \meta{comma list} \meta{token list variable} \Arg{true code}
-\cs{ClistPopF} \meta{comma list} \meta{token list variable} \Arg{false code}
-\cs{ClistPopTF} \meta{comma list} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{clistPopT} \meta{comma list} \meta{token list variable} \Arg{true code}
+\cs{clistPopF} \meta{comma list} \meta{token list variable} \Arg{false code}
+\cs{clistPopTF} \meta{comma list} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{comma list} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -5226,22 +5226,22 @@ not defined in this case and should not be relied upon. If the
the item from the \meta{comma list}.
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\ClistSet \lTmpaClist {two,three,four}
-\ClistPopTF \lTmpaClist \lTmpaTl {\Return{Yes}} {\Return{No}}
+\clistSet \lTmpaClist {two,three,four}
+\clistPopTF \lTmpaClist \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\ClistPush}
+\begin{function}{\clistPush}
\begin{syntax}
-\cs{ClistPush} \meta{comma list} \Arg{items}
+\cs{clistPush} \meta{comma list} \Arg{items}
\end{syntax}
Adds the \Arg{items} to the top of the \meta{comma list}.
Spaces are removed from both sides of each item as for any
\texttt{n}-type comma list.
\begin{demohigh}
-\ClistSet \lTmpaClist {two,three,four}
-\ClistPush \lTmpaClist {zero,one}
-\ClistVarJoin \lTmpaClist {|}
+\clistSet \lTmpaClist {two,three,four}
+\clistPush \lTmpaClist {zero,one}
+\clistVarJoin \lTmpaClist {|}
\end{demohigh}
\end{function}
@@ -5267,22 +5267,22 @@ have already been trimmed on input, and items are simply stripped
of one set of braces if any. This case is more efficient than using
explicit comma lists.
-%\begin{function}{\ClistMapFunction,\ClistVarMapFunction}
+%\begin{function}{\clistMapFunction,\clistVarMapFunction}
%\begin{syntax}
-%\cs{ClistMapFunction} \Arg{comma list} \meta{function}
-%\cs{ClistVarMapFunction} \meta{comma list} \meta{function}
+%\cs{clistMapFunction} \Arg{comma list} \meta{function}
+%\cs{clistVarMapFunction} \meta{comma list} \meta{function}
%\end{syntax}
%Applies \meta{function} to every \meta{item} stored in the
%\meta{comma list}. The \meta{function} receives one argument for
%each iteration. The \meta{items} are returned from left to right.
-%The function \cs{ClistMapInline} is in general more efficient
-%than \cs{ClistMapFunction}.
+%The function \cs{clistMapInline} is in general more efficient
+%than \cs{clistMapFunction}.
%\end{function}
-\begin{function}{\ClistMapInline,\ClistVarMapInline}
+\begin{function}{\clistMapInline,\clistVarMapInline}
\begin{syntax}
-\cs{ClistMapInline} \Arg{comma list} \Arg{inline function}
-\cs{ClistVarMapInline} \meta{comma list} \Arg{inline function}
+\cs{clistMapInline} \Arg{comma list} \Arg{inline function}
+\cs{clistVarMapInline} \meta{comma list} \Arg{inline function}
\end{syntax}
Applies \meta{inline function} to every \meta{item} stored
within the \meta{comma list}. The \meta{inline function} should
@@ -5290,19 +5290,19 @@ consist of code which receives the \meta{item} as \verb|#1|.
The \meta{items} are returned from left to right.
\begin{demohigh}
\IgnoreSpacesOn
-\TlClear \lTmpaTl
-\ClistMapInline {one,two,three} {
- \TlPutRight \lTmpaTl {(#1)}
+\tlClear \lTmpaTl
+\clistMapInline {one,two,three} {
+ \tlPutRight \lTmpaTl {(#1)}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-\begin{function}{\ClistMapVariable,\ClistVarMapVariable}
+\begin{function}{\clistMapVariable,\clistVarMapVariable}
\begin{syntax}
-\cs{ClistMapVariable} \Arg{comma list} \meta{variable} \Arg{code}
-\cs{ClistVarMapVariable} \meta{comma list} \meta{variable} \Arg{code}
+\cs{clistMapVariable} \Arg{comma list} \meta{variable} \Arg{code}
+\cs{clistVarMapVariable} \meta{comma list} \meta{variable} \Arg{code}
\end{syntax}
Stores each \meta{item} of the \meta{comma list} in turn in the
(token list) \meta{variable} and applies the \meta{code}. The
@@ -5313,28 +5313,28 @@ list}, or its original value if there were no \meta{item}. The
\meta{items} are returned from left to right.
\begin{demohigh}
\IgnoreSpacesOn
-\ClistMapVariable {one,two,three} \lTmpiTl {
- \TlPutRight \gTmpaTl {\Expand {(\lTmpiTl)}}
+\clistMapVariable {one,two,three} \lTmpiTl {
+ \tlPutRight \gTmpaTl {\expWhole {(\lTmpiTl)}}
}
-\TlUse \gTmpaTl
+\tlUse \gTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\ClistMapTokens,\ClistVarMapTokens}
+%\begin{function}{\clistMapTokens,\clistVarMapTokens}
%\begin{syntax}
-%\cs{ClistMapTokens} \Arg{comma list} \Arg{code}
-%\cs{ClistVarMapTokens} \meta{clist var} \Arg{code}
+%\cs{clistMapTokens} \Arg{comma list} \Arg{code}
+%\cs{clistVarMapTokens} \meta{clist var} \Arg{code}
%\end{syntax}
%Calls \meta{code} \Arg{item} for every \meta{item} stored in the
%\meta{comma list}. The \meta{code} receives each \meta{item} as a
%trailing brace group. If the \meta{code} consists of a single
-%function this is equivalent to \cs{ClistMapFunction} or \cs{ClistVarMapFunction}.
+%function this is equivalent to \cs{clistMapFunction} or \cs{clistVarMapFunction}.
%\end{function}
-%\begin{function}{\ClistMapBreak}
+%\begin{function}{\clistMapBreak}
%\begin{syntax}
-%\cs{ClistMapBreak}
+%\cs{clistMapBreak}
%\end{syntax}
%Used to terminate a clist map function before all
%entries in the \meta{comma list} have been processed. This
@@ -5359,9 +5359,9 @@ list}, or its original value if there were no \meta{item}. The
%\end{texnote}
%\end{function}
%
-%\begin{function}{\ClistMapBreakDo}
+%\begin{function}{\clistMapBreakDo}
%\begin{syntax}
-%\cs{ClistMapBreakDo} \Arg{code}
+%\cs{clistMapBreakDo} \Arg{code}
%\end{syntax}
%Used to terminate a clist map function before all
%entries in the \meta{comma list} have been processed, inserting
@@ -5389,27 +5389,27 @@ list}, or its original value if there were no \meta{item}. The
\section{Comma List Conditionals}
-\begin{function}{\ClistIfExist,\ClistIfExistT,\ClistIfExistF,\ClistIfExistTF}
+\begin{function}{\clistIfExist,\clistIfExistT,\clistIfExistF,\clistIfExistTF}
\begin{syntax}
-\cs{ClistIfExist} \meta{comma list}
-\cs{ClistIfExistT} \meta{comma list} \Arg{true code}
-\cs{ClistIfExistF} \meta{comma list} \Arg{false code}
-\cs{ClistIfExistTF} \meta{comma list} \Arg{true code} \Arg{false code}
+\cs{clistIfExist} \meta{comma list}
+\cs{clistIfExistT} \meta{comma list} \Arg{true code}
+\cs{clistIfExistF} \meta{comma list} \Arg{false code}
+\cs{clistIfExistTF} \meta{comma list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{comma list} is currently defined. This does
not check that the \meta{comma list} really is a comma list.
\begin{demohigh}
-\ClistIfExistTF \lTmpaClist {\Return{Yes}} {\Return{No}}
-\ClistIfExistTF \lFooUndefinedClist {\Return{Yes}} {\Return{No}}
+\clistIfExistTF \lTmpaClist {\prgReturn{Yes}} {\prgReturn{No}}
+\clistIfExistTF \lFooUndefinedClist {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\ClistIfEmpty,\ClistIfEmptyT,\ClistIfEmptyF,\ClistIfEmptyTF}
+\begin{function}{\clistIfEmpty,\clistIfEmptyT,\clistIfEmptyF,\clistIfEmptyTF}
\begin{syntax}
-\cs{ClistIfEmpty} \Arg{comma list}
-\cs{ClistIfEmptyT} \Arg{comma list} \Arg{true code}
-\cs{ClistIfEmptyF} \Arg{comma list} \Arg{false code}
-\cs{ClistIfEmptyTF} \Arg{comma list} \Arg{true code} \Arg{false code}
+\cs{clistIfEmpty} \Arg{comma list}
+\cs{clistIfEmptyT} \Arg{comma list} \Arg{true code}
+\cs{clistIfEmptyF} \Arg{comma list} \Arg{false code}
+\cs{clistIfEmptyTF} \Arg{comma list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{comma list} is empty (containing no items).
The rules for space trimming are as for other \texttt{n}-type
@@ -5418,40 +5418,40 @@ outer braces) is empty, while \verb|{ ,{},}| (without outer braces)
contains one element, which happens to be empty: the comma-list
is not empty.
\begin{demohigh}
-\ClistIfEmptyTF {one,two} {\Return{Empty}} {\Return{NonEmpty}}
-\ClistIfEmptyTF { , } {\Return{Empty}} {\Return{NonEmpty}}
+\clistIfEmptyTF {one,two} {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\clistIfEmptyTF { , } {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\ClistVarIfEmpty,\ClistVarIfEmptyT,\ClistVarIfEmptyF,\ClistVarIfEmptyTF}
+\begin{function}{\clistVarIfEmpty,\clistVarIfEmptyT,\clistVarIfEmptyF,\clistVarIfEmptyTF}
\begin{syntax}
-\cs{ClistVarIfEmpty} \meta{comma list}
-\cs{ClistVarIfEmptyT} \meta{comma list} \Arg{true code}
-\cs{ClistVarIfEmptyF} \meta{comma list} \Arg{false code}
-\cs{ClistVarIfEmptyTF} \meta{comma list} \Arg{true code} \Arg{false code}
+\cs{clistVarIfEmpty} \meta{comma list}
+\cs{clistVarIfEmptyT} \meta{comma list} \Arg{true code}
+\cs{clistVarIfEmptyF} \meta{comma list} \Arg{false code}
+\cs{clistVarIfEmptyTF} \meta{comma list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{comma list} is empty (containing no items).
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two}
-\ClistVarIfEmptyTF \lTmpaClist {\Return{Empty}} {\Return{NonEmpty}}
-\ClistClear \lTmpaClist
-\ClistVarIfEmptyTF \lTmpaClist {\Return{Empty}} {\Return{NonEmpty}}
+\clistSet \lTmpaClist {one,two}
+\clistVarIfEmptyTF \lTmpaClist {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\clistClear \lTmpaClist
+\clistVarIfEmptyTF \lTmpaClist {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\ClistIfIn,\ClistIfInT,\ClistIfInF,\ClistIfInTF}
+\begin{function}{\clistIfIn,\clistIfInT,\clistIfInF,\clistIfInTF}
\begin{syntax}
-\cs{ClistIfIn} \Arg{comma list} \Arg{item}
-\cs{ClistIfInT} \Arg{comma list} \Arg{item} \Arg{true code}
-\cs{ClistIfInF} \Arg{comma list} \Arg{item} \Arg{false code}
-\cs{ClistIfInTF} \Arg{comma list} \Arg{item} \Arg{true code} \Arg{false code}
+\cs{clistIfIn} \Arg{comma list} \Arg{item}
+\cs{clistIfInT} \Arg{comma list} \Arg{item} \Arg{true code}
+\cs{clistIfInF} \Arg{comma list} \Arg{item} \Arg{false code}
+\cs{clistIfInTF} \Arg{comma list} \Arg{item} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{item} is present in the \meta{comma list}.
In the case of an \texttt{n}-type \meta{comma list}, the usual rules
of space trimming and brace stripping apply. For example
\begin{demohigh}
-\ClistIfInTF { a , {b} , {b} , c } {b} {\Return{Yes}} {\Return{No}}
-\ClistIfInTF { a , {b} , {b} , c } {d} {\Return{Yes}} {\Return{No}}
+\clistIfInTF { a , {b} , {b} , c } {b} {\prgReturn{Yes}} {\prgReturn{No}}
+\clistIfInTF { a , {b} , {b} , c } {d} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
%\begin{texnote}
%The function may fail if the \meta{item} contains \verb|{|, \verb|}|, or \verb|#|
@@ -5459,20 +5459,20 @@ of space trimming and brace stripping apply. For example
%\end{texnote}
\end{function}
-\begin{function}{\ClistVarIfIn,\ClistVarIfInT,\ClistVarIfInF,\ClistVarIfInTF}
+\begin{function}{\clistVarIfIn,\clistVarIfInT,\clistVarIfInF,\clistVarIfInTF}
\begin{syntax}
-\cs{ClistVarIfIn} \meta{comma list} \Arg{item}
-\cs{ClistVarIfInT} \meta{comma list} \Arg{item} \Arg{true code}
-\cs{ClistVarIfInF} \meta{comma list} \Arg{item} \Arg{false code}
-\cs{ClistVarIfInTF} \meta{comma list} \Arg{item} \Arg{true code} \Arg{false code}
+\cs{clistVarIfIn} \meta{comma list} \Arg{item}
+\cs{clistVarIfInT} \meta{comma list} \Arg{item} \Arg{true code}
+\cs{clistVarIfInF} \meta{comma list} \Arg{item} \Arg{false code}
+\cs{clistVarIfInTF} \meta{comma list} \Arg{item} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{item} is present in the \meta{comma list}.
In the case of an \texttt{n}-type \meta{comma list}, the usual rules
of space trimming and brace stripping apply.
\begin{demohigh}
-\ClistSet \lTmpaClist {one,two}
-\ClistVarIfInTF \lTmpaClist {one} {\Return{Yes}} {\Return{No}}
-\ClistVarIfInTF \lTmpaClist {three} {\Return{Yes}} {\Return{No}}
+\clistSet \lTmpaClist {one,two}
+\clistVarIfInTF \lTmpaClist {one} {\prgReturn{Yes}} {\prgReturn{No}}
+\clistVarIfInTF \lTmpaClist {three} {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
%\begin{texnote}
%The function may fail if the \meta{item} contains \verb|{|, \verb|}|, or \verb|#|
@@ -5504,33 +5504,33 @@ code and so should only be used for short-term storage.
\section{Creating and Using Sequences}
-\begin{function}{\SeqNew}
+\begin{function}{\seqNew}
\begin{syntax}
-\cs{SeqNew} \meta{sequence}
+\cs{seqNew} \meta{sequence}
\end{syntax}
Creates a new \meta{sequence} or raises an error if the name is
already taken. The declaration is global. The \meta{sequence}
initially contains no items.
\begin{codehigh}
-\SeqNew \lFooSomeSeq
+\seqNew \lFooSomeSeq
\end{codehigh}
\end{function}
-\begin{function}{\SeqConstFromClist}
+\begin{function}{\seqConstFromClist}
\begin{syntax}
-\cs{SeqConstFromClist} \meta{seq var} \Arg{comma-list}
+\cs{seqConstFromClist} \meta{seq var} \Arg{comma-list}
\end{syntax}
Creates a new constant \meta{seq var} or raises an error if the name
is already taken. The \meta{seq var} is set globally to contain the
items in the \meta{comma list}.
\begin{codehigh}
-\SeqConstFromClist \cFooSomeSeq {one,two,three}
+\seqConstFromClist \cFooSomeSeq {one,two,three}
\end{codehigh}
\end{function}
-\begin{function}{\SeqVarJoin}
+\begin{function}{\seqVarJoin}
\begin{syntax}
-\cs{SeqVarJoin} \meta{seq var} \Arg{separator}
+\cs{seqVarJoin} \meta{seq var} \Arg{separator}
\end{syntax}
Returns the contents of the \meta{seq var}, with
the \meta{separator} between the items. If the sequence has
@@ -5538,8 +5538,8 @@ a single item, it is returned with no \meta{separator},
and an empty sequence returns nothing. An error is raised if
the variable does not exist or if it is invalid.
\begin{demohigh}
-\SeqSetSplit \lTmpaSeq {|} {a|b|c|{de}|f}
-\SeqVarJoin \lTmpaSeq { and }
+\seqSetSplit \lTmpaSeq {|} {a|b|c|{de}|f}
+\seqVarJoin \lTmpaSeq { and }
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -5549,9 +5549,9 @@ the variable does not exist or if it is invalid.
%\end{texnote}
\end{function}
-\begin{function}{\SeqVarJoinExtended}
+\begin{function}{\seqVarJoinExtended}
\begin{syntax}
-\cs{SeqVarJoinExtended} \meta{seq var} \Arg{separator between two} \Arg{separator between more than two} \Arg{separator between final two}
+\cs{seqVarJoinExtended} \meta{seq var} \Arg{separator between two} \Arg{separator between more than two} \Arg{separator between final two}
\end{syntax}
Returns the contents of the \meta{seq var}, with
the appropriate \meta{separator} between the items. Namely, if the
@@ -5564,8 +5564,8 @@ a single item, it is returned, and an empty sequence
returns nothing. An error is raised if the variable does
not exist or if it is invalid.
\begin{demohigh}
-\SeqSetSplit \lTmpaSeq {|} {a|b|c|{de}|f}
-\SeqVarJoinExtended \lTmpaSeq { and } {, } {, and }
+\seqSetSplit \lTmpaSeq {|} {a|b|c|{de}|f}
+\seqVarJoinExtended \lTmpaSeq { and } {, } {, and }
\end{demohigh}
The first separator argument is not used in this case
because the sequence has more than $2$ items.
@@ -5579,43 +5579,43 @@ because the sequence has more than $2$ items.
\section{Viewing Sequences}
-\begin{function}{\SeqVarLog}
+\begin{function}{\seqVarLog}
\begin{syntax}
-\cs{SeqVarLog} \meta{sequence}
+\cs{seqVarLog} \meta{sequence}
\end{syntax}
Writes the entries in the \meta{sequence} in the log file.
\begin{codehigh}
-\SeqVarLog \lFooSomeSeq
+\seqVarLog \lFooSomeSeq
\end{codehigh}
\end{function}
-\begin{function}{\SeqVarShow}
+\begin{function}{\seqVarShow}
\begin{syntax}
-\cs{SeqVarShow} \meta{sequence}
+\cs{seqVarShow} \meta{sequence}
\end{syntax}
Displays the entries in the \meta{sequence} in the terminal.
\begin{codehigh}
-\SeqVarShow \lFooSomeSeq
+\seqVarShow \lFooSomeSeq
\end{codehigh}
\end{function}
\section{Setting Sequences}
-\begin{function}{\SeqSetFromClist}
+\begin{function}{\seqSetFromClist}
\begin{syntax}
-\cs{SeqSetFromClist} \meta{sequence} \meta{comma-list}
+\cs{seqSetFromClist} \meta{sequence} \meta{comma-list}
\end{syntax}
Converts the data in the \meta{comma list} into a \meta{sequence}:
the original \meta{comma list} is unchanged.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,three}
-\SeqVarJoin \lTmpaSeq { and }
+\seqSetFromClist \lTmpaSeq {one,two,three}
+\seqVarJoin \lTmpaSeq { and }
\end{demohigh}
\end{function}
-\begin{function}{\SeqSetSplit}
+\begin{function}{\seqSetSplit}
\begin{syntax}
-\cs{SeqSetSplit} \meta{sequence} \Arg{delimiter} \Arg{token list}
+\cs{seqSetSplit} \meta{sequence} \Arg{delimiter} \Arg{token list}
\end{syntax}
Splits the \meta{token list} into \meta{items} separated
by \meta{delimiter}, and assigns the result to the \meta{sequence}.
@@ -5623,110 +5623,110 @@ Spaces on both sides of each \meta{item} are ignored,
then one set of outer braces is removed (if any);
this space trimming behaviour is identical to that of
\pkg{Clist} functions. Empty \meta{items} are preserved by
-\cs{SeqSetSplit}, and can be removed afterwards using
-\cs{SeqVarRemoveAll} \meta{sequence} \verb|{}|.
+\cs{seqSetSplit}, and can be removed afterwards using
+\cs{seqVarRemoveAll} \meta{sequence} \verb|{}|.
The \meta{delimiter} may not contain \verb|{|, \verb|}| or \verb|#|
(assuming \TeX{}'s normal category code r\'egime).
If the \meta{delimiter} is empty, the \meta{token list} is split
into \meta{items} as a \meta{token list}.
-%See also \cs{SeqSetSplitKeepSpaces}, which omits space stripping.
+%See also \cs{seqSetSplitKeepSpaces}, which omits space stripping.
\begin{demohigh}
-\SeqSetSplit \lTmpaSeq {,} {1,2,3}
-\SeqVarJoin \lTmpaSeq { and }
+\seqSetSplit \lTmpaSeq {,} {1,2,3}
+\seqVarJoin \lTmpaSeq { and }
\end{demohigh}
\end{function}
-\begin{function}{\SeqSetEq}
+\begin{function}{\seqSetEq}
\begin{syntax}
-\cs{SeqSetEq} \meta{sequence_1} \meta{sequence_2}
+\cs{seqSetEq} \meta{sequence_1} \meta{sequence_2}
\end{syntax}
Sets the content of \meta{sequence_1} equal to that of
\meta{sequence_2}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,three,four}
-\SeqSetEq \lTmpbSeq \lTmpaSeq
-\SeqVarJoin \lTmpbSeq { and }
+\seqSetFromClist \lTmpaSeq {one,two,three,four}
+\seqSetEq \lTmpbSeq \lTmpaSeq
+\seqVarJoin \lTmpbSeq { and }
\end{demohigh}
\end{function}
-\begin{function}{\SeqClear}
+\begin{function}{\seqClear}
\begin{syntax}
-\cs{SeqClear} \meta{sequence}
+\cs{seqClear} \meta{sequence}
\end{syntax}
Clears all items from the \meta{sequence}.
\begin{codehigh}
-\SeqClear \lTmpaSeq
+\seqClear \lTmpaSeq
\end{codehigh}
\end{function}
-\begin{function}{\SeqClearNew}
+\begin{function}{\seqClearNew}
\begin{syntax}
-\cs{SeqClearNew} \meta{sequence}
+\cs{seqClearNew} \meta{sequence}
\end{syntax}
Ensures that the \meta{sequence} exists globally by applying
-\cs{SeqNew} if necessary, then applies \cs{SeqClear} to leave
+\cs{seqNew} if necessary, then applies \cs{seqClear} to leave
the \meta{sequence} empty.
\begin{demohigh}
-\SeqClearNew \lFooSomeSeq
-\SeqSetFromClist \lFooSomeSeq {one,two,three}
-\SeqVarJoin \lFooSomeSeq { and }
+\seqClearNew \lFooSomeSeq
+\seqSetFromClist \lFooSomeSeq {one,two,three}
+\seqVarJoin \lFooSomeSeq { and }
\end{demohigh}
\end{function}
-\begin{function}{\SeqConcat}
+\begin{function}{\seqConcat}
\begin{syntax}
-\cs{SeqConcat} \meta{sequence_1} \meta{sequence_2} \meta{sequence_3}
+\cs{seqConcat} \meta{sequence_1} \meta{sequence_2} \meta{sequence_3}
\end{syntax}
Concatenates the content of \meta{sequence_2} and \meta{sequence_3}
together and saves the result in \meta{sequence_1}. The items in
\meta{sequence_2} are placed at the left side of the new sequence.
\begin{demohigh}
-\SeqSetFromClist \lTmpbSeq {one,two}
-\SeqSetFromClist \lTmpcSeq {three,four}
-\SeqConcat \lTmpaSeq \lTmpbSeq \lTmpcSeq
-\SeqVarJoin \lTmpaSeq {, }
+\seqSetFromClist \lTmpbSeq {one,two}
+\seqSetFromClist \lTmpcSeq {three,four}
+\seqConcat \lTmpaSeq \lTmpbSeq \lTmpcSeq
+\seqVarJoin \lTmpaSeq {, }
\end{demohigh}
\end{function}
-%\begin{function}{\SeqSetSplitKeepSpaces}
+%\begin{function}{\seqSetSplitKeepSpaces}
%\begin{syntax}
-%\cs{SeqSetSplitKeepSpaces} \meta{sequence} \Arg{delimiter} \Arg{token list}
+%\cs{seqSetSplitKeepSpaces} \meta{sequence} \Arg{delimiter} \Arg{token list}
%\end{syntax}
%Splits the \meta{token list} into \meta{items} separated
%by \meta{delimiter}, and assigns the result to the \meta{sequence}.
%One set of outer braces is removed (if any) but any surrounding spaces
%are retained: any braces \emph{inside} one or more spaces are
%therefore kept. Empty \meta{items} are preserved by
-%\cs{SeqSetSplitKeepSpaces}, and can be removed afterwards using
-%\cs{SeqVarRemoveAll} \meta{sequence} \verb|{}|.
+%\cs{seqSetSplitKeepSpaces}, and can be removed afterwards using
+%\cs{seqVarRemoveAll} \meta{sequence} \verb|{}|.
%The \meta{delimiter} may not contain \verb|{|, \verb|}| or \verb|#|
%(assuming \TeX{}'s normal category code r\'egime).
%If the \meta{delimiter} is empty, the \meta{token list} is split
%into \meta{items} as a \meta{token list}.
-%%See also \cs{SeqSetSplit}, which removes spaces around the delimiters.
+%%See also \cs{seqSetSplit}, which removes spaces around the delimiters.
%\end{function}
-\begin{function}{\SeqPutLeft}
+\begin{function}{\seqPutLeft}
\begin{syntax}
-\cs{SeqPutLeft} \meta{sequence} \Arg{item}
+\cs{seqPutLeft} \meta{sequence} \Arg{item}
\end{syntax}
Appends the \meta{item} to the left of the \meta{sequence}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two}
-\SeqPutLeft \lTmpaSeq {zero}
-\SeqVarJoin \lTmpaSeq { and }
+\seqSetFromClist \lTmpaSeq {one,two}
+\seqPutLeft \lTmpaSeq {zero}
+\seqVarJoin \lTmpaSeq { and }
\end{demohigh}
\end{function}
-\begin{function}{\SeqPutRight}
+\begin{function}{\seqPutRight}
\begin{syntax}
-\cs{SeqPutRight} \meta{sequence} \Arg{item}
+\cs{seqPutRight} \meta{sequence} \Arg{item}
\end{syntax}
Appends the \meta{item} to the right of the \meta{sequence}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two}
-\SeqPutRight \lTmpaSeq {three}
-\SeqVarJoin \lTmpaSeq { and }
+\seqSetFromClist \lTmpaSeq {one,two}
+\seqPutRight \lTmpaSeq {three}
+\seqVarJoin \lTmpaSeq { and }
\end{demohigh}
\end{function}
@@ -5737,17 +5737,17 @@ necessary to modify the content. The functions here may be used
to update sequences, while retaining the order of the unaffected
entries.
-\begin{function}{\SeqVarRemoveDuplicates}
+\begin{function}{\seqVarRemoveDuplicates}
\begin{syntax}
-\cs{SeqVarRemoveDuplicates} \meta{sequence}
+\cs{seqVarRemoveDuplicates} \meta{sequence}
\end{syntax}
Removes duplicate items from the \meta{sequence}, leaving the
left most copy of each item in the \meta{sequence}. The \meta{item}
-comparison takes place on a token basis, as for \cs{TlIfEqTF}.
+comparison takes place on a token basis, as for \cs{tlIfEqTF}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,one,two,three}
-\SeqVarRemoveDuplicates \lTmpaSeq
-\SeqVarJoin \lTmpaSeq {,}
+\seqSetFromClist \lTmpaSeq {one,two,one,two,three}
+\seqVarRemoveDuplicates \lTmpaSeq
+\seqVarJoin \lTmpaSeq {,}
\end{demohigh}
%\begin{texnote}
%This function iterates through every item in the \meta{sequence} and
@@ -5756,34 +5756,34 @@ comparison takes place on a token basis, as for \cs{TlIfEqTF}.
%\end{texnote}
\end{function}
-\begin{function}{\SeqVarRemoveAll}
+\begin{function}{\seqVarRemoveAll}
\begin{syntax}
-\cs{SeqVarRemoveAll} \meta{sequence} \Arg{item}
+\cs{seqVarRemoveAll} \meta{sequence} \Arg{item}
\end{syntax}
Removes every occurrence of \meta{item} from the \meta{sequence}.
-The \meta{item} comparison takes place on a token basis, as for \cs{TlIfEqTF}.
+The \meta{item} comparison takes place on a token basis, as for \cs{tlIfEqTF}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,one,two,three}
-\SeqVarRemoveAll \lTmpaSeq {two}
-\SeqVarJoin \lTmpaSeq {,}
+\seqSetFromClist \lTmpaSeq {one,two,one,two,three}
+\seqVarRemoveAll \lTmpaSeq {two}
+\seqVarJoin \lTmpaSeq {,}
\end{demohigh}
\end{function}
-\begin{function}{\SeqVarReverse}
+\begin{function}{\seqVarReverse}
\begin{syntax}
-\cs{SeqVarReverse} \meta{sequence}
+\cs{seqVarReverse} \meta{sequence}
\end{syntax}
Reverses the order of the items stored in the \meta{sequence}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,one,two,three}
-\SeqVarReverse \lTmpaSeq
-\SeqVarJoin \lTmpaSeq {,}
+\seqSetFromClist \lTmpaSeq {one,two,one,two,three}
+\seqVarReverse \lTmpaSeq
+\seqVarJoin \lTmpaSeq {,}
\end{demohigh}
\end{function}
-%\begin{function}{\SeqVarSort}
+%\begin{function}{\seqVarSort}
%\begin{syntax}
-%\cs{SeqVarSort} \meta{sequence} \Arg{comparison code}
+%\cs{seqVarSort} \meta{sequence} \Arg{comparison code}
%\end{syntax}
%Sorts the items in the \meta{sequence} according to the
%\meta{comparison code}, and assigns the result to
@@ -5791,9 +5791,9 @@ Reverses the order of the items stored in the \meta{sequence}.
%described in Section \ref{sec:l3sort:mech}.
%\end{function}
-%\begin{function}{\SeqVarShuffle}
+%\begin{function}{\seqVarShuffle}
%\begin{syntax}
-%\cs{SeqVarShuffle} \meta{seq var}
+%\cs{seqVarShuffle} \meta{seq var}
%\end{syntax}
%Sets the \meta{seq var} to the result of placing the items of the
%\meta{seq var} in a random order. Each item is (roughly) as likely
@@ -5810,23 +5810,23 @@ Reverses the order of the items stored in the \meta{sequence}.
\section{Working with the Contents of Sequences}
-\begin{function}{\SeqVarCount}
+\begin{function}{\seqVarCount}
\begin{syntax}
-\cs{SeqVarCount} \meta{sequence}
+\cs{seqVarCount} \meta{sequence}
\end{syntax}
Returns the number of items in the \meta{sequence}
as an \meta{integer denotation}. The total number of items
in a \meta{sequence} includes those which are empty and duplicates,
\emph{i.e.} every item in a \meta{sequence} is unique.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,three,four}
-\SeqVarCount \lTmpaSeq
+\seqSetFromClist \lTmpaSeq {one,two,three,four}
+\seqVarCount \lTmpaSeq
\end{demohigh}
\end{function}
-\begin{function}{\SeqVarItem}
+\begin{function}{\seqVarItem}
\begin{syntax}
-\cs{SeqVarItem} \meta{sequence} \Arg{integer expression}
+\cs{seqVarItem} \meta{sequence} \Arg{integer expression}
\end{syntax}
Indexing items in the \meta{sequence} from $1$ at the top (left), this
function evaluates the \meta{integer expression} and returns the
@@ -5834,11 +5834,11 @@ appropriate item from the sequence. If the
\meta{integer expression} is negative, indexing occurs from the
bottom (right) of the sequence. If the \meta{integer expression}
is larger than the number of items in the \meta{sequence} (as
-calculated by \cs{SeqVarCount}) then the function returns nothing.
+calculated by \cs{seqVarCount}) then the function returns nothing.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,three,four}
-\TlSet \lTmpaTl {\SeqVarItem \lTmpaSeq {3}}
-\TlUse \lTmpaTl
+\seqSetFromClist \lTmpaSeq {one,two,three,four}
+\tlSet \lTmpaTl {\seqVarItem \lTmpaSeq {3}}
+\tlUse \lTmpaTl
\end{demohigh}
%\begin{texnote}
%The result is returned within the \tn{unexpanded}
@@ -5848,18 +5848,18 @@ calculated by \cs{SeqVarCount}) then the function returns nothing.
%\end{texnote}
\end{function}
-\begin{function}{\SeqVarRandItem}
+\begin{function}{\seqVarRandItem}
\begin{syntax}
-\cs{SeqVarRandItem} \meta{seq var}
+\cs{seqVarRandItem} \meta{seq var}
\end{syntax}
Selects a pseudo-random item of the \meta{sequence}. If the
\meta{sequence} is empty the result is empty.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two,three,four,five,six}
-\TlSet \lTmpaTl {\SeqVarRandItem \lTmpaSeq}
-\TlUse \lTmpaTl
-\TlSet \lTmpaTl {\SeqVarRandItem \lTmpaSeq}
-\TlUse \lTmpaTl
+\seqSetFromClist \lTmpaSeq {one,two,three,four,five,six}
+\tlSet \lTmpaTl {\seqVarRandItem \lTmpaSeq}
+\tlUse \lTmpaTl
+\tlSet \lTmpaTl {\seqVarRandItem \lTmpaSeq}
+\tlUse \lTmpaTl
\end{demohigh}
%This is not available in older versions of \XeTeX{}.
%\begin{texnote}
@@ -5879,9 +5879,9 @@ intended to be mixed with the general ordered data functions detailed
in the previous section: a sequence should either be used as an
ordered data type or as a stack, but not in both ways.
-\begin{function}{\SeqGet}
+\begin{function}{\seqGet}
\begin{syntax}
-\cs{SeqGet} \meta{sequence} \meta{token list variable}
+\cs{seqGet} \meta{sequence} \meta{token list variable}
\end{syntax}
Reads the top item from a \meta{sequence} into the
\meta{token list variable} without removing it from the
@@ -5889,17 +5889,17 @@ Reads the top item from a \meta{sequence} into the
If \meta{sequence} is empty the \meta{token list variable} is set to
the special marker \cs{qNoValue}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqGet \lTmpaSeq \lTmpaTl
-\TlUse \lTmpaTl
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqGet \lTmpaSeq \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\SeqGetT,\SeqGetF,\SeqGetTF}
+\begin{function}{\seqGetT,\seqGetF,\seqGetTF}
\begin{syntax}
-\cs{SeqGetT} \meta{sequence} \meta{token list variable} \Arg{true code}
-\cs{SeqGetF} \meta{sequence} \meta{token list variable} \Arg{false code}
-\cs{SeqGetTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{seqGetT} \meta{sequence} \meta{token list variable} \Arg{true code}
+\cs{seqGetF} \meta{sequence} \meta{token list variable} \Arg{false code}
+\cs{seqGetTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{sequence} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -5908,31 +5908,31 @@ not defined in this case and should not be relied upon. If the
\meta{sequence} in the \meta{token list variable} without removing it from
the \meta{sequence}. The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqGetTF \lTmpaSeq \lTmpaTl {\Return{Yes}} {\Return{No}}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqGetTF \lTmpaSeq \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPop}
+\begin{function}{\seqPop}
\begin{syntax}
-\cs{SeqPop} \meta{sequence} \meta{token list variable}
+\cs{seqPop} \meta{sequence} \meta{token list variable}
\end{syntax}
Pops the top item from a \meta{sequence} into the
\meta{token list variable}. the \meta{token list variable} is assigned locally.
If \meta{sequence} is empty the \meta{token list variable} is set to
the special marker \cs{qNoValue}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqPop \lTmpaSeq \lTmpaTl
-\SeqVarJoin \lTmpaSeq {,}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqPop \lTmpaSeq \lTmpaTl
+\seqVarJoin \lTmpaSeq {,}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPopT,\SeqPopF,\SeqPopTF}
+\begin{function}{\seqPopT,\seqPopF,\seqPopTF}
\begin{syntax}
-\cs{SeqPopT} \meta{sequence} \meta{token list variable} \Arg{true code}
-\cs{SeqPopF} \meta{sequence} \meta{token list variable} \Arg{false code}
-\cs{SeqPopTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{seqPopT} \meta{sequence} \meta{token list variable} \Arg{true code}
+\cs{seqPopF} \meta{sequence} \meta{token list variable} \Arg{false code}
+\cs{seqPopTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{sequence} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -5941,21 +5941,21 @@ not defined in this case and should not be relied upon. If the
in the \meta{token list variable}, \emph{i.e.} removes the item from the
\meta{sequence}. The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\SeqPopTF \cEmptySeq \lTmpaTl {\Return{Yes}} {\Return{No}}
+\seqPopTF \cEmptySeq \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPush}
+\begin{function}{\seqPush}
\begin{syntax}
-\cs{SeqPush} \meta{sequence} \Arg{item}
+\cs{seqPush} \meta{sequence} \Arg{item}
\end{syntax}
Adds the \Arg{item} to the top of the \meta{sequence}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqPush \lTmpaSeq {one}
-\SeqVarJoin \lTmpaSeq {|}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqPush \lTmpaSeq {one}
+\seqVarJoin \lTmpaSeq {|}
\end{demohigh}
-You can only push one item to the \meta{sequence} with \cs{SeqPush},
+You can only push one item to the \meta{sequence} with \cs{seqPush},
which is different from \cs{ClistPush}.
\end{function}
@@ -5966,9 +5966,9 @@ For implementation reasons, the actions at the left of the sequence are
faster than those acting on the right. These functions all assign the
recovered material locally.
-\begin{function}{\SeqGetLeft}
+\begin{function}{\seqGetLeft}
\begin{syntax}
-\cs{SeqGetLeft} \meta{sequence} \meta{token list variable}
+\cs{seqGetLeft} \meta{sequence} \meta{token list variable}
\end{syntax}
Stores the left-most item from a \meta{sequence} in the
\meta{token list variable} without removing it from the
@@ -5976,17 +5976,17 @@ Stores the left-most item from a \meta{sequence} in the
If \meta{sequence} is empty the \meta{token list variable}
is set to the special marker \cs{qNoValue}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqGetLeft \lTmpaSeq \lTmpaTl
-\TlUse \lTmpaTl
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqGetLeft \lTmpaSeq \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\SeqGetLeftT,\SeqGetLeftF,\SeqGetLeftTF}
+\begin{function}{\seqGetLeftT,\seqGetLeftF,\seqGetLeftTF}
\begin{syntax}
-\cs{SeqGetLeftT} \meta{sequence} \meta{token list variable} \Arg{true code}
-\cs{SeqGetLeftF} \meta{sequence} \meta{token list variable} \Arg{false code}
-\cs{SeqGetLeftTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{seqGetLeftT} \meta{sequence} \meta{token list variable} \Arg{true code}
+\cs{seqGetLeftF} \meta{sequence} \meta{token list variable} \Arg{false code}
+\cs{seqGetLeftTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{sequence} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -5997,14 +5997,14 @@ in the \meta{token list variable} without removing it from the
\meta{sequence}, then leaves the \meta{true code} in the input stream.
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqGetLeftTF \lTmpaSeq \lTmpaTl {\Return{Yes}} {\Return{No}}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqGetLeftTF \lTmpaSeq \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqGetRight}
+\begin{function}{\seqGetRight}
\begin{syntax}
-\cs{SeqGetRight} \meta{sequence} \meta{token list variable}
+\cs{seqGetRight} \meta{sequence} \meta{token list variable}
\end{syntax}
Stores the right-most item from a \meta{sequence} in the
\meta{token list variable} without removing it from the
@@ -6012,17 +6012,17 @@ Stores the right-most item from a \meta{sequence} in the
If \meta{sequence} is empty the \meta{token list variable}
is set to the special marker \cs{qNoValue}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqGetRight \lTmpaSeq \lTmpaTl
-\TlUse \lTmpaTl
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqGetRight \lTmpaSeq \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\SeqGetRightT,\SeqGetRightF,\SeqGetRightTF}
+\begin{function}{\seqGetRightT,\seqGetRightF,\seqGetRightTF}
\begin{syntax}
-\cs{SeqGetRightT} \meta{sequence} \meta{token list variable} \Arg{true code}
-\cs{SeqGetRightF} \meta{sequence} \meta{token list variable} \Arg{false code}
-\cs{SeqGetRightTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{seqGetRightT} \meta{sequence} \meta{token list variable} \Arg{true code}
+\cs{seqGetRightF} \meta{sequence} \meta{token list variable} \Arg{false code}
+\cs{seqGetRightTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{sequence} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -6033,14 +6033,14 @@ in the \meta{token list variable} without removing it from the
\meta{sequence}, then leaves the \meta{true code} in the input stream.
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqGetRightTF \lTmpaSeq \lTmpaTl {\Return{Yes}} {\Return{No}}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqGetRightTF \lTmpaSeq \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPopLeft}
+\begin{function}{\seqPopLeft}
\begin{syntax}
-\cs{SeqPopLeft} \meta{sequence} \meta{token list variable}
+\cs{seqPopLeft} \meta{sequence} \meta{token list variable}
\end{syntax}
Pops the left-most item from a \meta{sequence} into the
\meta{token list variable}, \emph{i.e.} removes the item from the
@@ -6049,17 +6049,17 @@ The assignment of the \meta{token list variable} is local.
If \meta{sequence} is empty the \meta{token list variable}
is set to the special marker \cs{qNoValue}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqPopLeft \lTmpaSeq \lTmpaTl
-\SeqVarJoin \lTmpaSeq {,}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqPopLeft \lTmpaSeq \lTmpaTl
+\seqVarJoin \lTmpaSeq {,}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPopLeftT,\SeqPopLeftF,\SeqPopLeftTF}
+\begin{function}{\seqPopLeftT,\seqPopLeftF,\seqPopLeftTF}
\begin{syntax}
-\cs{SeqPopLeftT} \meta{sequence} \meta{token list variable} \Arg{true code}
-\cs{SeqPopLeftF} \meta{sequence} \meta{token list variable} \Arg{false code}
-\cs{SeqPopLeftTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{seqPopLeftT} \meta{sequence} \meta{token list variable} \Arg{true code}
+\cs{seqPopLeftF} \meta{sequence} \meta{token list variable} \Arg{false code}
+\cs{seqPopLeftTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{sequence} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -6069,13 +6069,13 @@ in the \meta{token list variable}, \emph{i.e.} removes the item from the
\meta{sequence}, then leaves the \meta{true code} in the input stream.
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\SeqPopLeftTF \cEmptySeq \lTmpaTl {\Return{Yes}} {\Return{No}}
+\seqPopLeftTF \cEmptySeq \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPopRight}
+\begin{function}{\seqPopRight}
\begin{syntax}
-\cs{SeqPopRight} \meta{sequence} \meta{token list variable}
+\cs{seqPopRight} \meta{sequence} \meta{token list variable}
\end{syntax}
Pops the right-most item from a \meta{sequence} into the
\meta{token list variable}, \emph{i.e.} removes the item from the
@@ -6084,17 +6084,17 @@ The assignment of the \meta{token list variable} is local.
If \meta{sequence} is empty the \meta{token list variable}
is set to the special marker \cs{qNoValue}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {two,three,four}
-\SeqPopRight \lTmpaSeq \lTmpaTl
-\SeqVarJoin \lTmpaSeq {,}
+\seqSetFromClist \lTmpaSeq {two,three,four}
+\seqPopRight \lTmpaSeq \lTmpaTl
+\seqVarJoin \lTmpaSeq {,}
\end{demohigh}
\end{function}
-\begin{function}{\SeqPopRightT,\SeqPopRightF,\SeqPopRightTF}
+\begin{function}{\seqPopRightT,\seqPopRightF,\seqPopRightTF}
\begin{syntax}
-\cs{SeqPopRightT} \meta{sequence} \meta{token list variable} \Arg{true code}
-\cs{SeqPopRightF} \meta{sequence} \meta{token list variable} \Arg{false code}
-\cs{SeqPopRightTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{seqPopRightT} \meta{sequence} \meta{token list variable} \Arg{true code}
+\cs{seqPopRightF} \meta{sequence} \meta{token list variable} \Arg{false code}
+\cs{seqPopRightTF} \meta{sequence} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{sequence} is empty, leaves the \meta{false code} in the
input stream. The value of the \meta{token list variable} is
@@ -6104,7 +6104,7 @@ in the \meta{token list variable}, \emph{i.e.} removes the item from the
\meta{sequence}, then leaves the \meta{true code} in the input stream.
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\SeqPopRightTF \cEmptySeq \lTmpaTl {\Return{Yes}} {\Return{No}}
+\seqPopRightTF \cEmptySeq \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
@@ -6114,21 +6114,21 @@ The \meta{token list variable} is assigned locally.
%local assignments made by the \meta{function} or \meta{code} discussed
%below remain in effect after the loop.
-%\begin{function}{\SeqVarMapFunction}
+%\begin{function}{\seqVarMapFunction}
%\begin{syntax}
-%\cs{SeqVarMapFunction} \meta{sequence} \meta{function}
+%\cs{seqVarMapFunction} \meta{sequence} \meta{function}
%\end{syntax}
%Applies \meta{function} to every \meta{item} stored in the
%\meta{sequence}. The \meta{function} will receive one argument for
%each iteration. The \meta{items} are returned from left to right.
-%To pass further arguments to the \meta{function}, see \cs{SeqVarMapTokens}.
-%The function \cs{SeqVarMapInline} is faster than
-%\cs{SeqVarMapFunction} for sequences with more than about $10$ items.
+%To pass further arguments to the \meta{function}, see \cs{seqVarMapTokens}.
+%The function \cs{seqVarMapInline} is faster than
+%\cs{seqVarMapFunction} for sequences with more than about $10$ items.
%\end{function}
-\begin{function}{\SeqVarMapInline}
+\begin{function}{\seqVarMapInline}
\begin{syntax}
-\cs{SeqVarMapInline} \meta{sequence} \Arg{inline function}
+\cs{seqVarMapInline} \meta{sequence} \Arg{inline function}
\end{syntax}
Applies \meta{inline function} to every \meta{item} stored
within the \meta{sequence}. The \meta{inline function} should
@@ -6136,35 +6136,35 @@ consist of code which will receive the \meta{item} as \verb|#1|.
The \meta{items} are returned from left to right.
\begin{demohigh}
\IgnoreSpacesOn
-\SeqSetFromClist \lTmpkSeq {one,two,three}
-\TlClear \lTmpaTl
-\SeqVarMapInline \lTmpkSeq {
- \TlPutRight \lTmpaTl {(#1)}
+\seqSetFromClist \lTmpkSeq {one,two,three}
+\tlClear \lTmpaTl
+\seqVarMapInline \lTmpkSeq {
+ \tlPutRight \lTmpaTl {(#1)}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\SeqVarMapTokens}
+%\begin{function}{\seqVarMapTokens}
%\begin{syntax}
-%\cs{SeqVarMapTokens} \meta{sequence} \Arg{code}
+%\cs{seqVarMapTokens} \meta{sequence} \Arg{code}
%\end{syntax}
-%Analogue of \cs{SeqVarMapFunction} which maps several tokens
+%Analogue of \cs{seqVarMapFunction} which maps several tokens
%instead of a single function. The \meta{code} receives each item in
%the \meta{sequence} as a trailing brace group. For instance,
%\begin{verbatim}
-%\SeqVarMapTokens \lMySeq { \PrgReplicate { 2 } }
+%\seqVarMapTokens \lMySeq { \prgReplicate { 2 } }
%\end{verbatim}
%expands to twice each item in the \meta{sequence}: for each item in
%\verb|\l_my_seq| the function \cs{PrgReplicate} receives \verb|2| and
%\meta{item} as its two arguments. The function
-%\cs{SeqVarMapInline} is typically faster but it is not expandable.
+%\cs{seqVarMapInline} is typically faster but it is not expandable.
%\end{function}
-\begin{function}{\SeqVarMapVariable}
+\begin{function}{\seqVarMapVariable}
\begin{syntax}
-\cs{SeqVarMapVariable} \meta{sequence} \meta{variable} \Arg{code}
+\cs{seqVarMapVariable} \meta{sequence} \meta{variable} \Arg{code}
\end{syntax}
Stores each \meta{item} of the \meta{sequence} in turn in the (token
list) \meta{variable} and applies the \meta{code}. The \meta{code}
@@ -6175,19 +6175,19 @@ or its original value if the \meta{sequence} is empty. The
\meta{items} are returned from left to right.
\begin{demohigh}
\IgnoreSpacesOn
-\IntZero \lTmpaInt
-\SeqSetFromClist \lTmpaSeq {1,3,7}
-\SeqVarMapVariable \lTmpaSeq \lTmpiTl {
- \IntAdd \lTmpaInt {\lTmpiTl*\lTmpiTl}
+\intZero \lTmpaInt
+\seqSetFromClist \lTmpaSeq {1,3,7}
+\seqVarMapVariable \lTmpaSeq \lTmpiTl {
+ \intAdd \lTmpaInt {\lTmpiTl*\lTmpiTl}
}
-\IntUse \lTmpaInt
+\intUse \lTmpaInt
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\SeqVarMapIndexedFunction}
+%\begin{function}{\seqVarMapIndexedFunction}
%\begin{syntax}
-%\cs{SeqVarMapIndexedFunction} \meta{seq var} \meta{function}
+%\cs{seqVarMapIndexedFunction} \meta{seq var} \meta{function}
%\end{syntax}
%Applies \meta{function} to every entry in the \meta{sequence
%variable}. The \meta{function} should have signature |:nn|. It
@@ -6195,9 +6195,9 @@ or its original value if the \meta{sequence} is empty. The
%\verb|1| for the first entry, then \verb|2| and so on) and the \meta{item}.
%\end{function}
-%\begin{function}{\SeqVarMapIndexedInline}
+%\begin{function}{\seqVarMapIndexedInline}
%\begin{syntax}
-%\cs{SeqVarMapIndexedInline} \meta{seq var} \Arg{inline function}
+%\cs{seqVarMapIndexedInline} \meta{seq var} \Arg{inline function}
%\end{syntax}
%Applies \meta{inline function} to every entry in the \meta{sequence
%variable}. The \meta{inline function} should consist of code which
@@ -6205,9 +6205,9 @@ or its original value if the \meta{sequence} is empty. The
%and so on) as \verb|#1| and the \meta{item} as \verb|#2|.
%\end{function}
-%\begin{function}{\SeqMapBreak}
+%\begin{function}{\seqMapBreak}
%\begin{syntax}
-%\cs{SeqMapBreak}
+%\cs{seqMapBreak}
%\end{syntax}
%Used to terminate a seq map function before all
%entries in the \meta{sequence} have been processed. This
@@ -6232,9 +6232,9 @@ or its original value if the \meta{sequence} is empty. The
%\end{texnote}
%\end{function}
-%\begin{function}{\SeqMapBreakDo}
+%\begin{function}{\seqMapBreakDo}
%\begin{syntax}
-%\cs{SeqMapBreakDo} \Arg{code}
+%\cs{seqMapBreakDo} \Arg{code}
%\end{syntax}
%Used to terminate a seq map function before all
%entries in the \meta{sequence} have been processed, inserting
@@ -6296,49 +6296,49 @@ or its original value if the \meta{sequence} is empty. The
\section{Sequence Conditionals}
-\begin{function}{\SeqIfExist,\SeqIfExistT,\SeqIfExistF,\SeqIfExistTF}
+\begin{function}{\seqIfExist,\seqIfExistT,\seqIfExistF,\seqIfExistTF}
\begin{syntax}
-\cs{SeqIfExist} \meta{sequence}
-\cs{SeqIfExistT} \meta{sequence} \Arg{true code}
-\cs{SeqIfExistF} \meta{sequence} \Arg{false code}
-\cs{SeqIfExistTF} \meta{sequence} \Arg{true code} \Arg{false code}
+\cs{seqIfExist} \meta{sequence}
+\cs{seqIfExistT} \meta{sequence} \Arg{true code}
+\cs{seqIfExistF} \meta{sequence} \Arg{false code}
+\cs{seqIfExistTF} \meta{sequence} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{sequence} is currently defined. This does not
check that the \meta{sequence} really is a sequence variable.
\begin{demohigh}
-\SeqIfExistTF \lTmpaSeq {\Return{Yes}} {\Return{No}}
-\SeqIfExistTF \lFooUndefinedSeq {\Return{Yes}} {\Return{No}}
+\seqIfExistTF \lTmpaSeq {\prgReturn{Yes}} {\prgReturn{No}}
+\seqIfExistTF \lFooUndefinedSeq {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqVarIfEmpty,\SeqVarIfEmptyT,\SeqVarIfEmptyF,\SeqVarIfEmptyTF}
+\begin{function}{\seqVarIfEmpty,\seqVarIfEmptyT,\seqVarIfEmptyF,\seqVarIfEmptyTF}
\begin{syntax}
-\cs{SeqVarIfEmpty} \meta{sequence}
-\cs{SeqVarIfEmptyT} \meta{sequence} \Arg{true code}
-\cs{SeqVarIfEmptyF} \meta{sequence} \Arg{false code}
-\cs{SeqVarIfEmptyTF} \meta{sequence} \Arg{true code} \Arg{false code}
+\cs{seqVarIfEmpty} \meta{sequence}
+\cs{seqVarIfEmptyT} \meta{sequence} \Arg{true code}
+\cs{seqVarIfEmptyF} \meta{sequence} \Arg{false code}
+\cs{seqVarIfEmptyTF} \meta{sequence} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{sequence} is empty (containing no items).
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two}
-\SeqVarIfEmptyTF \lTmpaSeq {\Return{Empty}} {\Return{NonEmpty}}
-\SeqClear \lTmpaSeq
-\SeqVarIfEmptyTF \lTmpaSeq {\Return{Empty}} {\Return{NonEmpty}}
+\seqSetFromClist \lTmpaSeq {one,two}
+\seqVarIfEmptyTF \lTmpaSeq {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\seqClear \lTmpaSeq
+\seqVarIfEmptyTF \lTmpaSeq {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\SeqVarIfIn,\SeqVarIfInT,\SeqVarIfInF,\SeqVarIfInTF}
+\begin{function}{\seqVarIfIn,\seqVarIfInT,\seqVarIfInF,\seqVarIfInTF}
\begin{syntax}
-\cs{SeqVarIfIn} \meta{sequence} \Arg{item}
-\cs{SeqVarIfInT} \meta{sequence} \Arg{item} \Arg{true code}
-\cs{SeqVarIfInF} \meta{sequence} \Arg{item} \Arg{false code}
-\cs{SeqVarIfInTF} \meta{sequence} \Arg{item} \Arg{true code} \Arg{false code}
+\cs{seqVarIfIn} \meta{sequence} \Arg{item}
+\cs{seqVarIfInT} \meta{sequence} \Arg{item} \Arg{true code}
+\cs{seqVarIfInF} \meta{sequence} \Arg{item} \Arg{false code}
+\cs{seqVarIfInTF} \meta{sequence} \Arg{item} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{item} is present in the \meta{sequence}.
\begin{demohigh}
-\SeqSetFromClist \lTmpaSeq {one,two}
-\SeqVarIfInTF \lTmpaSeq {one} {\Return{Yes}} {\Return{Not}}
-\SeqVarIfInTF \lTmpaSeq {three} {\Return{Yes}} {\Return{Not}}
+\seqSetFromClist \lTmpaSeq {one,two}
+\seqVarIfInTF \lTmpaSeq {one} {\prgReturn{Yes}} {\prgReturn{Not}}
+\seqVarIfInTF \lTmpaSeq {three} {\prgReturn{Yes}} {\prgReturn{Not}}
\end{demohigh}
\end{function}
@@ -6348,14 +6348,14 @@ Tests if the \meta{item} is present in the \meta{sequence}.
an unordered list of entries each of which consists of a \meta{key} and
an associated \meta{value}. The \meta{key} and \meta{value} may both
be any \meta{balanced text}, the \meta{key} is processed using
-\cs{TlToStr}, meaning that category codes are ignored. It is possible to
+\cs{tlToStr}, meaning that category codes are ignored. It is possible to
map functions to property lists such that the function is applied to every
key--value pair within the list.
Each entry in a property list must have a unique \meta{key}: if an entry is
added to a property list which already contains the \meta{key} then the new
entry overwrites the existing one. The \meta{keys} are compared on a
-string basis, using the same method as \cs{StrIfEq}.
+string basis, using the same method as \cs{strIfEq}.
%Property lists are intended for storing key-based information for use within
%code. This is in contrast to key--value lists, which are a form of
@@ -6383,43 +6383,43 @@ code and so should only be used for short-term storage.
\section{Creating and Using Property Lists}
-\begin{function}{\PropNew}
+\begin{function}{\propNew}
\begin{syntax}
-\cs{PropNew} \meta{property list}
+\cs{propNew} \meta{property list}
\end{syntax}
Creates a new \meta{property list} or raises an error if the name is
already taken. The declaration is global. The \meta{property list}
initially contains no entries.
\begin{codehigh}
-\PropNew \lFooSomeProp
+\propNew \lFooSomeProp
\end{codehigh}
\end{function}
-\begin{function}{\PropConstFromKeyval}
+\begin{function}{\propConstFromKeyval}
\begin{syntax}
-\cs{PropConstFromKeyval} \meta{prop var}
-\{
-~ \meta{key1} \verb|=| \meta{value1} \verb|,|
-~ \meta{key2} \verb|=| \meta{value2} \verb|,| $\cdots$
-\}
+\cs{propConstFromKeyval} \meta{prop var}
+~ \{
+~ ~ \meta{key1} \verb|=| \meta{value1} \verb|,|
+~ ~ \meta{key2} \verb|=| \meta{value2} \verb|,| $\cdots$
+~ \}
\end{syntax}
Creates a new constant \meta{prop var} or raises an error if the
name is already taken. The \meta{prop var} is set globally to
contain key--value pairs given in the second argument, processed in
-the way described for \cs{PropSetFromKeyval}. If duplicate
+the way described for \cs{propSetFromKeyval}. If duplicate
keys appear only the last of the values is kept.
This function correctly detects the \verb|=| and \verb|,| signs provided they
have the standard category code $12$ or they are active.
\begin{codehigh}
-\PropConstFromKeyval \cFooSomeProp {key1=one,key2=two,key3=three}
+\propConstFromKeyval \cFooSomeProp {key1=one,key2=two,key3=three}
\end{codehigh}
%Notice that in contrast to most keyval lists (\emph{e.g.} those in
%\pkg{l3keys}), each key here \emph{must} be followed with an \texttt{=} sign.
\end{function}
-\begin{function}{\PropToKeyval}
+\begin{function}{\propToKeyval}
\begin{syntax}
-\cs{PropToKeyval} \meta{property list}
+\cs{propToKeyval} \meta{property list}
\end{syntax}
Returns the \meta{property list} in a key--value notation. Keep in mind
that a \meta{property list} is \emph{unordered}, while key--value interfaces
@@ -6431,37 +6431,37 @@ don't necessarily are, so this can't be used for arbitrary interfaces.
%It also needs exactly two steps of expansion.
%\end{texnote}
\begin{codehigh}
-\PropToKeyval \lTmpaProp
+\propToKeyval \lTmpaProp
\end{codehigh}
\end{function}
\section{Viewing Property Lists}
-\begin{function}{\PropVarLog}
+\begin{function}{\propVarLog}
\begin{syntax}
-\cs{PropVarLog} \meta{property list}
+\cs{propVarLog} \meta{property list}
\end{syntax}
Writes the entries in the \meta{property list} in the log file.
\begin{codehigh}
-\PropVarLog \lTmpaProp
+\propVarLog \lTmpaProp
\end{codehigh}
\end{function}
-\begin{function}{\PropVarShow}
+\begin{function}{\propVarShow}
\begin{syntax}
-\cs{PropVarShow} \meta{property list}
+\cs{propVarShow} \meta{property list}
\end{syntax}
Displays the entries in the \meta{property list} in the terminal.
\begin{codehigh}
-\PropVarShow \lTmpaProp
+\propVarShow \lTmpaProp
\end{codehigh}
\end{function}
\section{Setting Property Lists}
-\begin{function}{\PropSetFromKeyval}
+\begin{function}{\propSetFromKeyval}
\begin{syntax}
-\cs{PropSetFromKeyval} \meta{prop var}
+\cs{propSetFromKeyval} \meta{prop var}
\{
~ \meta{key1} \verb|=| \meta{value1} \verb|,|
~ \meta{key2} \verb|=| \meta{value2} \verb|,| $\cdots$
@@ -6474,101 +6474,101 @@ Spaces are trimmed around every \meta{key} and every \meta{value},
and if the result of trimming spaces consists of a single brace
group then a set of outer braces is removed. This enables both the
\meta{key} and the \meta{value} to contain spaces, commas or equal
-signs. The \meta{key} is then processed by \cs{TlToStr}.
+signs. The \meta{key} is then processed by \cs{tlToStr}.
This function correctly detects the \verb|=| and \verb|,| signs provided they
have the standard category code $12$ or they are active.
\begin{codehigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
\end{codehigh}
%Notice that in contrast to most keyval lists (\emph{e.g.} those in
%\pkg{l3keys}), each key here \emph{must} be followed with an \texttt{=} sign.
\end{function}
-\begin{function}{\PropSetEq}
+\begin{function}{\propSetEq}
\begin{syntax}
-\cs{PropSetEq} \meta{property list_1} \meta{property list_2}
+\cs{propSetEq} \meta{property list_1} \meta{property list_2}
\end{syntax}
Sets the content of \meta{property list_1} equal to that of
\meta{property list_2}.
\begin{codehigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropSetEq \lTmpbProp \lTmpaProp
-\PropVarLog \lTmpbProp
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propSetEq \lTmpbProp \lTmpaProp
+\propVarLog \lTmpbProp
\end{codehigh}
\end{function}
-\begin{function}{\PropClear}
+\begin{function}{\propClear}
\begin{syntax}
-\cs{PropClear} \meta{property list}
+\cs{propClear} \meta{property list}
\end{syntax}
Clears all entries from the \meta{property list}.
\begin{codehigh}
-\PropClear \lTmpaProp
+\propClear \lTmpaProp
\end{codehigh}
\end{function}
-\begin{function}{\PropClearNew}
+\begin{function}{\propClearNew}
\begin{syntax}
-\cs{PropClearNew} \meta{property list}
+\cs{propClearNew} \meta{property list}
\end{syntax}
-Ensures that the \meta{property list} exists globally by applying \cs{PropNew}
-if necessary, then applies \cs{PropClear} to leave the list empty.
+Ensures that the \meta{property list} exists globally by applying \cs{propNew}
+if necessary, then applies \cs{propClear} to leave the list empty.
\begin{codehigh}
-\PropClearNew \lFooSomeProp
+\propClearNew \lFooSomeProp
\end{codehigh}
\end{function}
-\begin{function}{\PropConcat}
+\begin{function}{\propConcat}
\begin{syntax}
-\cs{PropConcat} \meta{prop var_1} \meta{prop var_2} \meta{prop var_3}
+\cs{propConcat} \meta{prop var_1} \meta{prop var_2} \meta{prop var_3}
\end{syntax}
Combines the key--value pairs of \meta{prop var_2} and
\meta{prop var_3}, and saves the result in \meta{prop var_1}. If a
key appears in both \meta{prop var_2} and \meta{prop var_3} then the
last value, namely the value in \meta{prop var_3} is kept.
\begin{codehigh}
-\PropSetFromKeyval \lTmpbProp {key1=one,key2=two}
-\PropSetFromKeyval \lTmpcProp {key3=three,key4=four}
-\PropConcat \lTmpaProp \lTmpbProp \lTmpcProp
-\PropVarLog \lTmpaProp
+\propSetFromKeyval \lTmpbProp {key1=one,key2=two}
+\propSetFromKeyval \lTmpcProp {key3=three,key4=four}
+\propConcat \lTmpaProp \lTmpbProp \lTmpcProp
+\propVarLog \lTmpaProp
\end{codehigh}
\end{function}
-\begin{function}{\PropPut}
+\begin{function}{\propPut}
\begin{syntax}
-\cs{PropPut} \meta{property list} \Arg{key} \Arg{value}
+\cs{propPut} \meta{property list} \Arg{key} \Arg{value}
\end{syntax}
Adds an entry to the \meta{property list} which may be accessed
using the \meta{key} and which has \meta{value}. If the \meta{key}
is already present in the \meta{property list}, the existing entry
is overwritten by the new \meta{value}. Both the \meta{key} and
\meta{value} may contain any \meta{balanced text}. The \meta{key} is
-stored after processing with \cs{TlToStr}, meaning that category
+stored after processing with \cs{tlToStr}, meaning that category
codes are ignored.
\begin{codehigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
-\PropPut \lTmpaProp {key1} {newone}
-\PropVarLog \lTmpaProp
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propPut \lTmpaProp {key1} {newone}
+\propVarLog \lTmpaProp
\end{codehigh}
\end{function}
-\begin{function}{\PropPutIfNew}
+\begin{function}{\propPutIfNew}
\begin{syntax}
-\cs{PropPutIfNew} \meta{property list} \Arg{key} \Arg{value}
+\cs{propPutIfNew} \meta{property list} \Arg{key} \Arg{value}
\end{syntax}
If the \meta{key} is present in the \meta{property list} then no
action is taken. Otherwise, a new entry is added as described for
-\cs{PropPut}.
+\cs{propPut}.
\begin{codehigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
-\PropPutIfNew \lTmpaProp {key1} {newone}
-\PropVarLog \lTmpaProp
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propPutIfNew \lTmpaProp {key1} {newone}
+\propVarLog \lTmpaProp
\end{codehigh}
\end{function}
-\begin{function}{\PropPutFromKeyval}
+\begin{function}{\propPutFromKeyval}
\begin{syntax}
-\cs{PropPutFromKeyval} \meta{prop var}
+\cs{propPutFromKeyval} \meta{prop var}
\{
~ \meta{key1} \verb|=| \meta{value1} \verb|,|
~ \meta{key2} \verb|=| \meta{value2} \verb|,| $\cdots$
@@ -6576,28 +6576,28 @@ action is taken. Otherwise, a new entry is added as described for
\end{syntax}
Updates the \meta{prop var} by adding entries for each key--value
pair given in the second argument. The addition is done through
-\cs{PropPut}, hence if the \meta{prop var} already contains
+\cs{propPut}, hence if the \meta{prop var} already contains
some of the keys, the corresponding values are discarded and
replaced by those given in the key--value list. If duplicate keys
appear in the key--value list then only the last of the values is kept.
\begin{codehigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
-\PropPutFromKeyval \lTmpaProp {key1=newone,key3=three}
-\PropVarLog \lTmpaProp
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propPutFromKeyval \lTmpaProp {key1=newone,key3=three}
+\propVarLog \lTmpaProp
\end{codehigh}
%The function is equivalent to storing the key--value pairs in a
-%temporary property variable using \cs{PropSetFromKeyval}, then
+%temporary property variable using \cs{propSetFromKeyval}, then
%combining \meta{prop var} with the temporary variable using
-%\cs{PropConcat}. In particular, the \meta{keys} and
+%\cs{propConcat}. In particular, the \meta{keys} and
%\meta{values} are space-trimmed and unbraced as described in
-%\cs{PropSetFromKeyval}. This function correctly detects
+%\cs{propSetFromKeyval}. This function correctly detects
%the \verb|=| and \verb|,| signs provided they
%have the standard category code $12$ or they are active.
\end{function}
-\begin{function}{\PropVarRemove}
+\begin{function}{\propVarRemove}
\begin{syntax}
-\cs{PropVarRemove} \meta{property list} \Arg{key}
+\cs{propVarRemove} \meta{property list} \Arg{key}
\end{syntax}
Removes the entry listed under \meta{key} from the
\meta{property list}. If the \meta{key} is
@@ -6605,37 +6605,37 @@ not found in the \meta{property list} no change occurs,
\emph{i.e} there is no need to test for the existence of a key before
deleting it.
\begin{codehigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropVarRemove \lTmpaProp {key2}
-\PropVarLog \lTmpaProp
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propVarRemove \lTmpaProp {key2}
+\propVarLog \lTmpaProp
\end{codehigh}
\end{function}
\section{Recovering Values from Property Lists}
-\begin{function}{\PropVarCount}
+\begin{function}{\propVarCount}
\begin{syntax}
-\cs{PropVarCount} \meta{property list}
+\cs{propVarCount} \meta{property list}
\end{syntax}
Returns the number of key--value pairs in the \meta{property list}
as an \meta{integer denotation}.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropVarCount \lTmpaProp
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propVarCount \lTmpaProp
\end{demohigh}
\end{function}
-\begin{function}{\PropVarItem}
+\begin{function}{\propVarItem}
\begin{syntax}
-\cs{PropVarItem} \meta{property list} \Arg{key}
+\cs{propVarItem} \meta{property list} \Arg{key}
\end{syntax}
Returns the \meta{value} corresponding to the \meta{key} in
the \meta{property list}. If the \meta{key} is missing,
nothing is returned.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\TlSet \lTmpaTl {\PropVarItem \lTmpaProp {key2}}
-\TlUse \lTmpaTl
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\tlSet \lTmpaTl {\propVarItem \lTmpaProp {key2}}
+\tlUse \lTmpaTl
\end{demohigh}
%\begin{texnote}
%This function is slower than the non-expandable analogue
@@ -6647,9 +6647,9 @@ nothing is returned.
%\end{texnote}
\end{function}
-\begin{function}{\PropGet}
+\begin{function}{\propGet}
\begin{syntax}
-\cs{PropGet} \meta{property list} \Arg{key} \meta{token list variable}
+\cs{propGet} \meta{property list} \Arg{key} \meta{token list variable}
\end{syntax}
Recovers the \meta{value} stored with \meta{key} from the \meta{property list},
and places this in the \meta{token list variable}.
@@ -6658,17 +6658,17 @@ If the \meta{key} is not found in the
to the special marker \cs{qNoValue}.
The assignment of the \meta{token list variable} is local.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropGet \lTmpaProp {key2} \lTmpaTl
-\TlUse \lTmpaTl
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propGet \lTmpaProp {key2} \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
\end{function}
-\begin{function}{\PropGetT,\PropGetF,\PropGetTF}
+\begin{function}{\propGetT,\propGetF,\propGetTF}
\begin{syntax}
-\cs{PropGetT} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code}
-\cs{PropGetF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{false code}
-\cs{PropGetTF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{propGetT} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code}
+\cs{propGetF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{false code}
+\cs{propGetTF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{key} is not present in the \meta{property list}, leaves
the \meta{false code} in the input stream. The value of the
@@ -6679,14 +6679,14 @@ not be relied upon. If the \meta{key} is present in the
\meta{property list}, then leaves the \meta{true code} in the input
stream. The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropGetTF \lTmpaProp {key2} \lTmpaTl {\Return{Yes}} {\Return{No}}
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propGetTF \lTmpaProp {key2} \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\PropPop}
+\begin{function}{\propPop}
\begin{syntax}
-\cs{PropPop} \meta{property list} \Arg{key} \meta{token list variable}
+\cs{propPop} \meta{property list} \Arg{key} \meta{token list variable}
\end{syntax}
Recovers the \meta{value} stored with \meta{key} from the \meta{property list},
and places this in the \meta{token list variable}.
@@ -6696,18 +6696,18 @@ to the special marker \cs{qNoValue}.
The \meta{key} and \meta{value} are then deleted from the property list.
The assignment of the \meta{token list variable} is local.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropPop \lTmpaProp {key2} \lTmpaTl
-Pop: \TlUse \lTmpaTl.
-Count: \PropVarCount \lTmpaProp.
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propPop \lTmpaProp {key2} \lTmpaTl
+Pop: \tlUse \lTmpaTl.
+Count: \propVarCount \lTmpaProp.
\end{demohigh}
\end{function}
-\begin{function}{\PropPopT,\PropPopF,\PropPopTF}
+\begin{function}{\propPopT,\propPopF,\propPopTF}
\begin{syntax}
-\cs{PropPopT} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code}
-\cs{PropPopF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{false code}
-\cs{PropPopTF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code} \Arg{false code}
+\cs{propPopT} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code}
+\cs{propPopF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{false code}
+\cs{propPopTF} \meta{property list} \Arg{key} \meta{token list variable} \Arg{true code} \Arg{false code}
\end{syntax}
If the \meta{key} is not present in the \meta{property list}, leaves
the \meta{false code} in the input stream. The value of the
@@ -6717,8 +6717,8 @@ the \meta{property list}, pops the corresponding \meta{value}
in the \meta{token list variable}, \emph{i.e.} removes the item from
The \meta{token list variable} is assigned locally.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
-\PropPopTF \lTmpaProp {key2} \lTmpaTl {\Return{Yes}} {\Return{No}}
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two,key3=three}
+\propPopTF \lTmpaProp {key2} \lTmpaTl {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
@@ -6728,9 +6728,9 @@ The \meta{token list variable} is assigned locally.
%local assignments made by the \meta{function} or \meta{code} discussed
%below remain in effect after the loop.
-%\begin{function}{\PropVarMapFunction}
+%\begin{function}{\propVarMapFunction}
%\begin{syntax}
-%\cs{PropVarMapFunction} \meta{property list} \meta{function}
+%\cs{propVarMapFunction} \meta{property list} \meta{function}
%\end{syntax}
%Applies \meta{function} to every \meta{entry} stored in the
%\meta{property list}. The \meta{function} receives two arguments for
@@ -6741,9 +6741,9 @@ The \meta{token list variable} is assigned locally.
%\cs{prop_map_tokens:Nn}.
%\end{function}
-\begin{function}{\PropVarMapInline}
+\begin{function}{\propVarMapInline}
\begin{syntax}
-\cs{PropVarMapInline} \meta{property list} \Arg{inline function}
+\cs{propVarMapInline} \meta{property list} \Arg{inline function}
\end{syntax}
Applies \meta{inline function} to every \meta{entry} stored
within the \meta{property list}. The \meta{inline function} should
@@ -6753,36 +6753,36 @@ The order in which \meta{entries} are returned is not defined and
should not be relied upon.
\begin{demohigh}
\IgnoreSpacesOn
-\PropSetFromKeyval \lTmpkProp {key1=one,key2=two,key3=three}
-\TlClear \lTmpaTl
-\PropVarMapInline \lTmpkProp {
- \TlPutRight \lTmpaTl {(#1=#2)}
+\propSetFromKeyval \lTmpkProp {key1=one,key2=two,key3=three}
+\tlClear \lTmpaTl
+\propVarMapInline \lTmpkProp {
+ \tlPutRight \lTmpaTl {(#1=#2)}
}
-\TlUse \lTmpaTl
+\tlUse \lTmpaTl
\IgnoreSpacesOff
\end{demohigh}
\end{function}
-%\begin{function}{\PropVarMapTokens}
+%\begin{function}{\propVarMapTokens}
%\begin{syntax}
-%\cs{PropVarMapTokens} \meta{property list} \Arg{code}
+%\cs{propVarMapTokens} \meta{property list} \Arg{code}
%\end{syntax}
-%Analogue of \cs{PropVarMapFunction} which maps several tokens
+%Analogue of \cs{propVarMapFunction} which maps several tokens
%instead of a single function. The \meta{code} receives each
%key--value pair in the \meta{property list} as two trailing brace
%groups. For instance,
%\begin{verbatim}
-%\PropVarMapTokens \lMyProp { \StrIfEqT { mykey } }
+%\propVarMapTokens \lMyProp { \strIfEqT { mykey } }
%\end{verbatim}
%expands to the value corresponding to \texttt{mykey}: for each
-%pair in \verb|\lMyProp| the function \cs{StrIfEqT} receives
+%pair in \verb|\lMyProp| the function \cs{strIfEqT} receives
%\texttt{mykey}, the \meta{key} and the \meta{value} as its three
-%arguments. For that specific task, \cs{PropVarItem} is faster.
+%arguments. For that specific task, \cs{propVarItem} is faster.
%\end{function}
-%\begin{function}{\PropMapBreak}
+%\begin{function}{\propMapBreak}
%\begin{syntax}
-%\cs{PropMapBreak}
+%\cs{propMapBreak}
%\end{syntax}
%Used to terminate a prop map function before all
%entries in the \meta{property list} have been processed. This
@@ -6807,9 +6807,9 @@ should not be relied upon.
%\end{texnote}
%\end{function}
-%\begin{function}{\PropMapBreakDo}
+%\begin{function}{\propMapBreakDo}
%\begin{syntax}
-%\cs{PropMapBreakDo} \Arg{code}
+%\cs{propMapBreakDo} \Arg{code}
%\end{syntax}
%Used to terminate a prop map function before all
%entries in the \meta{property list} have been processed, inserting
@@ -6837,54 +6837,54 @@ should not be relied upon.
\section{Property List Conditionals}
-\begin{function}{\PropIfExist,\PropIfExistT,\PropIfExistF,\PropIfExistTF}
+\begin{function}{\propIfExist,\propIfExistT,\propIfExistF,\propIfExistTF}
\begin{syntax}
-\cs{PropIfExist} \meta{property list}
-\cs{PropIfExistT} \meta{property list} \Arg{true code}
-\cs{PropIfExistF} \meta{property list} \Arg{false code}
-\cs{PropIfExistTF} \meta{property list} \Arg{true code} \Arg{false code}
+\cs{propIfExist} \meta{property list}
+\cs{propIfExistT} \meta{property list} \Arg{true code}
+\cs{propIfExistF} \meta{property list} \Arg{false code}
+\cs{propIfExistTF} \meta{property list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{property list} is currently defined. This does not
check that the \meta{property list} really is a property list variable.
\begin{demohigh}
-\PropIfExistTF \lTmpaProp {\Return{Yes}} {\Return{No}}
-\PropIfExistTF \lFooUndefinedProp {\Return{Yes}} {\Return{No}}
+\propIfExistTF \lTmpaProp {\prgReturn{Yes}} {\prgReturn{No}}
+\propIfExistTF \lFooUndefinedProp {\prgReturn{Yes}} {\prgReturn{No}}
\end{demohigh}
\end{function}
-\begin{function}{\PropVarIfEmpty,\PropVarIfEmptyT,\PropVarIfEmptyF,\PropVarIfEmptyTF}
+\begin{function}{\propVarIfEmpty,\propVarIfEmptyT,\propVarIfEmptyF,\propVarIfEmptyTF}
\begin{syntax}
-\cs{PropVarIfEmpty} \meta{property list}
-\cs{PropVarIfEmptyT} \meta{property list} \Arg{true code}
-\cs{PropVarIfEmptyF} \meta{property list} \Arg{false code}
-\cs{PropVarIfEmptyTF} \meta{property list} \Arg{true code} \Arg{false code}
+\cs{propVarIfEmpty} \meta{property list}
+\cs{propVarIfEmptyT} \meta{property list} \Arg{true code}
+\cs{propVarIfEmptyF} \meta{property list} \Arg{false code}
+\cs{propVarIfEmptyTF} \meta{property list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{property list} is empty (containing no entries).
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
-\PropVarIfEmptyTF \lTmpaProp {\Return{Empty}} {\Return{NonEmpty}}
-\PropClear \lTmpaProp
-\PropVarIfEmptyTF \lTmpaProp {\Return{Empty}} {\Return{NonEmpty}}
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propVarIfEmptyTF \lTmpaProp {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
+\propClear \lTmpaProp
+\propVarIfEmptyTF \lTmpaProp {\prgReturn{Empty}} {\prgReturn{NonEmpty}}
\end{demohigh}
\end{function}
-\begin{function}{\PropVarIfIn,\PropVarIfInT,\PropVarIfInF,\PropVarIfInTF}
+\begin{function}{\propVarIfIn,\propVarIfInT,\propVarIfInF,\propVarIfInTF}
\begin{syntax}
-\cs{PropVarIfIn} \meta{property list} \Arg{key}
-\cs{PropVarIfInT} \meta{property list} \Arg{key} \Arg{true code}
-\cs{PropVarIfInF} \meta{property list} \Arg{key} \Arg{false code}
-\cs{PropVarIfInTF} \meta{property list} \Arg{key} \Arg{true code} \Arg{false code}
+\cs{propVarIfIn} \meta{property list} \Arg{key}
+\cs{propVarIfInT} \meta{property list} \Arg{key} \Arg{true code}
+\cs{propVarIfInF} \meta{property list} \Arg{key} \Arg{false code}
+\cs{propVarIfInTF} \meta{property list} \Arg{key} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{key} is present in the \meta{property list},
-making the comparison using the method described by \cs{StrIfEqTF}.
+making the comparison using the method described by \cs{strIfEqTF}.
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
-\PropVarIfInTF \lTmpaProp {key1} {\Return{Yes}} {\Return{Not}}
-\PropVarIfInTF \lTmpaProp {key3} {\Return{Yes}} {\Return{Not}}
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propVarIfInTF \lTmpaProp {key1} {\prgReturn{Yes}} {\prgReturn{Not}}
+\propVarIfInTF \lTmpaProp {key3} {\prgReturn{Yes}} {\prgReturn{Not}}
\end{demohigh}
%\begin{texnote}
%This function iterates through every key--value pair in the
-%\meta{property list} and is therefore slower than using \cs{PropGetTF}.
+%\meta{property list} and is therefore slower than using \cs{propGetTF}.
%\end{texnote}
\end{function}
@@ -6903,16 +6903,16 @@ Let us give a few examples. The following example replace the first
occurrence of \enquote{\texttt{at}} with \enquote{\texttt{is}}
in the token list variable \cs{lTmpaTl}.
\begin{demohigh}
-\TlSet \lTmpaTl {That cat.}
-\RegexReplaceOnce {at} {is} \lTmpaTl
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {That cat.}
+\regexReplaceOnce {at} {is} \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
A more complicated example is
a pattern to emphasize each word and add a comma after it:
\begin{demohigh}
-\TlSet \lTmpaTl {That cat.}
-\RegexReplaceAll {\w+} {\c{underline} \cB\{ \0 \cE\} ,} \lTmpaTl
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {That cat.}
+\regexReplaceAll {\w+} {\c{underline} \cB\{ \0 \cE\} ,} \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
The |\w| sequence represents any \enquote{word} character, and |+|
indicates that the |\w| sequence should be repeated as many times as
@@ -6923,10 +6923,10 @@ and its argument |\0| is put between braces |\cB\{| and |\cE\}|.
If a regular expression is to be used several times,
it can be compiled once, and stored in a regex
-variable using \cs{RegexSet}. For example,
+variable using \cs{regexSet}. For example,
\begin{codehigh}
-\RegexNew \lFooRegex
-\RegexSet \lFooRegex {\c{begin} \cB. (\c[^BE].*) \cE.}
+\regexNew \lFooRegex
+\regexSet \lFooRegex {\c{begin} \cB. (\c[^BE].*) \cE.}
\end{codehigh}
stores in \cs{lFooRegex} a regular expression which matches the
starting marker for an environment: \cs[no-index]{begin}, followed by a
@@ -6961,47 +6961,47 @@ However, they may be overwritten by other non-kernel
code and so should only be used for short-term storage.
\end{variable}
-\begin{function}{\RegexNew}
+\begin{function}{\regexNew}
\begin{syntax}
-\cs{RegexNew} \meta{regex var}
+\cs{regexNew} \meta{regex var}
\end{syntax}
Creates a new \meta{regex var} or raises an error if the
name is already taken. The declaration is global. The
\meta{regex var} is initially such that it never matches.
\end{function}
-\begin{function}{\RegexSet}
+\begin{function}{\regexSet}
\begin{syntax}
-\cs{RegexSet} \meta{regex var} \Arg{regex}
+\cs{regexSet} \meta{regex var} \Arg{regex}
\end{syntax}
Stores a compiled version of the \meta{regular expression} in the
\meta{regex var}. For instance, this function can be
used as
\begin{codehigh}
-\RegexNew \lMyRegex
-\RegexSet \lMyRegex {my\ (simple\ )? reg(ex|ular\ expression)}
+\regexNew \lMyRegex
+\regexSet \lMyRegex {my\ (simple\ )? reg(ex|ular\ expression)}
\end{codehigh}
\end{function}
-\begin{function}{\RegexConst}
+\begin{function}{\regexConst}
\begin{syntax}
-\cs{RegexConst} \meta{regex var} \Arg{regex}
+\cs{regexConst} \meta{regex var} \Arg{regex}
\end{syntax}
Creates a new constant \meta{regex var} or raises an error if the name
is already taken. The value of the \meta{regex var} is set
globally to the compiled version of the \meta{regular expression}.
\end{function}
-\begin{function}{\RegexLog,\RegexVarLog,\RegexShow,\RegexVarShow}
+\begin{function}{\regexLog,\regexVarLog,\regexShow,\regexVarShow}
\begin{syntax}
-\cs{RegexLog} \Arg{regex}
-\cs{RegexVarLog} \meta{regex var}
-\cs{RegexShow} \Arg{regex}
-\cs{RegexVarShow} \meta{regex var}
+\cs{regexLog} \Arg{regex}
+\cs{regexVarLog} \meta{regex var}
+\cs{regexShow} \Arg{regex}
+\cs{regexVarShow} \meta{regex var}
\end{syntax}
Displays in the terminal or writes in the log file (respectively)
how \pkg{l3regex} interprets the \meta{regex}. For instance,
-\cs{RegexShow} \verb+{\A X|Y}+ shows
+\cs{regexShow} \verb+{\A X|Y}+ shows
\begin{codehigh}
+-branch
anchor at start (\A)
@@ -7015,35 +7015,35 @@ the second branch is not anchored to the beginning of the match.
\section{Regular Expression Matching}
-\begin{function}{\RegexMatch,\RegexMatchT,\RegexMatchF,\RegexMatchTF}
+\begin{function}{\regexMatch,\regexMatchT,\regexMatchF,\regexMatchTF}
\begin{syntax}
-\cs{RegexMatch} \Arg{regex} \Arg{token list}
-\cs{RegexMatchT} \Arg{regex} \Arg{token list} \Arg{true code}
-\cs{RegexMatchF} \Arg{regex} \Arg{token list} \Arg{false code}
-\cs{RegexMatchTF} \Arg{regex} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{regexMatch} \Arg{regex} \Arg{token list}
+\cs{regexMatchT} \Arg{regex} \Arg{token list} \Arg{true code}
+\cs{regexMatchF} \Arg{regex} \Arg{token list} \Arg{false code}
+\cs{regexMatchTF} \Arg{regex} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{regular expression} matches any part
of the \meta{token list}. For instance,
\begin{demohigh}
-\RegexMatchTF {b [cde]*} {abecdcx} {\Print{True}} {\Print{False}}
-\RegexMatchTF {[b-dq-w]} {example} {\Print{True}} {\Print{False}}
+\regexMatchTF {b [cde]*} {abecdcx} {\prgPrint{True}} {\prgPrint{False}}
+\regexMatchTF {[b-dq-w]} {example} {\prgPrint{True}} {\prgPrint{False}}
\end{demohigh}
\end{function}
-\begin{function}{\RegexVarMatch,\RegexVarMatchT,\RegexVarMatchF,\RegexVarMatchTF}
+\begin{function}{\regexVarMatch,\regexVarMatchT,\regexVarMatchF,\regexVarMatchTF}
\begin{syntax}
-\cs{RegexVarMatch} \meta{regex var} \Arg{token list}
-\cs{RegexVarMatchT} \meta{regex var} \Arg{token list} \Arg{true code}
-\cs{RegexVarMatchF} \meta{regex var} \Arg{token list} \Arg{false code}
-\cs{RegexVarMatchTF} \meta{regex var} \Arg{token list} \Arg{true code} \Arg{false code}
+\cs{regexVarMatch} \meta{regex var} \Arg{token list}
+\cs{regexVarMatchT} \meta{regex var} \Arg{token list} \Arg{true code}
+\cs{regexVarMatchF} \meta{regex var} \Arg{token list} \Arg{false code}
+\cs{regexVarMatchTF} \meta{regex var} \Arg{token list} \Arg{true code} \Arg{false code}
\end{syntax}
Tests whether the \meta{regex var} matches any part of the \meta{token list}.
\end{function}
-\begin{function}{\RegexCount,\RegexVarCount}
+\begin{function}{\regexCount,\regexVarCount}
\begin{syntax}
-\cs{RegexCount} \Arg{regex} \Arg{token list} \meta{int var}
-\cs{RegexVarCount} \meta{regex var} \Arg{token list} \meta{int var}
+\cs{regexCount} \Arg{regex} \Arg{token list} \meta{int var}
+\cs{regexVarCount} \meta{regex var} \Arg{token list} \meta{int var}
\end{syntax}
Sets \meta{int var} within the current \TeX{} group level
equal to the number of times
@@ -7056,15 +7056,15 @@ Infinite loops are prevented in the case where the regular expression
can match an empty token list: then we count one match between each
pair of characters. For instance,
\begin{demohigh}
-\IntNew \lFooInt
-\RegexCount {(b+|c)} {abbababcbb} \lFooInt
-\IntUse \lFooInt
+\intNew \lFooInt
+\regexCount {(b+|c)} {abbababcbb} \lFooInt
+\intUse \lFooInt
\end{demohigh}
\end{function}
-\begin{function}{\RegexMatchCase}
+\begin{function}{\regexMatchCase}
\begin{syntax}
-\cs{RegexMatchCase}
+\cs{regexMatchCase}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{code case_2}
@@ -7086,14 +7086,14 @@ discarded, while if none of the \meta{regex} match at a given
position then the next starting position is attempted. If none of
the \meta{regex} match anywhere in the \meta{token list} then
nothing is left in the input stream. Note that this differs from
-nested \cs{RegexMatch} statements since all \meta{regex} are
+nested \cs{regexMatch} statements since all \meta{regex} are
attempted at each position rather than attempting to match
\meta{regex_1} at every position before moving on to \meta{regex_2}.
\end{function}
-\begin{function}{\RegexMatchCaseT}
+\begin{function}{\regexMatchCaseT}
\begin{syntax}
-\cs{RegexMatchCaseT}
+\cs{regexMatchCaseT}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{code case_2}
@@ -7111,9 +7111,9 @@ discarded. Each \meta{regex} can either be given
as a regex variable or as an explicit regular expression.
\end{function}
-\begin{function}{\RegexMatchCaseF}
+\begin{function}{\regexMatchCaseF}
\begin{syntax}
-\cs{RegexMatchCaseF}
+\cs{regexMatchCaseF}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{code case_2}
@@ -7132,9 +7132,9 @@ is left in the input stream. Each \meta{regex} can either be given
as a regex variable or as an explicit regular expression.
\end{function}
-\begin{function}{\RegexMatchCaseTF}
+\begin{function}{\regexMatchCaseTF}
\begin{syntax}
-\cs{RegexMatchCaseTF}
+\cs{regexMatchCaseTF}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{code case_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{code case_2}
@@ -7155,12 +7155,12 @@ as a regex variable or as an explicit regular expression.
\section{Regular Expression Submatch Extraction}
-\begin{function}{\RegexExtractOnce,\RegexExtractOnceT,\RegexExtractOnceF,\RegexExtractOnceTF}
+\begin{function}{\regexExtractOnce,\regexExtractOnceT,\regexExtractOnceF,\regexExtractOnceTF}
\begin{syntax}
-\cs{RegexExtractOnce} \Arg{regex} \Arg{token list} \meta{seq var}
-\cs{RegexExtractOnceT} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code}
-\cs{RegexExtractOnceF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{false code}
-\cs{RegexExtractOnceTF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
+\cs{regexExtractOnce} \Arg{regex} \Arg{token list} \meta{seq var}
+\cs{regexExtractOnceT} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code}
+\cs{regexExtractOnceF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{false code}
+\cs{regexExtractOnceTF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
\end{syntax}
Finds the first match of the \meta{regular expression} in the
\meta{token list}. If it exists, the match is stored as the first
@@ -7173,7 +7173,7 @@ capturing groups, in the order of their opening parenthesis. The
\par
For instance, assume that you type
\begin{codehigh}
-\RegexExtractOnce {\A(La)?TeX(!*)\Z} {LaTeX!!!} \lTmpaSeq
+\regexExtractOnce {\A(La)?TeX(!*)\Z} {LaTeX!!!} \lTmpaSeq
\end{codehigh}
Then the regular expression (anchored at the start with |\A| and
at the end with |\Z|) must match the whole token list. The first
@@ -7181,16 +7181,16 @@ capturing group, |(La)?|, matches |La|, and the second capturing
group, |(!*)|, matches |!!!|. Thus, \cs{lTmpaSeq} contains as a result
the items |{LaTeX!!!}|, |{La}|, and |{!!!}|.
Note that the $n$-th item of \cs{lTmpaSeq}, as obtained using
-\cs{SeqVarItem}, correspond to the submatch numbered $(n-1)$ in
-functions such as \cs{RegexReplaceOnce}.
+\cs{seqVarItem}, correspond to the submatch numbered $(n-1)$ in
+functions such as \cs{regexReplaceOnce}.
\end{function}
-\begin{function}{\RegexVarExtractOnce,\RegexVarExtractOnceT,\RegexVarExtractOnceF,\RegexVarExtractOnceTF}
+\begin{function}{\regexVarExtractOnce,\regexVarExtractOnceT,\regexVarExtractOnceF,\regexVarExtractOnceTF}
\begin{syntax}
-\cs{RegexVarExtractOnce} \meta{regex var} \Arg{token list} \meta{seq var}
-\cs{RegexVarExtractOnceT} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code}
-\cs{RegexVarExtractOnceF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{false code}
-\cs{RegexVarExtractOnceTF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
+\cs{regexVarExtractOnce} \meta{regex var} \Arg{token list} \meta{seq var}
+\cs{regexVarExtractOnceT} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code}
+\cs{regexVarExtractOnceF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{false code}
+\cs{regexVarExtractOnceTF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
\end{syntax}
Finds the first match of the \meta{regex var} in the
\meta{token list}. If it exists, the match is stored as the first
@@ -7202,52 +7202,52 @@ capturing groups, in the order of their opening parenthesis. The
\meta{false code} otherwise.
\end{function}
-\begin{function}{\RegexExtractAll,\RegexExtractAllT,\RegexExtractAllF,\RegexExtractAllTF}
+\begin{function}{\regexExtractAll,\regexExtractAllT,\regexExtractAllF,\regexExtractAllTF}
\begin{syntax}
-\cs{RegexExtractAll} \Arg{regex} \Arg{token list} \meta{seq var}
-\cs{RegexExtractAllT} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code}
-\cs{RegexExtractAllF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{false code}
-\cs{RegexExtractAllTF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
+\cs{regexExtractAll} \Arg{regex} \Arg{token list} \meta{seq var}
+\cs{regexExtractAllT} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code}
+\cs{regexExtractAllF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{false code}
+\cs{regexExtractAllTF} \Arg{regex} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
\end{syntax}
Finds all matches of the \meta{regular expression}
in the \meta{token list}, and stores all the submatch information
in a single sequence (concatenating the results of
-multiple \cs{RegexExtractOnce} calls).
+multiple \cs{regexExtractOnce} calls).
The \meta{seq var} is assigned locally. If there is no match,
the \meta{seq var} is cleared.
The testing versions insert the \meta{true code} into the input
stream if a match was found, and the \meta{false code} otherwise.
For instance, assume that you type
\begin{codehigh}
-\RegexExtractAll {\w+} {Hello, world!} \lTmpaSeq
+\regexExtractAll {\w+} {Hello, world!} \lTmpaSeq
\end{codehigh}
Then the regular expression matches twice, the resulting
sequence contains the two items |{Hello}| and |{world}|.
\end{function}
-\begin{function}{\RegexVarExtractAll,\RegexVarExtractAllT,\RegexVarExtractAllF,\RegexVarExtractAllTF}
+\begin{function}{\regexVarExtractAll,\regexVarExtractAllT,\regexVarExtractAllF,\regexVarExtractAllTF}
\begin{syntax}
-\cs{RegexVarExtractAll} \meta{regex var} \Arg{token list} \meta{seq var}
-\cs{RegexVarExtractAllT} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code}
-\cs{RegexVarExtractAllF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{false code}
-\cs{RegexVarExtractAllTF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
+\cs{regexVarExtractAll} \meta{regex var} \Arg{token list} \meta{seq var}
+\cs{regexVarExtractAllT} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code}
+\cs{regexVarExtractAllF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{false code}
+\cs{regexVarExtractAllTF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
\end{syntax}
Finds all matches of the \meta{regex var}
in the \meta{token list}, and stores all the submatch information
in a single sequence (concatenating the results of
-multiple \cs{RegexVarExtractOnce} calls).
+multiple \cs{regexVarExtractOnce} calls).
The \meta{seq var} is assigned locally. If there is no match,
the \meta{seq var} is cleared.
The testing versions insert the \meta{true code} into the input
stream if a match was found, and the \meta{false code} otherwise.
\end{function}
-\begin{function}{\RegexSplit,\RegexSplitT,\RegexSplitF,\RegexSplitTF}
+\begin{function}{\regexSplit,\regexSplitT,\regexSplitF,\regexSplitTF}
\begin{syntax}
-\cs{RegexSplit} \Arg{regular expression} \Arg{token list} \meta{seq var}
-\cs{RegexSplitT} \Arg{regular expression} \Arg{token list} \meta{seq var} \Arg{true code}
-\cs{RegexSplitF} \Arg{regular expression} \Arg{token list} \meta{seq var} \Arg{false code}
-\cs{RegexSplitTF} \Arg{regular expression} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
+\cs{regexSplit} \Arg{regular expression} \Arg{token list} \meta{seq var}
+\cs{regexSplitT} \Arg{regular expression} \Arg{token list} \meta{seq var} \Arg{true code}
+\cs{regexSplitF} \Arg{regular expression} \Arg{token list} \meta{seq var} \Arg{false code}
+\cs{regexSplitTF} \Arg{regular expression} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
\end{syntax}
Splits the \meta{token list} into a sequence of parts, delimited by
matches of the \meta{regular expression}. If the \meta{regular expression}
@@ -7261,19 +7261,19 @@ The testing versions insert the \meta{true code} into the input
stream if a match was found, and the \meta{false code} otherwise.
For example, after
\begin{codehigh}
-\SeqNew \lPathSeq
-\RegexSplit {/} {the/path/for/this/file.tex} \lPathSeq
+\seqNew \lPathSeq
+\regexSplit {/} {the/path/for/this/file.tex} \lPathSeq
\end{codehigh}
the sequence |\lPathSeq| contains the items |{the}|, |{path}|,
|{for}|, |{this}|, and |{file.tex}|.
\end{function}
-\begin{function}{\RegexVarSplit,\RegexVarSplitT,\RegexVarSplitF,\RegexVarSplitTF}
+\begin{function}{\regexVarSplit,\regexVarSplitT,\regexVarSplitF,\regexVarSplitTF}
\begin{syntax}
-\cs{RegexVarSplit} \meta{regex var} \Arg{token list} \meta{seq var}
-\cs{RegexVarSplitT} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code}
-\cs{RegexVarSplitF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{false code}
-\cs{RegexVarSplitTF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
+\cs{regexVarSplit} \meta{regex var} \Arg{token list} \meta{seq var}
+\cs{regexVarSplitT} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code}
+\cs{regexVarSplitF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{false code}
+\cs{regexVarSplitTF} \meta{regex var} \Arg{token list} \meta{seq var} \Arg{true code} \Arg{false code}
\end{syntax}
Splits the \meta{token list} into a sequence of parts, delimited by
matches of the \meta{regular expression}. If the \meta{regex var}
@@ -7289,12 +7289,12 @@ stream if a match was found, and the \meta{false code} otherwise.
\section{Regular Expression Replacement}
-\begin{function}{\RegexReplaceOnce,\RegexReplaceOnceT,\RegexReplaceOnceT,\RegexReplaceOnceTF}
+\begin{function}{\regexReplaceOnce,\regexReplaceOnceT,\regexReplaceOnceT,\regexReplaceOnceTF}
\begin{syntax}
-\cs{RegexReplaceOnce} \Arg{regular expression} \Arg{replacement} \meta{tl var}
-\cs{RegexReplaceOnceT} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code}
-\cs{RegexReplaceOnceF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{false code}
-\cs{RegexReplaceOnceTF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
+\cs{regexReplaceOnce} \Arg{regular expression} \Arg{replacement} \meta{tl var}
+\cs{regexReplaceOnceT} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code}
+\cs{regexReplaceOnceF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{false code}
+\cs{regexReplaceOnceTF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
\end{syntax}
Searches for the \meta{regular expression} in the contents of the
\meta{tl var} and replaces the first match with the
@@ -7304,12 +7304,12 @@ first capturing group, |\2| of the second, \emph{etc.}
The result is assigned locally to \meta{tl var}.
\end{function}
-\begin{function}{\RegexReplaceOnce,\RegexReplaceOnceT,\RegexReplaceOnceT,\RegexReplaceOnceTF}
+\begin{function}{\regexReplaceOnce,\regexReplaceOnceT,\regexReplaceOnceT,\regexReplaceOnceTF}
\begin{syntax}
-\cs{RegexVarReplaceOnce} \meta{regex var} \Arg{replacement} \meta{tl var}
-\cs{RegexVarReplaceOnceT} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code}
-\cs{RegexVarReplaceOnceF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{false code}
-\cs{RegexVarReplaceOnceTF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
+\cs{regexVarReplaceOnce} \meta{regex var} \Arg{replacement} \meta{tl var}
+\cs{regexVarReplaceOnceT} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code}
+\cs{regexVarReplaceOnceF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{false code}
+\cs{regexVarReplaceOnceTF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
\end{syntax}
Searches for the \meta{regex var} in the contents of the
\meta{tl var} and replaces the first match with the
@@ -7319,12 +7319,12 @@ first capturing group, |\2| of the second, \emph{etc.}
The result is assigned locally to \meta{tl var}.
\end{function}
-\begin{function}{\RegexReplaceAll,\RegexReplaceAllT,\RegexReplaceAllF,\RegexReplaceAllTF}
+\begin{function}{\regexReplaceAll,\regexReplaceAllT,\regexReplaceAllF,\regexReplaceAllTF}
\begin{syntax}
-\cs{RegexReplaceAll} \Arg{regular expression} \Arg{replacement} \meta{tl var}
-\cs{RegexReplaceAllT} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code}
-\cs{RegexReplaceAllF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{false code}
-\cs{RegexReplaceAllTF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
+\cs{regexReplaceAll} \Arg{regular expression} \Arg{replacement} \meta{tl var}
+\cs{regexReplaceAllT} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code}
+\cs{regexReplaceAllF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{false code}
+\cs{regexReplaceAllTF} \Arg{regular expression} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
\end{syntax}
Replaces all occurrences of the \meta{regex var} in the
contents of the \meta{tl var}
@@ -7335,12 +7335,12 @@ independently, and matches cannot overlap. The result is assigned
locally to \meta{tl~var}.
\end{function}
-\begin{function}{\RegexVarReplaceAll,\RegexVarReplaceAllT,\RegexVarReplaceAllF,\RegexVarReplaceAllTF}
+\begin{function}{\regexVarReplaceAll,\regexVarReplaceAllT,\regexVarReplaceAllF,\regexVarReplaceAllTF}
\begin{syntax}
-\cs{RegexVarReplaceAll} \meta{regex var} \Arg{replacement} \meta{tl var}
-\cs{RegexVarReplaceAllT} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code}
-\cs{RegexVarReplaceAllF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{false code}
-\cs{RegexVarReplaceAllTF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
+\cs{regexVarReplaceAll} \meta{regex var} \Arg{replacement} \meta{tl var}
+\cs{regexVarReplaceAllT} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code}
+\cs{regexVarReplaceAllF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{false code}
+\cs{regexVarReplaceAllTF} \meta{regex var} \Arg{replacement} \meta{tl var} \Arg{true code} \Arg{false code}
\end{syntax}
Replaces all occurrences of the \meta{regular expression} in the
contents of the \meta{tl var}
@@ -7351,9 +7351,9 @@ independently, and matches cannot overlap. The result is assigned
locally to \meta{tl var}.
\end{function}
-\begin{function}{\RegexReplaceCaseOnce}
+\begin{function}{\regexReplaceCaseOnce}
\begin{syntax}
-\cs{RegexReplaceCaseOnce}
+\cs{regexReplaceCaseOnce}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7371,14 +7371,14 @@ variable or as an explicit regular expression.
In detail, for each starting position in the \meta{token list}, each
of the \meta{regex} is searched in turn. If one of them matches
then it is replaced by the corresponding \meta{replacement} as
-described for \cs{RegexReplaceOnce}. This is equivalent to
-checking with \cs{RegexMatchCase} which \meta{regex} matches,
-then performing the replacement with \cs{RegexReplaceOnce}.
+described for \cs{regexReplaceOnce}. This is equivalent to
+checking with \cs{regexMatchCase} which \meta{regex} matches,
+then performing the replacement with \cs{regexReplaceOnce}.
\end{function}
-\begin{function}{\RegexReplaceCaseOnceT}
+\begin{function}{\regexReplaceCaseOnceT}
\begin{syntax}
-\cs{RegexReplaceCaseOnceT}
+\cs{regexReplaceCaseOnceT}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7396,9 +7396,9 @@ input stream. If none of the \meta{regex} match, then the
variable or as an explicit regular expression.
\end{function}
-\begin{function}{\RegexReplaceCaseOnceF}
+\begin{function}{\regexReplaceCaseOnceF}
\begin{syntax}
-\cs{RegexReplaceCaseOnceF}
+\cs{regexReplaceCaseOnceF}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7416,9 +7416,9 @@ the input stream. Each \meta{regex} can either be given as a regex
variable or as an explicit regular expression.
\end{function}
-\begin{function}{\RegexReplaceCaseOnceTF}
+\begin{function}{\regexReplaceCaseOnceTF}
\begin{syntax}
-\cs{RegexReplaceCaseOnceTF}
+\cs{regexReplaceCaseOnceTF}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7437,9 +7437,9 @@ the input stream. Each \meta{regex} can either be given as a regex
variable or as an explicit regular expression.
\end{function}
-\begin{function}{\RegexReplaceCaseAll}
+\begin{function}{\regexReplaceCaseAll}
\begin{syntax}
-\cs{RegexReplaceCaseAll}
+\cs{regexReplaceCaseAll}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7459,8 +7459,8 @@ search resumes at the position that follows this match (and
replacement). For instance
%% FIXME
%\begin{codehigh}
-%\TlSet \lTmpaTl {Hello, world!}
-%\RegexReplaceCaseAll
+%\tlSet \lTmpaTl {Hello, world!}
+%\regexReplaceCaseAll
% {
% {[A-Za-z]+} {``\0''}
% {\b} {---}
@@ -7468,8 +7468,8 @@ replacement). For instance
% } \lTmpaTl
%\end{codehigh}
\begin{codehigh}
-\TlSet \lTmpaTl {Hello, world!}
-\RegexReplaceCaseAll
+\tlSet \lTmpaTl {Hello, world!}
+\regexReplaceCaseAll
{
{[A-Za-z]+} {``\0''}
{\b} {---}
@@ -7481,12 +7481,12 @@ results in \cs{lTmpaTl} having the contents
the word-boundary assertion |\b| did not match at the start of words
because the case |[A-Za-z]+| matched at these positions. To change
this, one could simply swap the order of the two cases in the
-argument of \cs{RegexReplaceCaseAll}.
+argument of \cs{regexReplaceCaseAll}.
\end{function}
-\begin{function}{\RegexReplaceCaseAllT}
+\begin{function}{\regexReplaceCaseAllT}
\begin{syntax}
-\cs{RegexReplaceCaseAllT}
+\cs{regexReplaceCaseAllT}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7502,9 +7502,9 @@ assigned locally to \meta{tl var}, and the \meta{true code}
is left in the input stream if any replacement was made.
\end{function}
-\begin{function}{\RegexReplaceCaseAllF}
+\begin{function}{\regexReplaceCaseAllF}
\begin{syntax}
-\cs{RegexReplaceCaseAllF}
+\cs{regexReplaceCaseAllF}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7520,9 +7520,9 @@ assigned locally to \meta{tl var}, and the \meta{false code} is left
in the input stream if not any replacement was made.
\end{function}
-\begin{function}{\RegexReplaceCaseAllTF}
+\begin{function}{\regexReplaceCaseAllTF}
\begin{syntax}
-\cs{RegexReplaceCaseAllTF}
+\cs{regexReplaceCaseAllTF}
~ ~ |{|
~ ~ ~ ~ \Arg{regex_1} \Arg{replacement_1}
~ ~ ~ ~ \Arg{regex_2} \Arg{replacement_2}
@@ -7544,7 +7544,7 @@ any replacement was made or not.
\subsection{Regular Expression Examples}
We start with a few examples, and encourage the reader to apply
-\cs{RegexShow} to these regular expressions.
+\cs{regexShow} to these regular expressions.
\begin{itemize}
\item |Cat| matches the word \enquote{Cat} capitalized in this way,
but also matches the beginning of the word \enquote{Cattle}: use
@@ -7583,9 +7583,9 @@ We start with a few examples, and encourage the reader to apply
\item |\G.*?\K| at the beginning of a regular expression matches and
discards (due to |\K|) everything between the end of the previous
match (|\G|) and what is matched by the rest of the regular
- expression; this is useful in \cs{RegexReplaceAll} when the
+ expression; this is useful in \cs{regexReplaceAll} when the
goal is to extract matches or submatches in a finer way than with
- \cs{RegexExtractAll}.
+ \cs{regexExtractAll}.
\end{itemize}
While it is impossible for a regular expression to match only integer
expressions, \newline\verb*"[\+\-\(]*\d+\)*([\+\-*/][\+\-\(]*\d+\)*)*" matches among
@@ -7735,19 +7735,19 @@ match. Parenthesized groups are labelled in the order of their
opening parenthesis, starting at $1$. The contents of those groups
corresponding to the \enquote{best} match (leftmost longest)
can be extracted and stored in a sequence of token lists using for
-instance \cs{RegexExtractOnceTF}.
+instance \cs{regexExtractOnceTF}.
The |\K| escape sequence resets the beginning of the match to the
current position in the token list. This only affects what is reported
as the full match. For instance,
\begin{codehigh}
-\RegexExtractAll {a \K .} {a123aaxyz} \lFooSeq
+\regexExtractAll {a \K .} {a123aaxyz} \lFooSeq
\end{codehigh}
results in \cs{lFooSeq} containing the items |{1}| and |{a}|: the
true matches are |{a1}| and |{aa}|, but they are trimmed by the use of
|\K|. The |\K| command does not affect capturing groups: for instance,
\begin{codehigh}
-\RegexExtractOnce {(. \K c)+ \d} {acbc3} \lFooSeq
+\regexExtractOnce {(. \K c)+ \d} {acbc3} \lFooSeq
\end{codehigh}
results in \cs{lFooSeq} containing the items |{c3}| and |{bc}|: the
true match is |{acbc3}|, with first submatch |{bc}|, but |\K| resets
@@ -7832,8 +7832,8 @@ get the latter effect, it is simplest to use \TeX{}'s expansion
machinery directly: if \cs{lTmpaTl} contains
\verb"B|C" then the following two lines show the same result:
\begin{codehigh}
-\RegexShow {A \u{lTmpaTl} D}
-\RegexShow {A B | C D}
+\regexShow {A \u{lTmpaTl} D}
+\regexShow {A B | C D}
\end{codehigh}
\subsection{Miscellaneous}
@@ -7851,7 +7851,7 @@ Anchors and simple assertions.
End of the subject token list.
\item[\\G] Start of the current match. This is only different from |^|
in the case of multiple matches: for instance
- |\RegexCount {\G a} {aaba} \lTmpaInt| yields $2$, but
+ |\regexCount {\G a} {aaba} \lTmpaInt| yields $2$, but
replacing |\G| by |^| would result in \cs{lTmpaInt} holding the
value $1$.
\end{l3regex-syntax}
@@ -7895,9 +7895,9 @@ escaped with a backslash.
For instance,
\begin{demohigh}
-\TlSet \lTmpaTl {Hello, world!}
-\RegexReplaceAll {([er]?l|o) .} {(\0--\1)} \lTmpaTl
-\TlUse \lTmpaTl
+\tlSet \lTmpaTl {Hello, world!}
+\regexReplaceAll {([er]?l|o) .} {(\0--\1)} \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
The submatches are numbered according to the order in which the
@@ -7943,120 +7943,120 @@ extract the value of the control sequence and turn it into a string.
Matches can also be used within the arguments of |\c| and |\u|. For
instance,
\begin{demohigh}
-\TlSet \lMyOneTl {first}
-\TlSet \lMyTwoTl {\underline{second}}
-\TlSet \lTmpaTl {One,Two,One,One}
-\RegexReplaceAll {[^,]+} {\u{lMy\0Tl}} \lTmpaTl
-\TlUse \lTmpaTl
+\tlSet \lMyOneTl {first}
+\tlSet \lMyTwoTl {\underline{second}}
+\tlSet \lTmpaTl {One,Two,One,One}
+\regexReplaceAll {[^,]+} {\u{lMy\0Tl}} \lTmpaTl
+\tlUse \lTmpaTl
\end{demohigh}
Regex replacement is also a convenient way to produce token lists
with arbitrary category codes. For instance
\begin{codehigh}
-\TlClear \lTmpaTl
-\RegexReplaceAll { } {\cU\% \cA\~} \lTmpaTl
+\tlClear \lTmpaTl
+\regexReplaceAll { } {\cU\% \cA\~} \lTmpaTl
\end{codehigh}
results in \cs{lTmpaTl} containing the percent character
with category code $7$ (superscript) and an active tilde character.
\chapter{Token Manipulation (\texttt{Token})}
-\begin{function}{\CharLowercase,\CharUppercase,\CharTitlecase,\CharFoldcase}
+\begin{function}{\charLowercase,\charUppercase,\charTitlecase,\charFoldcase}
\begin{syntax}
-\cs{CharLowercase} \meta{char}
-\cs{CharUppercase} \meta{char}
-\cs{CharTitlecase} \meta{char}
-\cs{CharFoldcase} \meta{char}
+\cs{charLowercase} \meta{char}
+\cs{charUppercase} \meta{char}
+\cs{charTitlecase} \meta{char}
+\cs{charFoldcase} \meta{char}
\end{syntax}
Converts the \meta{char} to the equivalent case-changed character
-as detailed by the function name (see %\cs{StrFoldcase} and
-\cs{TextTitlecase} for details of these terms). The case mapping
-is carried out with no context-dependence (\emph{cf.} \cs{TextUppercase},
+as detailed by the function name (see %\cs{strFoldcase} and
+\cs{textTitlecase} for details of these terms). The case mapping
+is carried out with no context-dependence (\emph{cf.} \cs{textUppercase},
\emph{etc.}) These functions generate characters with the category code
of the \meta{char} (i.e. only the character code changes).
\end{function}
-\begin{function}{\CharStrLowercase,\CharStrUppercase,\CharStrTitlecase,\CharStrFoldcase}
+\begin{function}{\charStrLowercase,\charStrUppercase,\charStrTitlecase,\charStrFoldcase}
\begin{syntax}
-\cs{CharStrLowercase} \meta{char}
-\cs{CharStrUppercase} \meta{char}
-\cs{CharStrTitlecase} \meta{char}
-\cs{CharStrFoldcase} \meta{char}
+\cs{charStrLowercase} \meta{char}
+\cs{charStrUppercase} \meta{char}
+\cs{charStrTitlecase} \meta{char}
+\cs{charStrFoldcase} \meta{char}
\end{syntax}
Converts the \meta{char} to the equivalent case-changed character
-as detailed by the function name (see %\cs{StrFoldcase} and
-\cs{TextTitlecase} for details of these terms). The case mapping
-is carried out with no context-dependence (\emph{cf.} \cs{TextUppercase},
+as detailed by the function name (see %\cs{strFoldcase} and
+\cs{textTitlecase} for details of these terms). The case mapping
+is carried out with no context-dependence (\emph{cf.} \cs{textUppercase},
\emph{etc.}) These functions generate \enquote{other} (category code $12$)
characters.
\end{function}
-\begin{function}{\CharSetLccode}
+\begin{function}{\charSetLccode}
\begin{syntax}
-\cs{CharSetLccode} \Arg{intexpr_1} \Arg{intexpr_2}
+\cs{charSetLccode} \Arg{intexpr_1} \Arg{intexpr_2}
\end{syntax}
Sets up the behaviour of the \meta{character} when
-found inside \cs{TextLowercase}, such that \meta{character_1}
+found inside \cs{textLowercase}, such that \meta{character_1}
will be converted into \meta{character_2}. The two \meta{characters}
may be specified using an \meta{integer expression} for the character code
concerned. This may include the \TeX{} \verb|`|\meta{character}
method for converting a single character into its character code:
\begin{codehigh}
-\CharSetLccode {`\A} {`\a} % Standard behaviour
-\CharSetLccode {`\A} {`\A + 32}
-\CharSetLccode {65} {97}
+\charSetLccode {`\A} {`\a} % Standard behaviour
+\charSetLccode {`\A} {`\A + 32}
+\charSetLccode {65} {97}
\end{codehigh}
The setting applies within the current \TeX{} group.
\end{function}
-\begin{function}{\CharSetUccode}
+\begin{function}{\charSetUccode}
\begin{syntax}
-\cs{CharSetUccode} \Arg{intexpr_1} \Arg{intexpr_2}
+\cs{charSetUccode} \Arg{intexpr_1} \Arg{intexpr_2}
\end{syntax}
Sets up the behaviour of the \meta{character} when
-found inside \cs{TextUppercase}, such that \meta{character_1}
+found inside \cs{textUppercase}, such that \meta{character_1}
will be converted into \meta{character_2}. The two \meta{characters}
may be specified using an \meta{integer expression} for the character code
concerned. This may include the \TeX{} \verb|`|\meta{character}
method for converting a single character into its character code:
\begin{codehigh}
-\CharSetUccode {`\a} {`\A} % Standard behaviour
-\CharSetUccode {`\a} {`\a - 32}
-\CharSetUccode {97} {65}
+\charSetUccode {`\a} {`\A} % Standard behaviour
+\charSetUccode {`\a} {`\a - 32}
+\charSetUccode {97} {65}
\end{codehigh}
The setting applies within the current \TeX{} group.
\end{function}
-\begin{function}{\CharValueLccode}
+\begin{function}{\charValueLccode}
\begin{syntax}
-\cs{CharValueLccode} \Arg{integer expression}
+\cs{charValueLccode} \Arg{integer expression}
\end{syntax}
Returns the current lower case code of the \meta{character} with
character code given by the
\meta{integer expression}.
\end{function}
-\begin{function}{\CharValueUccode}
+\begin{function}{\charValueUccode}
\begin{syntax}
-\cs{CharValueUccode} \Arg{integer expression}
+\cs{charValueUccode} \Arg{integer expression}
\end{syntax}
Returns the current upper case code of the \meta{character} with
character code given by the
\meta{integer expression}.
\end{function}
-%\begin{function}{\CharShowValueLccode}
+%\begin{function}{\charShowValueLccode}
%\begin{syntax}
-%\cs{CharShowValueLccode} \Arg{integer expression}
+%\cs{charShowValueLccode} \Arg{integer expression}
%\end{syntax}
%Displays the current lower case code of the \meta{character} with
%character code given by the \meta{integer expression} on the
%terminal.
%\end{function}
%
-%\begin{function}{\CharShowValueUccode}
+%\begin{function}{\charShowValueUccode}
%\begin{syntax}
-%\cs{CharShowValueUccode} \Arg{integer expression}
+%\cs{charShowValueUccode} \Arg{integer expression}
%\end{syntax}
%Displays the current upper case code of the \meta{character} with
%character code given by the \meta{integer expression} on the
@@ -8089,12 +8089,12 @@ covered as the engine treats input outside of this range as east Asian.
%Importantly, notice that these functions are intended for working with
%user \emph{text for typesetting}. For case changing programmatic data see
-%the \pkg{Str} module and discussion there of \cs{StrLowercase},
-%\cs{StrUppercase} and \cs{StrFoldcase}.
+%the \pkg{Str} module and discussion there of \cs{strLowercase},
+%\cs{strUppercase} and \cs{strFoldcase}.
-\begin{function}{\TextExpand}
+\begin{function}{\textExpand}
\begin{syntax}
-\cs{TextExpand} \Arg{text}
+\cs{textExpand} \Arg{text}
\end{syntax}
Takes user input \meta{text} and expands the content.
Protected commands (typically formatting) are left in place,
@@ -8106,14 +8106,14 @@ Commands which are neither engine- nor \LaTeX{} protected are expanded exhaustiv
%\cs{l_text_accents_tl} and \cs{l_text_letterlike_tl} are excluded from expansion.
\end{function}
-\begin{function}{\TextLowercase,\TextUppercase,\TextTitlecase,\TextTitlecaseFirst}
+\begin{function}{\textLowercase,\textUppercase,\textTitlecase,\textTitlecaseFirst}
\begin{syntax}
-\cs{TextLowercase} \Arg{tokens}
-\cs{TextUppercase} \Arg{tokens}
-\cs{TextTitlecase} \Arg{tokens}
-\cs{TextTitlecaseFirst} \Arg{tokens}
+\cs{textLowercase} \Arg{tokens}
+\cs{textUppercase} \Arg{tokens}
+\cs{textTitlecase} \Arg{tokens}
+\cs{textTitlecaseFirst} \Arg{tokens}
\end{syntax}
-Takes user input \meta{text} first applies \cs{TextExpand}, then
+Takes user input \meta{text} first applies \cs{textExpand}, then
transforms the case of character tokens as specified by the
function name. The category code of letters are not changed by this
process (at least where they can be represented by the engine as a single
@@ -8127,9 +8127,9 @@ maps to a special form, for example \texttt{ij} in Dutch which becomes
\texttt{IJ}.
\par
For titlecasing, note that there are two functions available. The
-function \cs{TextTitlecase} applies (broadly) uppercasing to the first
+function \cs{textTitlecase} applies (broadly) uppercasing to the first
letter of the input, then lowercasing to the remainder. In contrast,
-\cs{TextTitlecaseFirst} \emph{only} carries out the uppercasing operation,
+\cs{textTitlecaseFirst} \emph{only} carries out the uppercasing operation,
and leaves the balance of the input unchanged.
%Determining whether non-letter characters at the start of text should switch
%from upper- to lowercasing is controllable.
@@ -8144,24 +8144,24 @@ and leaves the balance of the input unchanged.
\par
Case changing does not take place within math mode material. For example:
\begin{demohigh}
-\TextUppercase {Text $y=mx+c$ with {Braces}}
+\textUppercase {Text $y=mx+c$ with {Braces}}
\end{demohigh}
\begin{demohigh}
-\TextLowercase {Text $Y=mX+c$ with {Braces}}
+\textLowercase {Text $Y=mX+c$ with {Braces}}
\end{demohigh}
%The arguments of commands listed in \cs{l_text_case_exclude_arg_tl}
%are excluded from case changing; the latter are entirely non-textual
%content (such as labels).
\end{function}
-\begin{function}{\TextLangLowercase,\TextLangUppercase,\TextLangTitlecase,\TextLangTitlecaseFirst}
+\begin{function}{\textLangLowercase,\textLangUppercase,\textLangTitlecase,\textLangTitlecaseFirst}
\begin{syntax}
-\cs{TextLangLowercase} \Arg{language} \Arg{tokens}
-\cs{TextLangUppercase} \Arg{language} \Arg{tokens}
-\cs{TextLangTitlecase} \Arg{language} \Arg{tokens}
-\cs{TextLangTitlecaseFirst} \Arg{language} \Arg{tokens}
+\cs{textLangLowercase} \Arg{language} \Arg{tokens}
+\cs{textLangUppercase} \Arg{language} \Arg{tokens}
+\cs{textLangTitlecase} \Arg{language} \Arg{tokens}
+\cs{textLangTitlecaseFirst} \Arg{language} \Arg{tokens}
\end{syntax}
-Takes user input \meta{text} first applies \cs{TextExpand}, then
+Takes user input \meta{text} first applies \cs{textExpand}, then
transforms the case of character tokens as specified by the
function name. The category code of letters are not changed by this
process (at least where they can be represented by the engine as a single
@@ -8203,7 +8203,7 @@ Currently, the languages recognised for special handling are as follows.
\chapter{Files (\texttt{File})}
This module provides functions for working with external files.
-%Some of these functions apply to an entire file, and have prefix \cs{File},
+%Some of these functions apply to an entire file, and have prefix \cs{file},
%while others are used to work with files on a line by line basis and have
%prefix \cs{Ior} (reading) or \cs{Iow} (writing).
@@ -8228,36 +8228,36 @@ this will trim spaces from the start of the name only.
\section{File Operation Functions}
-\begin{function}{\FileInput}
+\begin{function}{\fileInput}
\begin{syntax}
-\cs{FileInput} \Arg{file name}
+\cs{fileInput} \Arg{file name}
\end{syntax}
Searches for \meta{file name} in the path as detailed for
-\cs{FileIfExistTF}, and if found reads in the file and
+\cs{fileIfExistTF}, and if found reads in the file and
returns the contents. All files read are recorded
for information and the file name stack is updated by this
function. An error is raised if the file is not found.
\end{function}
-\begin{function}{\FileIfExistInput,\FileIfExistInputF}
+\begin{function}{\fileIfExistInput,\fileIfExistInputF}
\begin{syntax}
-\cs{FileIfExistInput} \Arg{file name}
-\cs{FileIfExistInputF} \Arg{file name} \Arg{false code}
+\cs{fileIfExistInput} \Arg{file name}
+\cs{fileIfExistInputF} \Arg{file name} \Arg{false code}
\end{syntax}
Searches for \meta{file name} using the current \TeX{} search path.
%and the additional paths included in \cs{l_file_search_path_seq}.
If found then reads in the file and returns the contents as described
-for \cs{FileInput}, otherwise inserts the \meta{false code}.
+for \cs{fileInput}, otherwise inserts the \meta{false code}.
Note that these functions do not raise
-an error if the file is not found, in contrast to \cs{FileInput}.
+an error if the file is not found, in contrast to \cs{fileInput}.
\end{function}
-\begin{function}{\FileGet,\FileGetT,\FileGetF,\FileGetTF}
+\begin{function}{\fileGet,\fileGetT,\fileGetF,\fileGetTF}
\begin{syntax}
-\cs{FileGet} \Arg{filename} \Arg{setup} \meta{tl}
-\cs{FileGetT} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code}
-\cs{FileGetF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{false code}
-\cs{FileGetTF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code}
+\cs{fileGet} \Arg{filename} \Arg{setup} \meta{tl}
+\cs{fileGetT} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code}
+\cs{fileGetF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{false code}
+\cs{fileGetTF} \Arg{filename} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code}
\end{syntax}
Defines \meta{tl} to the contents of \meta{filename}.
Category codes may need to be set appropriately via the \meta{setup}
@@ -8268,20 +8268,20 @@ assignment to \meta{tl} if the file is found, and \meta{false code}
otherwise.
\end{function}
-\begin{function}{\FileIfExist,\FileIfExistT,\FileIfExistF,\FileIfExistTF}
+\begin{function}{\fileIfExist,\fileIfExistT,\fileIfExistF,\fileIfExistTF}
\begin{syntax}
-\cs{FileIfExist} \Arg{file name}
-\cs{FileIfExistT} \Arg{file name} \Arg{true code}
-\cs{FileIfExistF} \Arg{file name} \Arg{false code}
-\cs{FileIfExistTF} \Arg{file name} \Arg{true code} \Arg{false code}
+\cs{fileIfExist} \Arg{file name}
+\cs{fileIfExistT} \Arg{file name} \Arg{true code}
+\cs{fileIfExistF} \Arg{file name} \Arg{false code}
+\cs{fileIfExistTF} \Arg{file name} \Arg{true code} \Arg{false code}
\end{syntax}
Searches for \meta{file name} using the current \TeX{} search path.
%and the additional paths controlled by \cs{l_file_search_path_seq}.
\end{function}
-%\begin{function}{\FileInputStop}
+%\begin{function}{\fileInputStop}
%\begin{syntax}
-%\cs{FileInputStop}
+%\cs{fileInputStop}
%\end{syntax}
%Ends the reading of a file started by \cs{file_input:n} or similar before
%the end of the file is reached. Where the file reading is being terminated
@@ -8310,7 +8310,7 @@ to themselves and should therefore \emph{never} be executed directly
in the code. This would result in an endless loop!
Quarks can be used as error return values for functions that receive erroneous input.
-For example, in the function \cs{PropGet} to retrieve a value stored
+For example, in the function \cs{propGet} to retrieve a value stored
in some key of a property list, if the key does not exist then the return value
is the quark \cs{qNoValue}.
As mentioned above, such quarks are extremely fragile and it is imperative
@@ -8323,38 +8323,38 @@ environment.
\begin{variable}{\qNoValue}
A canonical value for a missing value, when one is requested from
a data structure. This is therefore used as a \enquote{return} value
-by functions such as \cs{PropGet} if there is no data to return.
+by functions such as \cs{propGet} if there is no data to return.
\end{variable}
\section{Quark Conditionals}
-\begin{function}{\QuarkVarIfNoValue,\QuarkVarIfNoValueT,\QuarkVarIfNoValueF,\QuarkVarIfNoValueTF}
+\begin{function}{\quarkVarIfNoValue,\quarkVarIfNoValueT,\quarkVarIfNoValueF,\quarkVarIfNoValueTF}
\begin{syntax}
-\cs{QuarkVarIfNoValue} \meta{token}
-\cs{QuarkVarIfNoValueT} \meta{token} \Arg{true code}
-\cs{QuarkVarIfNoValueF} \meta{token} \Arg{false code}
-\cs{QuarkVarIfNoValueTF} \meta{token} \Arg{true code} \Arg{false code}
+\cs{quarkVarIfNoValue} \meta{token}
+\cs{quarkVarIfNoValueT} \meta{token} \Arg{true code}
+\cs{quarkVarIfNoValueF} \meta{token} \Arg{false code}
+\cs{quarkVarIfNoValueTF} \meta{token} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \meta{token} is equal to \cs{qNoValue}.
\begin{demohigh}
-\ClistGet \cEmptyClist \lTmpaTl
-\QuarkVarIfNoValueTF \lTmpaTl {\Return{NoValue}} {\Return{SomeValue}}
+\clistGet \cEmptyClist \lTmpaTl
+\quarkVarIfNoValueTF \lTmpaTl {\prgReturn{NoValue}} {\prgReturn{SomeValue}}
\end{demohigh}
\begin{demohigh}
-\SeqPop \cEmptySeq \lTmpaTl
-\QuarkVarIfNoValueTF \lTmpaTl {\Return{NoValue}} {\Return{SomeValue}}
+\seqPop \cEmptySeq \lTmpaTl
+\quarkVarIfNoValueTF \lTmpaTl {\prgReturn{NoValue}} {\prgReturn{SomeValue}}
\end{demohigh}
\begin{demohigh}
-\PropSetFromKeyval \lTmpaProp {key1=one,key2=two}
-\PropGet \lTmpaProp {key3} \lTmpaTl
-\QuarkVarIfNoValueTF \lTmpaTl {\Return{NoValue}} {\Return{SomeValue}}
+\propSetFromKeyval \lTmpaProp {key1=one,key2=two}
+\propGet \lTmpaProp {key3} \lTmpaTl
+\quarkVarIfNoValueTF \lTmpaTl {\prgReturn{NoValue}} {\prgReturn{SomeValue}}
\end{demohigh}
\end{function}
-%\begin{function}{\QuarkIfNoValue,\QuarkIfNoValueTF}
+%\begin{function}{\quarkIfNoValue,\quarkIfNoValueTF}
%\begin{syntax}
-%\cs{QuarkIfNoValue} \Arg{token list}
-%\cs{QuarkIfNoValueTF} \Arg{token list} \Arg{true code} \Arg{false code}
+%\cs{quarkIfNoValue} \Arg{token list}
+%\cs{quarkIfNoValueTF} \Arg{token list} \Arg{true code} \Arg{false code}
%\end{syntax}
%Tests if the \meta{token list} contains only \cs{qNoValue}
%(distinct from \meta{token list} being empty or containing
@@ -8368,47 +8368,47 @@ in \pkg{functional} code but which need to be manipulated when working as a \LaT
package. To allow these to be integrated cleanly into \pkg{functional} code, a set
of legacy interfaces are provided here.
-\begin{function}{\LegacyIf,\LegacyIfT,\LegacyIfF,\LegacyIfTF}
+\begin{function}{\legacyIf,\legacyIfT,\legacyIfF,\legacyIfTF}
\begin{syntax}
-\cs{LegacyIf} \Arg{name}
-\cs{LegacyIfT} \Arg{name} \Arg{true code}
-\cs{LegacyIfF} \Arg{name} \Arg{false code}
-\cs{LegacyIfTF} \Arg{name} \Arg{true code} \Arg{false code}
+\cs{legacyIf} \Arg{name}
+\cs{legacyIfT} \Arg{name} \Arg{true code}
+\cs{legacyIfF} \Arg{name} \Arg{false code}
+\cs{legacyIfTF} \Arg{name} \Arg{true code} \Arg{false code}
\end{syntax}
Tests if the \LaTeXe{}/plain \TeX{} conditional (generated by \tn{newif})
if \texttt{true} or \texttt{false} and branches \hbox{accordingly}. The
\meta{name} of the conditional should \emph{omit} the leading \texttt{if}.
\begin{demohigh}
\newif \ifFooBar
-\LegacyIfTF {FooBar} {\Return{True!}} {\Return{False!}}
+\legacyIfTF {FooBar} {\prgReturn{True!}} {\prgReturn{False!}}
\end{demohigh}
\end{function}
-\begin{function}{\LegacyIfSetTrue,\LegacyIfSetFalse}
+\begin{function}{\legacyIfSetTrue,\legacyIfSetFalse}
\begin{syntax}
-\cs{LegacyIfSetTrue} \Arg{name}
-\cs{LegacyIfSetFalse} \Arg{name}
+\cs{legacyIfSetTrue} \Arg{name}
+\cs{legacyIfSetFalse} \Arg{name}
\end{syntax}
Sets the \LaTeXe{}/plain \TeX{} conditional \verb|\if|\meta{name}
(generated by \tn{newif}) to be \texttt{true} or \texttt{false}.
\begin{demohigh}
\newif \ifFooBar
-\LegacyIfSetTrue {FooBar}
-\LegacyIfTF {FooBar} {\Return{True!}} {\Return{False!}}
+\legacyIfSetTrue {FooBar}
+\legacyIfTF {FooBar} {\prgReturn{True!}} {\prgReturn{False!}}
\end{demohigh}
\end{function}
-\begin{function}{\LegacyIfSet}
+\begin{function}{\legacyIfSet}
\begin{syntax}
-\cs{LegacyIfSet} \Arg{name} \Arg{boolexpr}
+\cs{legacyIfSet} \Arg{name} \Arg{boolexpr}
\end{syntax}
Sets the \LaTeXe{}/plain \TeX{} conditional \verb|\if|\meta{name}
(generated by \tn{newif}) to the result of evaluating the
\meta{boolean expression}.
\begin{demohigh}
\newif \ifFooBar
-\LegacyIfSet {FooBar} {\cFalseBool}
-\LegacyIfTF {FooBar} {\Return{True!}} {\Return{False!}}
+\legacyIfSet {FooBar} {\cFalseBool}
+\legacyIfTF {FooBar} {\prgReturn{True!}} {\prgReturn{False!}}
\end{demohigh}
\end{function}