Questions tagged [grouping]
{grouping} is about the grouping mechanism in TeX, and about local and global assignments.
281
questions
1
vote
3
answers
152
views
Subgroups inside of a table
I'm trying to create the following table so that the parts marked in red are listed as subgroups with indent while the others are unindented.
I have tried multicolumn. However, it worked only ...
0
votes
1
answer
321
views
Add further grouping to nomenclature using {nomencl} + {etoolbox}
To add a nomenclature to my master thesis I follow overleaf's recommendation and use below code.
Grouping is quite important for me. Unfortunately, I cannot figure out how to create subgroups by using ...
2
votes
1
answer
164
views
Construct new environment with \bgroup...\egroup
The following code is just for experiment It would result in a framed box(seem like \fbox{\parbox{2in}{...}}). But it fails. What's wrong with my code?
Yet framed box in this example is not my root ...
1
vote
0
answers
69
views
What is the cost of TeX grouping?
While developing some package I end up with a dilemma:
either a small number of TeX groups but many scratch variables
or a small number of scratch variables but many TeX groups
I have the impression ...
1
vote
2
answers
135
views
Reduce font size for all tables in my document : inside these tables, there are \begingroup and \begin{tabular}
I would like to reduce the font size into of all my tables.
The ideal would be to put new macro at the top of my Latex source.
I show you for the moment the current formatting :
we have 4 bins and not ...
2
votes
1
answer
107
views
What is correct? `(-1)^a` or `{(-1)}^a`? [duplicate]
Essentially the title says it all.
The TeX linter ChkTeX recommends to group parentheses if sub-/superscripting. It makes the grouped content into an atom (my TeX knowledge is minimal), so it is ...
3
votes
1
answer
80
views
How do I move a macro expansion outside of the current semi-group, without defining the macro globally?
I've written a macro \measureHbox{} which calculates the height and width of a breaking \hbox where the lines are separated with \breaks:
\long\def\measureHbox#1{%
\begingroup
\def\break{\...
3
votes
1
answer
556
views
What's the cleanest way to set \emergencystretch only for one list item?
Feeding pdflatex with
\documentclass{article}
\pagestyle{empty}
\usepackage[USenglish,latin]{babel}
\babelprovide[hyphenrules=nohyphenation]{latin}
\usepackage{enumitem}%%% the same problem occurrs ...
0
votes
2
answers
66
views
text underscore groups with caption
I am trying to achieve what I have called the underscore groups with caption. I don't know the exact name and I have tried to search on the internet for this, without any success.
Here is an image ...
0
votes
4
answers
485
views
Define global function within \begingroup ... \endgroup
I have a command that accepts optional arguments as key-value pairs, handled by the l3keys package. I use \begingroup and \endgroup to \keys_set:nn the keys in order to process set options only for ...
1
vote
0
answers
107
views
I'm working with MiKTeX, TeXstudio and writing letters with KOMA-Script and get the following warning "Unused global option(s): [dieter]."
My dieter.lco file includes besides personal information the following lines
\ProvidesFile{dieter.lco}[2022/01/08 scrlttr2 options]
\RequirePackage{ngerman}
\RequirePackage{fix-cm}
\...
2
votes
3
answers
79
views
How to detect if a command, which is undefined in the current scope, also is undefined in all superordinate scopes?
Theoretical question/moot point:
Scenario: You wish to have defined a command globally. But you wish to have it defined only if it is undefined both in the current scope and in all superordinate ...
0
votes
0
answers
78
views
How to execute TeX only for side effects
I need to execute a part of my TEX code without printing the text it produces while making \global macros defined by it available.
For example, when I have this group:
{
foo\global\def\bar{baz}
}
I ...
2
votes
1
answer
77
views
Grouping mainmatter prevents chapter count
When I group my mainmatter to prevent it of inserting a blank page, my chapter numbering dissapears as well.
I can't seem to find any work-around or even why this is happening.
\documentclass[a4paper,...
3
votes
2
answers
398
views
How can I save and restore fontdimen parameters?
I am using the fontdimen code in this answer to make spaces stretch in inline code samples (credit to Stefan Kottwitz):
\documentclass{minimal}
\usepackage{lipsum}
\newcommand*\justify{%
\...