From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/5922 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: crazy answer to: Stupid question of the (next?) month Date: Wed, 24 Oct 2001 21:05:09 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20011024210248.030c6818@server-1> References: <1412906089.20011023231209@bigfoot.com> 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 1035396483 5746 80.91.224.250 (23 Oct 2002 18:08:03 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:08:03 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Giuseppe Bilotta In-Reply-To: <1412906089.20011023231209@bigfoot.com> Xref: main.gmane.org gmane.comp.tex.context:5922 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:5922 At 11:12 PM 10/23/2001 +0200, Giuseppe Bilotta wrote: >Hello, > >here I am, with my usual absurd requests ... today I'd like to >know how to do the following. > >I'd like each page to have an 'indefinite' length, clipped each >time at a certain sectionlevel. For example, each page would be a >chapter long (yes, not the other way round). TeX can do things >like this, but there's the usual 5.7 meters limit (about 25 A4 >pages). Of course such a thing only makes sense in PDF production >mode, because DVI viewers are not friendly with multiple page >sizes per document. you're lucky that i can watch the news and write macros at the same time so here's the answer to your absurd request: % output=pdftex % a rather pervert and idiot style for g.b. \definepapersize [idiot] [width=20cm,height=400cm] \startsetups main \setuppapersize [idiot] [idiot] \setuplayout [height=middle,topspace=2cm,header=2cm,footer=2cm, width=middle] \stopsetups \startsetups page \setbox\normalpagebox=\vbox{\unvbox\normalpagebox} \adddimenmacro \ht\normalpagebox 2\topspace \headerheight \footerheight \to \CrazyHeight \definepapersize [crazy] [width=20cm,height=\CrazyHeight] \setuppapersize [crazy] [crazy] \stopsetups \setups [main] \prependtoks \setups [page] \to \mainoutput \appendtoks \setups [main] \to \mainoutput \starttext % hm, i would like to use the not yet public fake % text macros here -) \dorecurse {6} {\getrandomnumber \pervert {3} {5} \dorecurse {\pervert} {\input tufte \placefigure {} {} \getrandomnumber \evenmorepervert {1} {3} \dorecurse {\evenmorepervert} {\input tufte \par}} \page } \stoptext 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 -------------------------------------------------------------------------