Skip to main content

Questions tagged [expansion]

{expansion} is about expanding tokens, including the manipulation of expansion order and the suppressing of expansion.

12 votes
1 answer
214 views

Looking at the definition of \tl_set:Nn (for example, with latexdef \tl_set:Nn), we find \tl_set:Nn: \protected\long macro:#1#2->\__kernel_tl_set:Nx #1{\__kernel_exp_not:w {#2}} where \...
jlab's user avatar
  • 16.9k
4 votes
2 answers
165 views

MWE: \documentclass{article} \begin{document} \ExplSyntaxOn \iow_new:N \g__test_iow \iow_open:Nn \g__test_iow { test.pl } \iow_now:Ne \g__test_iow { \# } \iow_close:N \g__test_iow \ExplSyntaxOff \end{...
Grass's user avatar
  • 1,038
4 votes
2 answers
142 views

MWE: \documentclass{article} \usepackage{mathtools} \begin{document} \ExplSyntaxOn \tl_new:N \g__mymodule_env_name_tl \tl_new:N \g__mymodule_env_args_tl % Defaults \tl_set:Nn \g__mymodule_env_name_tl {...
Grass's user avatar
  • 1,038
9 votes
4 answers
418 views

I am trying to use a macro to define the optional arguments to a tcbraster environment. Here is a simple example: \documentclass{article} \usepackage{tcolorbox} \tcbuselibrary{raster} \def\myoptions{...
user419944's user avatar
2 votes
1 answer
110 views

I often find myself repeating the following at the start of my tables: \setupTABLE[<X>][<Y>][background=color, backgroundcolor=mycolor1, foregroundcolor=mycolor2] with only X or Y ...
gxono's user avatar
  • 2,538
3 votes
2 answers
167 views

I often need to hide answers using \phantom, and store them in an expl3 sequence via a custom command \addanswer, for later use. Each call to \addanswer is intended to store its argument only once. ...
mathteacher's user avatar
8 votes
3 answers
296 views

In this example: { \let\oldpar=\par \xdef\par{NEXT UP!\oldpar} } Par 1 Par 2 Par 3 \bye TeX complains that oldpar is not defined. I do not understand why it tries to look for a definition ...
INEEDANSWERS's user avatar
10 votes
1 answer
233 views

I have been experimenting with the \newif construction in plain \TeX. To keep my experiments from clashing with plain \TeX, I changed the definition slightly to \outer\def\znewif#1{\count255=\...
Unclechromedome's user avatar
5 votes
0 answers
71 views

This is a semi-followup to How to debug/correct missing number error in plug during memoization?. Aim: handle properties (ltproperty) in memoized code (memoize). Specifically: A problem arises ...
cfr's user avatar
  • 248k
4 votes
2 answers
187 views

I know now that the code I am including here is the wrong way to save the output of a macro because expansion comes before function evaluation (so now I am doing something completely different), but I ...
haileyjay's user avatar
3 votes
3 answers
250 views

Background A custom document date and ID should be set in the pdf metadata of a presentation made with beamer. Consider the following MWE for scrreprt: % !TeX program = lualatex \documentclass{...
dsacre's user avatar
  • 1,150
3 votes
1 answer
163 views

I got very surprised by the fact that seemingly when I use \def on active ~ it retains a protected status. Is that the expected thing? \ifdefined\starttext\else\let\starttext\empty\let\stoptext\end\...
user691586's user avatar
  • 4,124
4 votes
2 answers
151 views

My aim is to create a command that issues a dimension for box height control. In the example below, I've tried to get it work with an optional argument but I don't get why it throws an error regarding ...
Maxime Jean's user avatar
1 vote
1 answer
69 views

I have the following code: \documentclass{article} \usepackage{tkz-euclide} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [% matrix of math nodes, ] {% ...
Explorer's user avatar
  • 8,735
5 votes
1 answer
77 views

I don't really understand how \exp_last_unbraced: works and what the documentation means by: "with the last argument not surrounded by the usual braces." How does it differ from the regular \...
Ankaa's user avatar
  • 151

15 30 50 per page
1
2 3 4 5
81