Skip to main content

All Questions

Tagged with
8 votes
2 answers
1k views

Defining TeX count in a group

I thought that TeX counts were local definitions, but that is not what I am seeing. I was expecting that if I used \newcount within a group, that the etoolbox \ifdefcounter would say that the counter ...
StrongBad's user avatar
  • 20.6k
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 ...
Display Name's user avatar
  • 47.2k
20 votes
3 answers
1k views

Should LaTeX counters always be modified globally?

In this answer, egreg states that "LaTeX counters should always be modified globally". However, the etoolbox package provides the \defcounter macro which will assign a value to a previously ...
lockstep's user avatar
  • 252k
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 ...
Jason Gross's user avatar
  • 2,169
4 votes
1 answer
721 views

Booleans fail in tabular environment

I've got a workaround for this problem, but maybe someone knows a cleaner way to fix it. I'm using the standard packages in TexLive 2009. Here's the code that doesn't work: \documentclass{article} \...
Ben's user avatar
  • 143