2
votes
1answer
87 views

Conditional assignment in a loop

Objective: I want to compile the temporary.tex file containing PSTricks code twice. One with -jobname=Rotated and the other one with -jobname=Unrotated. The resulting Rotated.ps will be passed to ...
6
votes
2answers
315 views

How to make global a color list definition with \@namedef done inside a foreach loop

Motivation As stated in the title, I'm trying to define a command able, from a list of colors as input, to create a list in which colors are numbered. This, manually, has been done in Arrows ...
6
votes
1answer
290 views

How to define macros in a foreach loop with effects between iterations and after the loop without using global?

Without using \global, the following code: \documentclass{minimal} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{etextools} \newcommand\appendbyforeach[2]{% ...
3
votes
2answers
376 views

binary representation of an integer

Is there a way to get a binary string of an integer calculated by e.g., \pgfmathparse{pow(2,3)} \pgfmathresult such that later on I can use the string digits in a foreach loop like .. if it is '1' do ...