Title: Theory / Unimportant / CS / Descriptive / LaTeX / Package / xparse
Tags: FromInstruction computer_to_instruction hasNotNewEffectReturnsMeaning declaration todo_declaration
On every note of this deck, unless a note says otherwise:
Chapter: http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/l3packages/xparse.pdf

Name: xparse
Definition: provides a high-level interface for producing document-level commands. In that way, it is intended as a replacement for the LATEX 2ε \newcommand macro.
Page: 1
Chapter: http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/l3packages/xparse.pdf

Name: argument specification
Definition: the number of arguments,
Page: 2
Chapter: http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/l3packages/xparse.pdf
Section: 1
Context: xparse
Definition2: the type of each argument and
Conjdef: All of
Definition3: any additional information needed for xparse to read the user input and properly pass it through to internal functions

Instruction: m
Page: 2
Effect: Introduce a mandatory argument
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: rxy
Page: 2
Effect: state that x and y are required delimiters argument
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: Rxy{foo}
Page: 2
Effect: state that x and y are required delimiters argument, with default value foo
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: v
Page: 2
Effect: Reads an argument verbatim similar to \verb
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: o
Page: 2
Effect: A standard LATEX optional argument, surrounded with square brackets, which will supply the special -NoValue- marker if not given
Language: Latex
Context: xparse
Section: 1

Instruction: Dxy{foo}
Page: 2
Effect: An optional argument delimited by x and y with default value foo
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: dxy
Page: 2
Effect: An optional argument delimited by x and y
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: O{foo}
Page: 2
Effect: optional argument with default value foo
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: s
Page: 2
Effect: An optional star, which will result in a value \BooleanTrue if a star is present and \BooleanFalse otherwise
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: tx
Page: 2
Effect: result in a value \BooleanTrue if the character x is present, and \BooleanFalse otherwise
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: e{x_1 ... x_n}
Page: 2
Effect: Introduce embellishments for each letters x_i
Language: Latex
Context: xparse argument specification
Section: 1

Instruction: E{x_1 ... x_n}{{foo_1}...{foo_m}}
Page: 2, 5
Effect: Introduce embellishments for each letters x_i, with foo_i as values if foo_i exists, and -NoValue- otherwise
Language: Latex
Context: xparse argument specification
Section: 1, 6

Instruction: {foo}
Page: 2
Effect: foo used as argument, even if contains a [, a ], or some other thing which may be intepreted differently than an argument content
Language: Latex
Context: xparse argument
Section: 1

Instruction: +spec
Page: 2
Effect: the argument specification spec is \long
Language: Latex
Context: xparse argument specification
Section: 1
Variables: spec an argument specification

Instruction: >spec
Page: 2
Effect: state to use an argument preprocessor on the argument passed as argument before giving the argument to the command
Language: Latex
Context: xparse argument specification
Section: 1
Variables: spec an argument specification

Instruction: !spec
Page: 2
Effect: State that the optional argument spec should not be precede by a space
Language: Latex
Context: xparse argument specification
Variables: spec an argument specification

Instruction: \NewDocumentCommand
{\foo}
{bar}
{miam}
Page: 6
Effect: Create a command of name \foo taking argument bar and generating miam
Language: Latex
Context: xparse argument specification
Section: 7

Instruction: \NewDocumentCommand{\foo}{bar}{miam}
Page: 6
Effect: Create a command of name \foo taking argument bar and generating miam
Language: Latex
Context: xparse argument specification
Section: 7
Assuming: \foo does not already exists as a command

Instruction: \RenewDocumentCommand{\foo}{bar}{miam}
Page: 6
Effect: Redefine the command \foo, now taking argument bar and generating miam
Language: Latex
Context: xparse argument specification
Section: 7
Assuming: \foo already exists as a command

Instruction: \ProvideDocumentCommand{\foo}{bar}{miam}
Page: 6
Effect: Define the command \foo, taking argument bar and generating miam, if this command does not already exists, otherwise do nothing
Language: LaTeX
Context: xparse
Section: 7

Instruction: \DeclareDocumentCommand{\foo}{bar}{miam}
Page: 6
Meaning: Define the command \foo, taking argument bar and generating miam, even if this command already exists
Language: Latex
Chapter: http://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/ctan/macros/latex/contrib/l3packages/xparse.pdf
Section: 7
Context: xparse

Instruction: \IfNoValueTF{foo}{bar}{miam} \IfValueTF{foo}{miam}{bar}
Page: 7
Effect: If foo is the marker -NoValue- then expand as bar otherwise as miam
Language: Latex
Context: xparse
Section: 8

Instruction: \IfNoValueT{foo}{bar} \IfValueF{foo}{bar}
Page: 7
Effect: If foo is the marker -NoValue- then expand as bar otherwise does not expend
Language: Latex
Context: xparse
Section: 8

Instruction: \IfNoValueF{foo}{bar} \IfNoValueT{foo}{bar}
Page: 7
Effect: If foo is distinc from the marker -NoValue- then expand as bar otherwise does not expend
Language: Latex
Context: xparse
Section: 8

Instruction: \IfBooleanTF{foo}{bar}{miam}
Page: 8
Effect: If foo is the boolean true, then do bar else miam
Language: Latex
Context: xparse

Instruction: \ReverseBoolean
Page: 8
Effect: Preprocessor applying Boolean negation
Language: Latex
Context: xparse
Section: 9

Instruction: \SplitArgument{foo}{bar}
Page: 9
Effect: Preprocessor which split the argument along its separator bar into foo elements.
Language: Latex
Context: xparse

Instruction: \SplitList{bar}
Page: 9
Effect: Preprocessor which split the argument along its separatior bar
Language: Latex
Context: xparse

Instruction: \ProcesList{foo}{bar}
Page: 9
Effect: Applies bar to each element of foo
Language: Latex
Context: xparse
Assuming: bar generated by SplitList

Instruction: \TrimSpaces
Page: 10
Effect: preprocessor trimming spaces
Language: Latex
Context: xparse
Section: 9

Instruction: Expandable commands
Page: 11
Effect: are omitted
Language: Latex
Context: xparse
Section: 10