Am 02.11.2013 um 21:54 schrieb Francisco Gracia <fgragu...@gmail.com>:
> There is plenty of information available about how to deal with issues > related to chapter openings (*headings*) in *Context* but I have not found > any related to document endings. > > I would like to end the chapters of a book with some small decorative > element, be it text or graphics; let us call it a *Fleuron*. Just putting it > in the last line of the text file to be typeset, one can take for sure that > earlier or later it will end appearing as the only element of the last page > of the product of some run. To avoid this undesirable outcome, it seems to me > that one is forced to provide some help to *Context* via some text marks or > some code, but I have not been able to conjecture what they should be. > > The clearest arrangement would seem to be the inclusion at the end of the > source document of some *Context* instructions equivalent to the following > pseudocode: > > if *Fleuron* fits into the current page: > typeset *Fleuron* > > But how do I formulate the condition? How do I know what is the *current > page*, what is the size that *Context* has calculated for *Fleuron* and what > is the amount of space remaining in the page? > > One can imagine that this method could even be helpful in other situations of > the typesetting operation not related to the last page. > > Does someone know how to handle it? You can use leaders to place a box with the symbols/ornament because the disappear when they are placed at the begin of a page. \def\Fleuron {\par \leaders\vbox to \lineheight{MIDDLE OF THE PAGE}\vfil} \setuplayout[lines=10] \starttext % Method 1 \dorecurse{5}{Line \recurselevel\par} \Fleuron \page \dorecurse{10}{Line \recurselevel\par} \Fleuron \page \dorecurse{5}{Line \recurselevel\par} \Fleuron \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________