I have some text in my document which appears repeatedly many times throughout the document, so I have defined a custom macro, e.g.:
\define\mymacro{
\section{A}
There is some text.
\section{B}
This is some more text.
\section{C}
This is yet some more text.
}
This appears like this:
_______________________
| |
| 1.1 A |
| This is some text. |
| 1.2 B |
| This is some more |
| text. |
| 1.3 C |
| This is yet some |
| more text. |
|_______________________|
I need the macro to render differently in two situations.
- The first time the macro appears in the document, the title and contents of section A should not appear. Instead, alternative text apears.
- The last time the macro appears in the document, the title and contents of section C should not appaer. Instead, nothing appears there.
How can I create a conditional which checks if it is the first or last time the macro has been used, and modifies the text displayed accordingly?
\getnumber,\incrementnumber, and the like;\setpagenumber& co. were part of that same system. Nowadays ConTeXt uses a more LuaTeX-integrated system with\incrementcounterand the like, and the 'number' commands have been redefined as synonyms for the 'counter' system. Then there are the enumerations, which use one of the two? That's all I know; but I don't know what changed when, or what MkII uses/d. – Esteis Jun 13 '12 at 11:21