{loops} is about looping constructs which allow a programmer to apply the same operation multiple times, each time with possibly different parameters.

learn more… | top users | synonyms (1)

0
votes
1answer
5 views

Redefining a Command in a Loop Over a Comma Separated List

I want to redefine the glossaries package’s \gls commands to include an index entry and an optional argument for formatting the index entry. However, there are so many variants of this command (\gls, ...
4
votes
0answers
55 views

TikZ: \foreach loop not executing expected number of iterations

I am trying to draw a Bézier curve defined by five control points following the algorithm discussed here. I generate the points of the curve with a \foreach loop: one point per iteration (also, from ...
2
votes
0answers
58 views

Why this loop with “evaluate” does not work?

\documentclass[margin=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,calc} \begin{document} \begin{tikzpicture} \foreach \x [evaluate=\x as \name using \x*20] in{0,0.05,0.1,0.15,...,5} ...
2
votes
0answers
136 views

Passing an array type argument for new command

I've looked around and can't seem to find anywhere, but I was wondering if there is somewhere you can do something like the following: \newcommand{\loopy}[1]{ \begin{tikzpicture} \foreach ...
1
vote
0answers
47 views

dynamically generating tabular columns

Consider a table (regular tabular environment) with a fixed number of columns. I want to create a command that accepts a comma-separated list of strings, where the number of strings may differ between ...
1
vote
0answers
96 views

array and loop to set frametitle, subsection, and text

In the example below, I store text into three variables (\subTa, \subTb, \subTc), and then use these variables to set the subsection, set the frametitle, and display text on each slide, all using ...
1
vote
0answers
42 views

Label of figure in a for loop

I am adding figures to my TeX file using the following code: \foreach \paramA in {a,b,c} { \foreach \paramB in {1,2,3} { \begin{figure} \addOneImage{pathToImage/imageName_\paramA_batch\paramB.png} ...
0
votes
0answers
21 views

How to cite this in revtex4-1?

I have trouble to achieve the following citation style: Tam, K. C. , M. L. Farmer , R. D. Jenkins , and D. R. Bassett It's not standard APA or MLA styles.
0
votes
0answers
28 views

How to load input file with given starting string but unknown end?

In the directory of my latex source there are input files: input_01.tex, input_02.tex, etc. It is very easy to load them with a for cycle. But how to load them if their names are: ...
0
votes
0answers
51 views

`pdfpages` `\includepdf`'s page list input options

I'd like to use pdfpages to make a print layout of my documents, in order to print them in A4 paper, but with 2 pages per page. The problem is setting the page order in a way I can cut the printed A4 ...