Tagged Questions

{recursion} is the process of repeating items in a self-similar way.

learn more… | top users | synonyms

4
votes
3answers
85 views

using a macro to define the body of a tabular / & separator problem

I'd like to create a macro that can create and fill a multiline tabular with 4 entries per line from something like \bidding{3H,4S,5C,X,XX,-} where the number of entries is of course dynamic. I have ...
2
votes
0answers
68 views

How to use sed to comment some lines in tex files (has “%” a particular meaning for sed ?)

I've been reading something in Most useful sed one-liners for TeX users which is related to my problem, but albeit interesting, it is not what I need. I have many tex (beamer class) files in ...
23
votes
5answers
967 views

TikZ - Recursive Arc Drawing

I'm trying to make Farey diagrams similar to those seen here (click) or the screenshot as follows, Namely, I'd like an example of the one seen on the top of page 6. From there I hope I can figure ...
4
votes
0answers
193 views

How to draw this 3D H-layout recursive tree with Tikz? [closed]

Background: This is an extension problem from my last post How to draw the recursive H-Layout tree using Tikz?. The (2D) H-layout tree is actually from the VLSI layout problem in computer science. I ...
11
votes
2answers
358 views

How to draw the recursive H-Layout tree using Tikz?

The following image shows a recursive H-Layout tree. It is called H-Layout because of its H unit consisting of 7 nodes. My problem is: How to draw such tree in a recursive manner instead of ...
7
votes
1answer
148 views

Macros with binary trees as arguments

I would like to have some macros which have binary trees as arguments. For the purpose of these macros, a binary tree is either root or it is {branch1}{branch2} for two binary trees branch1 and ...
4
votes
4answers
402 views

Recursive drawing, command flow

I am trying to recursively draw Ck x Ck, where Ck is the k-th iteration of a Cantor set. I have a command which recursively calls itself four times. If I pass N as parameter #6, the output ...
2
votes
1answer
129 views

Modifying \title without recursion problem

EDIT: Much shorter problem definition Having defined a title by \title[short]{long} how can I later add something to the title? The simple assumption \title[\insertshorttitle]{\inserttitle plus ...
4
votes
1answer
111 views

Stack overflow / endless recursion when using menukeys

since I've upgraded from TeX Live 2012 to TeX Live 2013, I have some trouble with a custom package. The package provides some commands that are intended to be used either as standalone commands or ...
8
votes
1answer
98 views

How do the \xx_case: functions work?

In the process of answering expl3 switch for booleans: Is there a \bool_case:Nnn?, I tried to make sense of the various \xx_case: functions Expl3 provides. Here, for example, is \tl_case:Npn: ...
8
votes
3answers
2k views

Commands that may take a variable number of arguments

I have a situation where I want to define a command that takes a variable number of arguments, where the number of arguments is known programmatically via a \count, and process the parameters in some ...
3
votes
1answer
95 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
327 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 ...
9
votes
2answers
180 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
193 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 ...
11
votes
2answers
335 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 ...
45
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
732 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
379 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
468 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 ...
12
votes
4answers
855 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 ...
5
votes
2answers
226 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
81 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
475 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
388 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
229 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 ...
5
votes
1answer
6k 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
478 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 ...