Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [for-loop]

The tag has no usage guidance.

0
votes
0answers
26 views

How to put texts on a newline in an algorithm (in a nested for-loop)?

I am making an algorithm with a nested for loop, and there are multiple in the loop. They are presented on the same line, but I want them to start on a newline. Any ideas how I can do this? This is ...
1
vote
1answer
32 views

Adding additional text to some elements of a loop?

The following question stinks a bit of crazed micro-optimization. But I had written it, and I was a bit curious, so I thought I might as well post it. The following loop iterates over inserting some ...
0
votes
1answer
29 views

Looping for Two-column Signature Blocks

I'm trying to create a two-column area for signatures, so folks signing the document are listed in the left column or right column, and there are enough rows to accommodate everyone's signature. Under ...
1
vote
1answer
139 views

The construction of Rooty helix, code explanation

Could someone please explain some parts of this code? I'm newbie on LaTeX and could not understand some parts. What does this \foreach \y in {86,38,15} means? Could you explain with details what is ...
2
votes
2answers
70 views

Why does this document add empty pages?

I have this document and it adds ONE empty page at the beginning and TWO empty pages at the end - why is that and how can I get rid of those? So, instead of only 2 pages, I end up with 5! \...
2
votes
1answer
72 views

\ForEach fails with underscores

For the automatic generation of reports I'm using the \ForEach loop of the forarray package. This is just great as it saves me lots of time. However, there is one issue: When the items I iterate ...
0
votes
1answer
35 views

\DTLfetch not working with Variable

I have csv database loaded in data variable. I am trying to fetch value from particular column given an another column name and its value. I am using following code \forloop{i}{1}{\value{i} < 30} {...
1
vote
1answer
159 views

\forloop problem(undefined control sequence)

(/usr/local/texlive/2018/texmf-dist/tex/latex/fontspec/fontspec.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/xparse/xparse.sty (/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/...
1
vote
1answer
58 views

How to put bengali serial no on making empty table using for loop?

\documentclass{article} \usepackage{forloop} \usepackage{polyglossia} \setmainlanguage[numerals=Devanagari]{bengali} \setmainlanguage{bengali} \setotherlanguage{english} \newfontfamily\bengalifont[...
1
vote
1answer
31 views

Repetition inside tabular

Are there any simple way to perform repetition inside a tabular environment? This is what I intended to do: \documentclass[a4paper,10pt]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{tikz} \...
5
votes
3answers
280 views

etoolbox for loop over range

Is there a way to run a command on a range of consecutive integers (say, 11, 12, 13, 14, 15), specifying only the first and last numbers (11 and 15)? Basically I'm looking for the general LaTeX ...
3
votes
2answers
61 views

Narrowing a minus sign in math mode (allowable in for loop)

I want to fit the "N-1" into the box below if possible; if I use the solution \text{-}, namely 3/{N\text{-}1}, it gives me an error: Undefined control sequence: } (followed by: ) Is there a way to ...