I am trying to build a set of macros on top of ConTeXt that will typeset
recipes. As part of this I want to be able to break up the instructions
into a set of steps, placed in a tabulate environment.
I have been trying to write the appropriate macros to do this, but,
through my lack of familiarity with TeX programming, I don't seem to be
able to get it to work.
I have, currently:
\def\step{
\ifFirstStep
\FirstStepfalse
\starttabulate[|p(.4\hsize)|p|]
\else
\NC \NR
\fi
}
The intention is that each recipe has a title, some arbitrary amount
(possibly no) leading material, then a series of steps, such that:
\recipe(title)
... stuff about the recipe ...
\step
... first step ...
\step
... second step ....
\end
When I try to run the TeX file, however, I get the following output:
Runaway argument?
\FirstStepfalse \else \NC \NR \fi Then, add this here stuff to the mi\ETC.
! Forbidden control sequence found while scanning use of \doprocesscontent.
<inserted text>
\par
<to be read again>
\endtemplate
<template> \strut \endtemplate
\processtabulate ...sa \cr \tabulatecontent \crcr
}}\ifnum \nofautotabulate ...
\recipe ...ddle]{#1}\par #2 \NC \NR \stoptabulate
\par
l.69 \end
I couldn't seem to get this to work, no matter what. So, is it possible
to use the tabulate environment in this fashion?
Also, it didn't seem to be possible to use buffers within a macro at
all; they didn't pick up any content no matter what I put in them.
This failed:
\setupbuffer[test]
\hidebuffers[test]
\def\test{\begintest This is a test \endtest}
\test
\getbuffer[test]
Daniel
--
A wonderful discovery, psychoanalysis.
Makes quite simple people feel they're complex.
-- S. N. Behrman