{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)

3
votes
0answers
410 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 ...
2
votes
0answers
156 views

Iterating through a character/string array in LaTeX

I have an array of strings, and am trying to output each element into LaTeX. I am able to achieve that using the following code: \documentclass[12pt,english,nohyper]{tufte-handout} ...
2
votes
0answers
125 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
25 views

How we use while loop in latex to input multiple files in main document

I am trying to input multiple files from different directories in my main LaTeX document and I want to use while loop to do that so that all .tex files can be read from a directory. Please give your ...
1
vote
0answers
19 views

Loops within tikz calendar library

(this post is related to this one) Consider the following MWE: \documentclass{report} \usepackage{tikz} \usetikzlibrary{calendar} \newcommand*{\holidays}[1]{% \def\@holidays{#1}% } \holidays{} ...
1
vote
0answers
45 views

Count lines of multiple files (Using minted for formatting.)

I am using minted to show source code in my document like this: \section{Image functions} \inputminted{python}{src/imagefuncs.py} \section{Matrix operations} \inputminted{python}{src/matrices.py} ...
1
vote
0answers
128 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 ...
0
votes
0answers
40 views

Variable font size of a text string

I was wondering if it is possible to use \fontsize{<size>}{<line space>} in a loop in order to create a text string of strictly decreasing/increasing font size from, say, 30 to 2. Surely ...
0
votes
0answers
80 views

Take input from csv file and use it to create a custom-made table in tikz

I have a csv file that looks like this: Scott, William, Todd,Esben, Martin, Jesper, Alexander W.L Right now, the names are written this line \aebuildtable{20}{Scott,William,Todd,Esben, Martin, ...
0
votes
0answers
32 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
46 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
141 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 ...