Tagged Questions
3
votes
1answer
39 views
How do I create an expandable conditional with a loop inside?
I need to create an expandable conditional that uses a loop (that is, a ..._map_function:). It should either return true from inside the loop, or return false otherwise. In a 'normal' programming ...
4
votes
1answer
97 views
How to make tabularx columns using \whiledo?
My question is similar to that discussed in How to programmatically make tabular rows using `\whiledo` ?. The difference is that I want to produce columns rather than rows with using \whiledo. ...
8
votes
5answers
307 views
Teach me how to use \loop…\repeat constructs, etc
The following code snippet is a part of the solution given here:
\def\IncludeOutput#1{
\parskip=2mm
\def\examplename{#1}
\pdfximage{\Directory/\examplename.pdf}%
...
2
votes
1answer
229 views
conditional inside a pgfplotsinvokeforeach loop
I'm using \pgfplotsinvokeforeach to do mathematical computations inside the \addplot options. Now I need a conditional to decide whether to plot a line or not depending on the current index of the ...
5
votes
2answers
603 views
Less than or equal comparison within a whiledo
I am in the process of cleaning up the code for Sieve of Eratosthenes in tikz, but saw that when I initially did the code, I could not figure out how to do a <= comparison within the \whiledo, and ...
2
votes
3answers
250 views
How to simulate 2 dimensional loop using 1 dimensional loop?
animate package does not allow nested loops. Only a single loop is allowed. However, we often need to simulate 2 dimensional space in a single loop.
Please see the following C# code that I want to ...
2
votes
3answers
463 views
TeX Nested Loops With \iftoggle
This forum has helped me understand how to use nested loops in TeX, but now I am having trouble using \iftoggle (from the etoolbox package) with loops. My goal is to have a toggle that can keep track ...
12
votes
2answers
844 views
How to programmatically make tabular rows using `\whiledo` ?
The following code snippet does not work:
\documentclass{minimal}
\usepackage{longtable}
\usepackage{ifthen}
\newcounter{xyz}
\setcounter{xyz}{0}
\begin{document}
\begin{longtable}{|*2{c|}}
\hline
...
