Questions tagged [grouping]
{grouping} is about the grouping mechanism in TeX, and about local and global assignments.
281
questions
0
votes
1
answer
43
views
Locally adjust a dimension written into aux
I am writing some code that makes use of a dimension (termed \shape below) that gets adjusted several times over the course of the code. The value \shape has by the time the code is finished is what ...
2
votes
1
answer
65
views
Put \item into a group so that typesetting effects are limited for the list entry
I want to have an implicit grouping for each \item in an itemize or enumerate environment to limit typesetting effects (coloring, emphasizing) to the respective \item.
E.g.,
\begin{itemize}
\item\...
0
votes
1
answer
106
views
Issue with Hyperlinks in PDF using Hyperref Package
I am currently facing an issue with the placement of hyperlinks in a PDF document that I am typesetting using LaTeX and the hyperref package. I have tried various approaches, but I haven't been able ...
0
votes
1
answer
82
views
Exercise 5.7 in TeX - define control sequences with grouping
I want to solve Exercise 5.7 in the TeXBook by Donald E. Knuth.
Define control sequences **\beginthe**<block name> and **\endthe**<block name>
that provide a “named” block structure.
In ...
0
votes
1
answer
22
views
Variables set within tables and reused later in the document
I am writing a document that involves a table of information for many sections, something like:
\textbf{Details:}
\begin{table}[H]
\begin{center}
\begin{tabularx}{\linewidth}{|X|c|c|c|c|c|}
...
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{...
2
votes
2
answers
98
views
Pgf foreach ungrouped displays list twice
While trying to give a foreach loop a macro to loop into, I found on Macro not working in foreach loop that I can use \pgfplotsforeachungrouped and it was indeed able to loop through my macro.
However,...
0
votes
1
answer
68
views
Grouping mismatch if loop is dissolved
I am sure that I overlooked something very obvious. Still, why does the example in this nice answer work, but if I remove the loop, I get an error about a grouping mismatch?
Consider the following ...
3
votes
4
answers
255
views
Table decleration
In my document, I have a table, I want to use \setlength{\tabcolsep}{18pt} but since there is one more table, this also affects the other, which I don't want to change. Therefore I thought of creating ...
1
vote
0
answers
25
views
Add content in a global table located in the beginning of the document
I would like to generate a global table with entries that can be added with a command. I based myself on this post. The issue I have is that I can only display the table after I added all its entries. ...
0
votes
0
answers
20
views
Grouping problem in figure vertical alignment of text
I had the same problem as in LINK. The question is about using \endgroup somewhere. If I use the following code
\usepackage[a4paper,hmargin=1in,top=1.2in,bottom=1in]{geometry}
\usepackage{lipsum}
\...
13
votes
2
answers
1k
views
Is this the right way to understand \let \def \edef \gdef \xdef \newcommand \renewcommand \providecommand?
I've already looked at at least ten different q&as explaining the differences of a subset of the commands listed above. While experimenting with them and trying to understand the subtle ...
3
votes
1
answer
117
views
`\global\NewCommandCopy` instead of `\GlobalLetLtxMacro`?
The new LATEX2ε kernel provides \NewCommandCopy (and \Renew... and \Declare... variants) which functions almost like \LetLtxMacro from the letltxmacro package.
Instead of \GlobalLetLtxMacro from ...
0
votes
0
answers
34
views
How to make calling of xeCJK work in a group
From the following example, you can see that calling a package in a group does work (xcolor in this example), except the package xeCJK.
Does that mean this is a bug of xeCJK, or is there other way to ...
0
votes
1
answer
71
views
How to define a macro globally with a name containing a number?
I'm trying to define multiple macros in a \foreach loop. The name of each macro contains a different integer. To do that I use \csname ... \endcsname.
The issue is I would like to be able to call ...