* before= in setupbuffer
@ 1999-11-16 12:44 Marc van Dongen
1999-11-16 16:53 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Marc van Dongen @ 1999-11-16 12:44 UTC (permalink / raw)
Dear all,
The following:
\def\beforeAnswer{\noindent Answer \number\questionctr \crlf}
\defineblock[answer]
\hideblocks[answer]
\setupblock[answer]
[before=\beforeAnswer]
Always generates
Answer 0
at the start of every answerblock.
If I remove the \hideblocks[answer] line, different
lines get printed. Is there any way to get something
similar while still hiding the blocks?
Regards and thanks in advance,
Marc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: before= in setupbuffer
1999-11-16 12:44 before= in setupbuffer Marc van Dongen
@ 1999-11-16 16:53 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 1999-11-16 16:53 UTC (permalink / raw)
Cc: ConTeXt
>\def\beforeAnswer{\noindent Answer \number\questionctr \crlf}
No.
\defineenumeration[Answer]
\defineblock[Answer]
\beginAnswer
\startAnswer
The Answer is always easy!
\stopAnswer
\endanswer
That's the way. A bit more typing, but better. Now, when you call up the blocks, their numbering will nicely be in sync, and, even better, you can cross link them:
\defineenumeration [Answer] [coupling=Question]
\defineenumeration [Question] [coupling=Answer]
You seldom need to define your own macros -)
Before and after are executed when a block is placed, and they normally are used for spacing or tricky font swhitches and so.
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.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-11-16 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-16 12:44 before= in setupbuffer Marc van Dongen
1999-11-16 16:53 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).