All Questions
7
questions
8
votes
2
answers
1k
views
Defining macro \gsetlength as global setlength, reliable?
As is noted in other questions, such as Global scope or permanent length or savebox, the \setlength command does not always have global effect. In many cases, that is desirable. But when the effect ...
1
vote
0
answers
30
views
Behavior of \global when used with xifthen package [duplicate]
I'm trying to calculate the sum of some numbers in my document. I want to allow non-integer values, so I'm using lengths, which works just fine.
In my document it's often necessary to specify the ...
4
votes
1
answer
330
views
Measure and retain lengths between tabular rows
I need elements in a tabular environment to set some lengths and be able to access these lengths in another row of this same table. But it appears that adding \global in front of \settoheight and \...
3
votes
2
answers
2k
views
Linewidth resets when using input files
I'm trying to set some figure files in standalone .tex files, and then input them in the main file. Those files looks something like this
\ifx \plotwidth \undefined
\newlength{\plotwidth} \setlength{...
18
votes
4
answers
4k
views
Is there a way of limiting the scope of \newlength?
Is there a way of limiting the scope of \newlength? I'm using the same name in many TikZ picture but each with different value, and I don't want it to live on between the pictures as it's not intended ...
13
votes
1
answer
2k
views
Why do \setcounter and \addtocounter commands have global effect, while \setlength and \addtolength commands obey the normal scoping rules?
The \setcounter and \addtocounter commands have global effect,
while the \setlength and \addtolength commands obey the normal
scoping rules.
Why were they designed like this? Why are \setcounter ...
13
votes
3
answers
701
views
Making register declarations local, Undefining a register (count, toks, etc.)
Is it possible to make \newcount, \newtoks, etc. respect grouping, so that, e.g., \newcount\temp\temp=2{\newcount\temp\temp=1}\showthe\temp gives 2 (instead of 0)?
Relatedly, is it possible to ...