Defining a command for enumeration+block
Hello, I'm having some problems using blocks and enumeration together. I can get it to work using something like this (see complete minimal example further down): \beginBlock \startEnum Some text A \stopEnum \endBlock But it doesn't seem to work if I try to define a command (macro?) to keep my source file a bit tidier. \define[1]\Revs{ \beginBlock \startEnum #1 \stopEnum \endBlock } \Revs{Missing Text B} I don't get any output from the call \Revs. No doubt I'm doing something silly...... I've also noticed that it breaks if I put the \beginBlock \startEnum commands on the same line, as in: \beginBlock \startEnum Some text A \stopEnum \endBlock I've been trying this on TeX Live 2010. thanks Glen --------- \defineblock[Block] \defineenumeration[Enum][location=left,text=Test] \define[1]\Revs{ \beginBlock \startEnum #1 \stopEnum \endBlock } \starttext \section{Use} \useblocks[Block] \reset[Enum] \section{Define} \beginBlock \startEnum Some text A \stopEnum \endBlock \Revs{Missing Text B} \stoptext
Am 18.11.2010 um 12:15 schrieb Glen Callaghan:
Hello,
I'm having some problems using blocks and enumeration together.
I can get it to work using something like this (see complete minimal example further down):
\beginBlock \startEnum Some text A \stopEnum \endBlock
But it doesn't seem to work if I try to define a command (macro?) to keep my source file a bit tidier.
You can’t use blocks within other commands but when you use only enumerations in your block you can simplify your code a little bit. \defineblock[Block] \defineenumeration[Enum][location=left,text=Test] \setupblock[Block][before=\startEnum,after=\stopEnum] \starttext \beginBlock Some text A \endBlock \stoptext Wolfgang
participants (2)
-
Glen Callaghan
-
Wolfgang Schuster