Tagged Questions
5
votes
2answers
136 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
188 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
282 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 ...