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

learn more… | top users | synonyms

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
797 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 ...
9
votes
2answers
167 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 $ ...
11
votes
2answers
282 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 ...
8
votes
3answers
1k 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 ...
11
votes
2answers
315 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 ...
8
votes
1answer
95 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
5answers
371 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): ...