8
votes
2answers
51 views

“Extra \else” and inserted “\inaccessible” when using textbf with pgffor

I'm getting errors whenever I try to make \textbf interact with pgffor and xparse. Here's an MWE that gives ERROR: Extra \else and ERROR: Missing control sequence inserted at the end of the \coljoin ...
7
votes
1answer
89 views

How to remove end-if in algorithms

I am writing an algorithm in latex, but there are lots of end-if and end-whiles in my algorithms which makes it un-professional and ugly. Is there a way to remove them from output of latex? ...
2
votes
1answer
88 views

Conditional assignment in a loop

Objective: I want to compile the temporary.tex file containing PSTricks code twice. One with -jobname=Rotated and the other one with -jobname=Unrotated. The resulting Rotated.ps will be passed to ...
4
votes
1answer
83 views

Loop Multi-Contingency using etoolbox

I want to use the etoolbox package to manage some loop contingencies over a counting index. In particular, I'd like to do something different on the first and last times through the loop. Now I can ...
6
votes
2answers
97 views

Separators for author group (IF conditon)

I am new to LaTeX, just a beginner, basically a Perl developer. I have created a LaTeX file \begin{document} \cont{\iname{\isurname{Name1}\ifname{K. C. G.}}\iname{\isurname{Name11}\ifname{Y. ...
10
votes
1answer
286 views

XeTeX UNICODE Table

I would like to try to write a minimal XeTeX source that generates a comprehensive UNICODE table, substituting in local fonts as required by the current plane. I made the attached code as an MWE for ...
3
votes
1answer
60 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
197 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. ...
11
votes
5answers
952 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
484 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 ...
6
votes
2answers
1k 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
292 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
804 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 ...
15
votes
2answers
1k 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 ...