At 11:24 PM 1/24/2003 +0100, you wrote:
On Mon, Jan 20, 2003 at 10:07:45AM +0100, Hans Hagen wrote:
At 05:06 PM 1/18/2003 -0700, you wrote:
Greetings!
Is it possible to have parts of the ConTeXt file processed conditionally? I'm hoping to be able to do something like:
(in ConTeXt file)
Question: What is the derivative of $e^{sqrt{x}}$\\ \some-command-start Answer: $\frac{d}{dx} e^{sqrt{x}} ... $ \some-command-end
[...]
\defineblock [answer]
Interesting: Three of your users suggest using modes instead. I would have too.
well, nowadays there is setups as well (more on that in some new styles)
What made you choose blocks over modes here?
(1) no argument grabbing and therefore catcode save, which means that verbatim and so will work (2) they keep track of numbering, so that when you call them up later (say in appendix) you can get similar numbers; say that you want a summary of formula's: put them in blocks, tag them (with optional arg you cna group them in subblocks), then, when you call such a subgroup you get proper numbers; also, refs in such recalled blocks know from which chapter/section/etc they come, so they will be prefixed accordingly (3) hooks and local variables (4) nesting is possible [btw a pretty old mechanism, one of the reasons for context being there] Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------