Skip to main content

Questions tagged [grouping]

{grouping} is about the grouping mechanism in TeX, and about local and global assignments.

46 votes
1 answer
4k views

] inside an optional argument

I accidentally discovered (here) that a closing square bracket within an optional argument delimited by [ ] can cause problems. Here is example code illustrating the issue: \documentclass{article} \...
Lover of Structure's user avatar
53 votes
2 answers
84k views

Temporarily increase line spacing

How do I temporarily increase line spacing? I have some text on my title page: \begin{center} { \Large \textbf{The Great Thesis About Some Very Great Things Indeed With a Pretty Long Title That Will ...
Enchilada's user avatar
  • 2,313
27 votes
5 answers
3k views

Is there a way to set a *global* key value using `pgfkeys`?

The simple answer to this question appears to be "No"; quoting from the pgf manual: The setting of a key is always local to the current TeX group. However, this is very annoying because it means ...
Andrew Stacey's user avatar
152 votes
2 answers
61k views

When should one use \begingroup instead of \bgroup?

Is there ever a case when the use of \begingroup is preferred to \bgroup? Obviously, \bgroup is necessary in cases where you need to have balanced braces and thus cannot use {, but when is it ...
TH.'s user avatar
  • 63.1k
28 votes
3 answers
8k views

\global\renewcommand equivalent of \global\def

The following MWE works just fine, but I had to resort to using \global\def (not that there's anything wrong with it). The intent of the MWE is to provide access to the value of macro as set in an ...
Peter Grill's user avatar
23 votes
1 answer
2k views

Global scope or permanent length or savebox

I am trying to save a minipage width and height in one environment, and use these dimensions in a subsequent environment of mine, to make a picture environment. The idea is to create a picture on the ...
alchemit's user avatar
  • 233
12 votes
3 answers
2k views

Drawing a proper shadow for overlapping objects

I draw images that are composed of several overlapping nodes. If I add a drop shadow to each node, the shadow of the second node is drawn over the first node, as seen in the picture below (which ...
krlmlr's user avatar
  • 12.6k
31 votes
3 answers
7k views

What does \begingroup\expandafter…\endgroup do?

I often see code of the following form in package implementations (this example is from the LaTeX3 sources): \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname directlua\...
Andrey Vihrov'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
25 votes
3 answers
4k views

What is the difference between local and global in a TeX meaning?

In tikz declare function and babel french option it came to the question about the difference between local and global in a TeX meaning. In the linked question the babel shorthand ; should be ...
Tobi's user avatar
  • 56.8k
6 votes
2 answers
701 views

Why do I have to put braces around my macro for subscripts / indices?

I want to define a macro \ind which let's me set in math mode a subscript in upright letters and when starred (\ind*) in italic letters. Additionally, an optional argument allows me to adjust the ...
Marc Krass's user avatar
6 votes
2 answers
2k views

Tikz: How to move a footnote in a node out of that group?

Apologies for the slightly strange title, I struggled to come up with something else. I have defined my own quote environment with brackets around the quote. In order to do that I use tikz and the ...
Martin H's user avatar
  • 18.3k
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
13 votes
2 answers
2k views

Is there a way to limit the scope of \usepackage?

When I tried to use the breqn package suggested by an answer to the question How do I break a long equation over lines It managed to break a whole bunch of unrelated equations (equations that did ...
merlin2011's user avatar
  • 3,373
10 votes
2 answers
1k views

Beamer: content in box register does not survive \end{frame}

Consider the following example (I edited the example to include LaTeX lrbox environment): \documentclass{beamer} \newsavebox\mybox \newsavebox\myboxb \begin{document} \frame{ \sbox\mybox{Hello ...
AlexG's user avatar
  • 55.4k

15 30 50 per page
1
2 3 4 5
7