On Thu, Oct 14, 2010 at 11:05 AM, Emanuele Sacco <emanuelesa...@gmail.com> wrote: > Hi all, > > I'm using context MkII. > My code is > > > \setupcolors[state=start] > \setupbackground > [bottomframe=on, > rulethickness=1pt, > rightframe=on, > leftframe=on] > > \starttext > Good: > \startbackground > \input knuth > \stopbackground > > Not good: > > \startbackground > \input knuth > \input knuth > \input knuth > \stopbackground > \stoptext > > > > The second backgrounded text is on two pages. Is there a way to not > show the bottomframe at the end of the first page? > thanks > > ES > -- > Al mondo ci sono 10 tipi di persone: quelli che conoscono il sistema > binario e quelli che non lo conoscono. > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ >
As always my pov: a wrapper macro. \showframe \newdimen\SpaceLeft \def\CheckSpace{% \ifdim\pagetotal=0pt\SpaceLeft=\vsize\else\SpaceLeft=\pagegoal\advance\SpaceLeft by -\pagetotal\advance\SpaceLeft by -2\lineheight\fi}% \setupcolors[state=start] \long\def\StartBg#1\StopBg{% \bgroup \setbox8000=\vbox{#1} \CheckSpace% \the\SpaceLeft\the\ht8000 \the\dp8000 \ifdim\dimexpr(\ht8000+\dp8000)>\SpaceLeft\relax % \setbox8001=\vsplit8000 to \SpaceLeft% \setbox8001=\vbox{\unvbox8001}% % \setupbackground [bottomframe=off, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground\unvbox8001\stopbackground% \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground\unvbox8000\stopbackground% \else \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \startbackground #1\stopbackground% \fi \egroup } \setupbackground [bottomframe=on, rulethickness=1pt, rightframe=on, leftframe=on] \starttext Good: \startbackground \input knuth \stopbackground Not good: \StartBg \input knuth \input knuth \input knuth \StopBg \stoptext -- luigi ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________