ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Marcin Borkowski <mbork@atos.wmid.amu.edu.pl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: How to avoid a page break?
Date: Tue, 4 Nov 2008 22:39:08 +0100	[thread overview]
Message-ID: <20081104213908.GE2264@atos.labs.wmid.amu.edu.pl> (raw)
In-Reply-To: <D4E40A46-0AA3-4FAC-B6B2-FEB5AFFEBD31@gmail.com>

Dnia Tue, Nov 04, 2008 at 10:17:51PM +0100, Wolfgang Schuster napisa&#322;(a):
> 
> Am 04.11.2008 um 21:21 schrieb Marcin Borkowski:
> 
> > Hi,
> >
> > I have the following in my code:
> >
> > \def\doPutTitle#1{%
> >  \startalignment[middle]
> >    \bfb
> >    \page[bigpreference]
> >    \blank[2*big]
> >    #1%
> >    \page[no]%
> >    \blank[big]%
> >    \page[no]%
> >  \stopalignment
> >  \page[no]%
> > }%
> >
> > Why is it still possible that I have a page break after, say,
> > \doPutTitle{some title} (in MkII, in MkIV page breaks fall in  
> > different
> > places).  Which percentage signs and \page[no]'s are unnecessary here?
> 
> \def\doPutTitle#1%
>    {\page[bigpreference]
>     \vbox\bgroup
>     \raggedcenter
>     #1%
>     \egroup
>     \nobreak\blank[big]}

OK, though this looks rather low-level.  I was thinking about something
more user-friendly;).

This raises a philosophical question: is it the "ConTeXt way" to use
low-level constructs in environments and high-level in documents?  Or is
it better to avoid low level whenever possible?  Also, your code mixes
low-level commands (\vbox, which is a TeX prmitive, \raggedcenter, which
is a ConTeXt low-level command, I guess) and high-level ones (\blank).
I understand that this ensures a uniform vertical spacing (\blank[big]
is obviously better than \vskip 10pt;)), but I thought that it is
against ConTeXt philosophy to use low-level stuff unless something
really non-standard is needed.

> 
> > Also, how to avoid a page break right before an itemization?  Adding
> > [intro] seems not to work.
> 
> Example!

Sorry, I haven't provided one.  Here you are.

\starttext
\dorecurse{12}{%
  This is some intro (\recurselevel).
  \startitemize[n,packed,joinedup,columns,two,intro]
  \dorecurse{8}{\item This is an item.}
  \stopitemize
}%
\stoptext

(strange things happen both in MkII and MkIV in the online ConTeXt!)

> 
> > And one more thing about pagebreaks: how to avoid a pagebreak right
> > before a \startformula ... \stopformula?  And what is the ConTeXt  
> > way of
> > setting stretchable vertical glue (e.g. for \blank's, below  
> > itemizations
> > etc.)?
> 
> \blank[ small | medium | big | ... ]

But how do I control the stretchability?

> Wolfgang

Greets

-- 
Marcin Borkowski (http://mbork.pl)

O ludzką twarz - walka trwa!  Już płoną ognie - chwyćmy za ostrze!
Naszym ogniem Moc Najwyższego,  ostrzem wierność obranej drodze...
Walka trwa!
                        (Izaiash)
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-11-04 21:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-04 20:21 Marcin Borkowski
2008-11-04 21:17 ` Wolfgang Schuster
2008-11-04 21:39   ` Marcin Borkowski [this message]
2008-11-04 22:25     ` Wolfgang Schuster
2008-11-04 22:42       ` Marcin Borkowski
2008-11-04 22:49         ` Wolfgang Schuster
2008-11-05  7:39           ` luigi scarso
2008-11-05  9:57       ` Marcin Borkowski
2008-11-05 10:13         ` Wolfgang Schuster
2008-11-05 10:22           ` Marcin Borkowski
2008-11-05 10:05       ` Marcin Borkowski
2008-11-05 10:14         ` Wolfgang Schuster
2008-11-05 10:50 ` Marcin Borkowski
2008-11-05 11:12   ` Wolfgang Schuster
2008-11-05 12:13     ` Marcin Borkowski
2008-11-05 12:25       ` Wolfgang Schuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081104213908.GE2264@atos.labs.wmid.amu.edu.pl \
    --to=mbork@atos.wmid.amu.edu.pl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).