Questions tagged [for-loop]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
3answers
290 views

Read file contents to variable and iterate over each character in file (hexdump)

I need to read file content as string (binary file) to variable, then iterate over each character in that string, convert each character to its hexadecimal representation, use comma (or any other ...
1
vote
1answer
66 views

algorithm Logic: Make Loop for each 3 rows in datatools

i want to make loop with process: Current: (with below code) each row create one page Box A, B, C: Same data from one row of datatool Need update: Create one page only \Break=break or each 3 ...
6
votes
1answer
90 views

How to write a loop to reflect a path (Asymptote)?

I am trying to shorten a code that contains a lot of reflections by writing a loop: [asy] unitsize(1.5 cm); pair A,B,C; real alpha=(20); real beta=(10); real gamma=(180-alpha-beta); real rad=(pi/180)...
2
votes
1answer
34 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
51 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
37 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
152 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
73 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
96 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
43 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
228 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
98 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
32 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
312 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
66 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 ...