Questions tagged [argument-processors]
Argument processors allow manipulation of a grabbed argument before it is passed to the underlying code.
4 questions
7
votes
1
answer
128
views
ltcmd: the c type argument grabs optional arguments of an environment
MWE:
\documentclass{book}
\usepackage{xcolor}
\NewDocumentEnvironment{foo}{ D(){} O{} m }{start \fbox{#1, #2, #3}}{ end}
\begin{document}
\chapter{Example}
\begin{foo}(optional parenthesised argument)
...
3
votes
1
answer
75
views
Provide extra constant arguments to a mapped function
Consider the following code:
\documentclass[10pt]{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\split}{m m}{
\seq_set_split:Nnn \l_tmpa_seq{#2}{#1}
\seq_map_indexed_function:...
1
vote
0
answers
57
views
Preprocessing an environment body and replacing certain environments: Nesting aligns
I want to learn some advanced token manipulation techniques and set myself the following "academic" challenge: Write an environment that takes its body, places certain elements of said body ...
3
votes
3
answers
352
views
A command with potentially many arguments (to cite several Stacks Project tags at once)
I am currently using the following in my preamble:
\newcommand{\stacksref}[1]{%
\cite[\texttt{\href{https://stacks.math.columbia.edu/tag/#1}{#1}}]{SP}
}
so that for instance \stacksref{AB78} gives ...