From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/6880 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Is it possible to use \starttabulate inside a macro? Date: Mon, 11 Feb 2002 09:56:30 +0100 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020211094934.03878fd8@server-1> References: <87zo2h1swc.fsf@inanna.rimspace.net> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035397383 14604 80.91.224.250 (23 Oct 2002 18:23:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:23:03 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Daniel Pittman In-Reply-To: <87zo2h1swc.fsf@inanna.rimspace.net> Xref: main.gmane.org gmane.comp.tex.context:6880 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:6880 At 10:24 PM 2/10/2002 +1100, Daniel Pittman wrote: 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: that kind of trickery will probably interfere with table lookahead (baked into tex), so i would opt for: \definetabulate [recipe] [|l|l|l|] \setuptabulate [recipe] [inner=\setquicktabulate\step,before=] \startrecipe \step first step \\ next \\ more \\ \step second step \\ bla \\ again \\ \step last step \\ next \\ oeps \\ \stoprecipe \definehead[recipe][subsubsubject] \setuphead[recipe][after=,style=bold] \def\StartRecipe#1% {\recipe{#1}\startrecipe} \StartRecipe{whatever} \step first step \\ next \\ more \\ \step second step \\ bla \\ again \\ \step last step \\ next \\ oeps \\ \stoprecipe > Also, it didn't seem to be possible to use buffers within a macro at right, limitation by design >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] In your case you could store teh text into a macro -) You can however fill a buffer in the following way: \def\test{\setbuffer[test]This is a test\endbuffer} \test \getbuffer[test] There is also \definebuffer as well as the undocumented \dostartbuffer \def\GrabCrap{\dostartbuffer[crap][GrabCrap][NoMoreCrap]} \GrabCrap believe it or not but this works \NoMoreCrap \getbuffer[crap] ------------------------------------------------------------------------- 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 ------------------------------------------------------------------------- fall-back web server: www.pragma-pod.nl -------------------------------------------------------------------------