Skip to main content

All Questions

Tagged with
10 votes
3 answers
496 views

Latex3: elegant way to forward a variable outside of the group

I want to define a macro in a group in LaTeX3 so that it stays defined after the group, but without using global variables. For now I do: \documentclass{article} \ExplSyntaxOn \NewDocumentEnvironment{...
tobiasBora's user avatar
  • 8,964
6 votes
3 answers
575 views

Questions about `\cs_new:...` and friends and their TeX relatives regarding global, local, long, nopar, protected, expandable and naming

This question is two-fold. Unfortunately, one side is opinionated, i.e. something to close-vote, so I put that part at the end and hope no one notices... The other side (coming first) are serious ...
Robert Siemer's user avatar
8 votes
1 answer
388 views

Does LaTeX3 address the subject of scope (i.e. grouping)?

TeX scope is an overwhelmingly convoluted and opaque subject. It is impossible to tell by sight when a scope starts and ends, and what exactly is being affected by it. Since scope is one of the ...
Evan Aad's user avatar
  • 11.1k
15 votes
5 answers
715 views

\tl_replace_all:Nnn recurse subgroups

Suppose I had a token list variable containing abc{ab{abc}c}. I want to replace every occurrence of b with d. As you can see there are subgroups containing b which I also want to have replaced, so ...
Henri Menke's user avatar
27 votes
6 answers
2k views

How do I get a value out of a group?

I've just recovered from my first real foray into LaTeX3 programming. It was ... an experience. Not a completely unpleasant one and once I'd gotten used to the syntax then I found it a lot easier ...
Andrew Stacey's user avatar
12 votes
3 answers
6k views

LaTeX3: how to define a variable locally

I am trying to learn the LaTeX3 syntax. One of the questions I have come up with is how to define a variable, i. e. a macro without arguments in TeX parlance, with local scope within a group. In TeX ...
AlexG's user avatar
  • 55.4k