mirror of
https://github.com/jgm/pandoc.git
synced 2026-10-03 12:48:02 +00:00
Support the features described in the LaTeX usrguide (https://www.latex-project.org/help/documentation/usrguide.pdf): - `\New/Renew/Provide/DeclareDocumentCommand` and the corresponding `...DocumentEnvironment` commands, with argument specifiers `m o O d D s t r R v e E b` and argument processors (`>{...}`: `\TrimSpaces`, `\ReverseBoolean`, `\SplitArgument`, `\SplitList`). Environment end code can refer to the environment's arguments. - `\ProcessList`, `\UseName`, and `\ExpandArgs` (c, n, N letters). - The conditionals `\IfNoValueTF`, `\IfValueTF`, `\IfBooleanTF`, `IfBlankTF` (and variants with just `T` or `F`). - `\New/Renew/DeclareCommandCopy` and `...EnvironmentCopy`. - Case changing: `\MakeUppercase`, `\MakeLowercase`, and `\MakeTitlecase`, `\NoCaseChange`, `\Declare{Upper,Lower,Title}caseExclusions`; `\CaseSwitch` and `\Declare*caseMapping`. - The expandable evaluators `\inteval` and `\fpeval` (a practical arithmetic subset); `\dimeval` and `\skipeval` substitute their expression unevaluated. - `\expandableinput`. - `\ExplSyntaxOn/Off` regions are tokenized with `:` and `_` as letters, so expl3 code can be skipped cleanly; `\ShowCommand` and the ltkeys commands (`\DeclareKeys`, `\SetKeys`, `\ProcessKeyOptions`, ...) are parsed and ignored. - Some constants, such as `c_ampersand_str`, are supported in expl3 regions. Adds new `ArgSpec` constructors to non-exported module Text.Pandoc.TeX. New tests in `test/command/latex3-commands.md` and `test/command/latex3-usrguide.md`. (The latter correspond to the examples in the user guide and were confirmed against LaTeX output when possible.) Closes #7540. Co-Authored-By: Claude <noreply@anthropic.com>