{recursion} is the process of repeating items in a self-similar way.
3
votes
1answer
32 views
Recursive Multiple subscripts and superscripts with xparse (Modified Version)
How can I modify the command below to obtain a version
(of the question: recursive multiple subscript and superscript with xparse)
which does not stack the sub/superscripts horizontally but moves all ...
8
votes
2answers
211 views
Drawing iterations of a recursive structure in TikZ / using node names defined in a loop
This is my first time using TikZ, and I'm trying to draw something related to the Hilbert space-filling curve, based on a recent popular article (HTML, PDF). Specifically, I'm trying to draw the first ...
8
votes
2answers
64 views
recursive multiple subscript and superscript with xparse
How can I define a new command with xparse, something like this:
\NewDocumentCommand\tensorkor{ m >{\SplitList{,}}o >{\SplitList{,}}o }
{
?????
}
that i can execute
$ ...
7
votes
2answers
115 views
Making a lattice with numbers on vertices
Anyone who is familiar with the problem of counting up/right going paths in a rectangle from bottom left corner to upper right corner knows that one way of doing this is doing it by recursion. I want ...
4
votes
0answers
52 views
Recursive Stern-Brocot tree definition
I am trying to build a Stern-Brocot tree (enumeration of rationals).
The result is nearly acceptable, but I am still dissatisfied with the following points.
The edge from the parents goes to the ...
38
votes
5answers
2k views
Self-replicating (La)TeX document
Since TeX and LaTeX can print out any text, it should be possible to write a self-replicating document, i.e., a document that is typeset as a PDF/DVI of itself. Have you seen something like that?
11
votes
4answers
313 views
How to make a recursive Latex macro with comma separated argument list
I would like to make a macro that takes two arguments, the second of which is a comma separated list and then produces a nested commutator of argument1 with each entry of argument2. I've been ...
8
votes
5answers
294 views
Define a command (possibly recursively) to wrap text in a command n times
I'm trying to define a new command \multiboxed in LaTeX so that I can put n boxes around an equation without having to manually nest \boxed commands. So far I have (using the pgffor package):
...
5
votes
2answers
136 views
Recursively defined macros in TeX
After receiving a nice answer to a previous question, I got enthousiastic and tried to create a macro \sum such that \sum<1+2+3> would be expanded into 6.
My idea was to work recursively, using ...
7
votes
3answers
457 views
Thumbnails of other frames in beamer
I would like to make a presentation with beamer, and have a few frames (at the start or the end) containing thumbnails of the other frames, hyperlinked to them, with something like 4x3 or 5x4 ...
4
votes
2answers
109 views
How can I define a macro that adds a row to a table that has not yet been printed?
I want to generate a list of technical abbreviations and acronyms that I use. Currently, I'm defining all acronyms with a macro I have designed. Now, I want the macro to call another macro, called ...
0
votes
2answers
66 views
How do I add a static number to \recurselevel?
I currently have:
\dorecurse{8}{
\startcombination[3*3]
{\externalfigure[confcard.pdf][page=\recurselevel, width=98mm]}}
{\externalfigure[confcard.pdf][page=\recurselevel+2, width=98mm]}{}
...
3
votes
2answers
247 views
How to make a recursive macro in (La)TeX?
The following MWE is the code of my attempt translating my working algorithm in C# to (La)TeX. I don't understand why it does not work. Can you probe the source of problem?
Remarks:
#1 is a list of ...
5
votes
1answer
282 views
How to configure latexmk to work recursively? (PDF Thumbnails)
I'm writing a book which will include and explain a handful of different memoir page layouts.
Setting the scene
In the book, I want to imbed thumbnails of pages from PDFs generated with the page ...
3
votes
1answer
194 views
Recursion - splitting a group.
I've been trying to understand the notion of recursion in TeX - not easy given that my background is the high-level stuff in LaTeX. The only examples I can (just about) understand are very basic ...
3
votes
1answer
3k views
Recursive algorithms with the »algorithms« package?
I need to write a recursive algorithm, using the algorithms package.
I thought of writing something like this:
\begin{algorithmic}
\IF {$x=1}
\RETURN 1
\ELSE
\RETURN recurse$(x-1)$
\ENDIF
...
7
votes
3answers
427 views
Strange recursive macro output
Strange recursive macro output
The code that follows describes a macro that can iterate recursively (i.e, a forloop) and uses e-TeX numexpr. It is based on an example found in the e-TeX manual (page ...
