Michal Kvasnicka wrote:
Good evening.
How can I include \begin<block> ... \end<block> into a macro?
I have defined: \defineblock[question] \defineblock[answer] \defineenumeration[question][location=serried, coupling=answer] \defineenumeration[answer][location=serried, coupling=answer] \hideblocks[answer] I'd like to simplify my code from \beginquestion \startquestion question ... \stopquestion \endquestion \beginanswer \answer answer ... \par \endanswer to \q{question ...}{answer ...} \q begin something like this: \def\q{% \beginquestion \question #1\par \endquestion \beginanswer \answer #2\par \endanswer }
But no question/anwer is written into .tub file (only the beginning/end of those blocks).
you can't do that since buffer and block code works on the main input stream directly (catcode trickery and such) but you can hook things into blocks (before/after keys) \setupblock[question][before=\startquestion,after=\stopquestion] should work (i'm crossing my fingers now) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------