From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/26357 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \page inside a block Date: Thu, 16 Mar 2006 11:38:46 +0100 Message-ID: <44194036.4000500@wxs.nl> References: <20060315235342.GI11831@obiit.org> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1142505538 14832 80.91.229.2 (16 Mar 2006 10:38:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 16 Mar 2006 10:38:58 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Mar 16 11:38:56 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FJpse-0008Pb-Ms for gctc-ntg-context-518@m.gmane.org; Thu, 16 Mar 2006 11:38:56 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 43C13126F8; Thu, 16 Mar 2006 11:38:56 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12816-04-5; Thu, 16 Mar 2006 11:38:51 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 026E212780; Thu, 16 Mar 2006 11:38:51 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 916A712780 for ; Thu, 16 Mar 2006 11:38:49 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 12816-04-4 for ; Thu, 16 Mar 2006 11:38:48 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with SMTP id A8DCD126F8 for ; Thu, 16 Mar 2006 11:38:48 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 8897 for ; Thu, 16 Mar 2006 13:38:48 +0300 User-Agent: Thunderbird 1.5 (Windows/20051201) Original-To: mailing list for ConTeXt users In-Reply-To: <20060315235342.GI11831@obiit.org> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:26357 Archived-At: frantisek holop wrote: > hi there, > > the following is a minimal example of the layout i am working on. > > > -----------------------%<------------------------- > % output=pdftex > > \enableregime[latin2] > > \setuppapersize > [A5][A5] > > \defineparagraphs > [poem][n=2] > \setupparagraphs > [poem][1][width=.35\textwidth] > \setupparagraphs > [poem][2][rule=on] > > \starttext > > \startpoem > \section{poem} > \poem\startlines > line 1 > line 2 > \page > line 3 > line 4 > \stoplines\stoppoem > \stoptext > -----------------------%<------------------------- > > > when the poem gets long, i need to start a new page obviously. > but page is not working. what am i missing here? > that it's unbreakable stuff (vbox) > also, using \page is one thing, good for me, so i could tell, > flush the page right here, but i thought i'll get an automatic > pagebreak when the text gets to the bottom.... > > sorry if this is a very silly question, just getting my feet wet > with context.... thanks > actually, this is a rather complex situation; one could use a tabulate the complication is in the line and in the fact that you want to use a section command \setuppapersize[A5][A5] \starttext \setupcolors[state=start] \definetextbackground [poem] [state=start, location=paragraph, background=color, backgroundcolor=red] \definehead[Poem][section] \setuphead[Poem][alternative=poemtitle,before={\blank[2*big]},after={\vskip-\lineheight},page=,style=\bfa] % works, but may not be that robust) % % \defineheadplacement[poemtitle][horizontal]#1#2% % {\margintitle{\hskip\measure{SavedLeftSkip}#1\enspace#2}} \defineheadplacement[poemtitle][vertical]#1#2% {\setupparagraphintro[first][{\llap{\hbox to \leftskip{#1\enspace#2\hss}}}]} \setuplines[before=,after=] \def\StartPoem#1% {\startnarrower[5*left] % \expanded{\definemeasure[SavedLeftSkip][\the\leftskip]} \Poem{#1} \starttextbackground[poem] \startlines} \def\StopPoem {\stoplines \stoptextbackground \stopnarrower} \showframe \StartPoem{xxx} line 1 line 2 \StopPoem \setuptextbackground [poem] [mp=mpos:par:poem] \startuseMPgraphic{mpos:par:poem} for i = 1 upto nofmultipars : draw leftboundary multipars[i] shifted (-.5EmWidth,0) dashed evenly withpen pencircle scaled 1pt withcolor .8red ; endfor ; \stopuseMPgraphic \StartPoem{zzz} line 1 line 2 \StopPoem \startuseMPgraphic{mpos:par:poem} for i = 1 upto nofmultipars : draw multipars[i] enlarged .5ExHeight rightenlarged -.5ExHeight dashed evenly withpen pencircle scaled 1pt withcolor .8red ; endfor ; \stopuseMPgraphic \StartPoem{qqq} line 1 line 2 line 3 \dorecurse{100}{line 4:\recurselevel\par} \StopPoem \stoptext I leave it up to you (or others) to wikify this example. It looks more complex than it is. By using a mp graphic you have more options watch what happens if you add \page \startuseMPgraphic{mpos:par:poem} for i = 1 upto nofmultipars : multipars[i] := multipars[i] enlarged .5ExHeight rightenlarged -.5ExHeight; drawoptions ( dashed evenly withpen pencircle scaled 1pt withcolor .8red ) ; if multilocs[i] = 1 : draw llcorner multipars[i] -- ulcorner multipars[i] -- urcorner multipars[i] -- lrcorner multipars[i] ; elseif multilocs[i] = 3 : draw ulcorner multipars[i] -- llcorner multipars[i] -- lrcorner multipars[i] -- urcorner multipars[i] ; else : draw leftboundary multipars[i] ; draw rightboundary multipars[i] ; fi ; endfor ; \stopuseMPgraphic \StartPoem{hhh} \dorecurse{200}{line \recurselevel\par} \StopPoem ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------