Tagged Questions
15
votes
1answer
142 views
First occurrence of a command
I'm writing some macros that need to behave differently after first occurrence. I decided to use the etoolbox package's toggle. My MWE is as follows:
\documentclass{article}
\usepackage{etoolbox}
...
23
votes
3answers
4k views
When to use @ in an \if statement
I am new to LaTeX and so this question might come across as rather basic.
It might also reflect my biases/assumptions from my C/C++ programming days.
I was seeing the code of the 'exam' class and ...
13
votes
2answers
2k 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 ...
2
votes
3answers
463 views
TeX Nested Loops With \iftoggle
This forum has helped me understand how to use nested loops in TeX, but now I am having trouble using \iftoggle (from the etoolbox package) with loops. My goal is to have a toggle that can keep track ...
4
votes
1answer
342 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}
...
6
votes
1answer
440 views
How to display some text based on a condition inside a tabular environment?
I defined a variable \@afwezig that holds people that were not present at a certain meeting.
\long\def\@afwezig{}
\def\afwezig#1{\def\@afwezig{#1}}
Now I want to make the header of the meeting ...