15
votes
7answers
442 views

Making calculations using counter

I need to use the counter to make some computations inside loops. For instance, I want to write a for loop to get the following: ...
4
votes
1answer
682 views

Creating variables with index (using counters)

Is there a way to add an index to a command? For example: \newcounter{count} \loop<condition> \def\var\Roman{count}{some data} \repeat The \var\Roman{count} should become the variable ...
5
votes
1answer
339 views

Is there something like \renewcounter or \providecounter?

Is there a command that creates a counter or, if it already exists, redefines it? Thing is that I'm working with nested loops. The second loop is however in a command. This means if I want to use a ...
2
votes
3answers
189 views

Process Last Item in \ForEach (forarray package)

The following command of the forarray package \ForEach{,}{\thislevelitem(\the\thislevelcount) : }}{x,y,z} produces the output x(1) : y(2) : z(3) : I want to have the same output without the last ...
3
votes
1answer
162 views

How can I create copies of a document with a running number?

I am making a questionnaire, to be filled out with pen and paper. I need 40 copies of it, with around 13 pages each. I expect that some participants might take the questionnaire apart, so I have to be ...
3
votes
2answers
477 views

Unexpected tikz/counter behaviour

What I've been trying to do, futilely, is to use the foreach[counter=\xi] x in {1,2,3} statement in tikz/pgf with LaTeX. This fails, every time. Whatever. So I moved on to trying to use a counter, ...