[NTG-context] Wrong page break in sequence of headings

2014-09-11 Thread Jean-Philippe Rey
Dear all,

I have a problem with page breaking in a sequence of titles (for example 
chapter, section, subsection) : a page break can occur between titles. I tested 
this with the last beta version

  ConTeXt  ver: 2014.09.06 20:59 MKIV beta

with the following example

% - Start of example -
\setuphead[chapter][page=no]

\starttext

\chapter{Chap 1}

\section{Bryson}

\input bryson

\section{Davis}

\input davis

\section{filler 1}

Ipsam vero urbem Byzantiorum fuisse refertissimam atque ornatissimam signis quis
ignorat? Quae illi, exhausti sumptibus bellisque maximis, cum omnis 
Mithridaticos
impetus totumque Pontum armatum affervescentem in Asiam atque erumpentem,
ore repulsum et cervicibus interclusum suis sustinerent, tum, inquam, Byzantii 
et
postea signa illa et reliqua urbis ornanemta sanctissime custodita tenuerunt. 
Equitis
Romani autem esse filium criminis loco poni ab accusatoribus neque his 
iudicantibus
oportuit neque defendentibus nobis. Nam quod de pietate dixistis, est quidem 
ista
nostra existimatio, sed iudicium certe parentis; quid nos opinemur, audietis ex 
iuratis;
quid parentes sentiant, lacrimae matris incredibilisque maeror, squalor patris
%et haec praesens maestitia, quam cernitis, luctusque declarat. Vita est illis 
semper
%in fuga uxoresque mercenariae conductae ad tempus ex pacto atque, ut sit 
species
%matrimonii, dotis nomine futura coniunx hastam et tabernaculum offert marito,
%post statum diem si id elegerit discessura, et incredibile est quo ardore apud 
eos in
%venerem uterque solvitur sexus.

\chapter{Chap 2}

\section{Dawkins}

\input dawkins

\section{Douglas}

\input douglas

\section{filler 2}

Soleo saepe ante oculos ponere, idque libenter crebris usurpare sermonibus, 
omnis
%nostrorum imperatorum, omnis exterarum gentium potentissimorumque populorum,
%omnis clarissimorum regum res gestas, cum tuis nec contentionum magnitudine
%nec numero proeliorum nec varietate regionum nec celeritate conficiendi nec
%dissimilitudine bellorum posse conferri; nec vero disiunctissimas terras 
citius passibus
%cuiusquam potuisse peragrari, quam tuis non dicam cursibus, sed victoriis 
lustratae sunt.

\section{Group 1}

\subsection{Hawking}

\input hawking

\subsection{Knuth}

\input knuth

\section{Linden}

\input linden

\stoptext
% - End of example -


I get the Chap 2 title at the end of the first page, it should be on top of 
the second page. Similarly the Group 1 title is located at the bottom of the 
second page.

I tried to use \startsection ... \stopsection but got the same result.

Is there a setup to get the page breaks right ? Or is this a bug ?

Thank you for your help.

-- 
Jean-Philippe Rey Professeur - École Centrale Paris
jean-philippe@ecp.fr  92295 Châtenay-Malabry Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

___
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
___


Re: [NTG-context] Wrong page break in sequence of headings

2014-09-11 Thread Pablo Rodriguez
On 09/11/2014 01:50 PM, Jean-Philippe Rey wrote:
 Dear all,
 
 I have a problem with page breaking in a sequence of titles (for
example chapter, section, subsection) : a page break can occur between
titles. I tested this with the last beta version

Jean-Philippe,

page breaks can occur after a heading command.

 Is there a setup to get the page breaks right ? Or is this a bug ?

It isn’t a bug, it‘s just the way heads are defined in ConTeXt.

For chapters and sections, use:

\setuphead[chapter][after={\blank[samepage, 2*big]}]
\setuphead[section][after={\blank[samepage]}]

I hope it helps,


Pablo
-- 
http://www.ousia.tk
___
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
___


Re: [NTG-context] Wrong page break in sequence of headings

2014-09-11 Thread Jean-Philippe Rey
Hi Pablo,

Le 11 sept. 2014 à 16:35, Pablo Rodriguez oi...@gmx.es a écrit :

 page breaks can occur after a heading command.
 
 Is there a setup to get the page breaks right ? Or is this a bug ?
 
 It isn’t a bug, it‘s just the way heads are defined in ConTeXt.

I thought it could have been a bug because I have never seen ConTeXt put a page 
break between a head and the following text when it is a standard paragraph 
(which is a sensible behavior). It seems odd to allow a page break between two 
heads, except in very exceptional situations (e.g. a very long list of heads).


 For chapters and sections, use:
 
 \setuphead[chapter][after={\blank[samepage, 2*big]}]
 \setuphead[section][after={\blank[samepage]}]
 
 I hope it helps,

It works perfectly well, thank you very much Pablo.

-- 
Jean-Philippe Rey Professeur - École Centrale Paris
jean-philippe@ecp.fr  92295 Châtenay-Malabry Cedex - France
Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51

___
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
___


Re: [NTG-context] Wrong page break in sequence of headings

2014-09-11 Thread Pablo Rodriguez
On 09/11/2014 05:24 PM, Jean-Philippe Rey wrote:
 Le 11 sept. 2014 à 16:35, Pablo Rodriguez a écrit :
 
 page breaks can occur after a heading command.

 Is there a setup to get the page breaks right ? Or is this a bug ?

 It isn’t a bug, it‘s just the way heads are defined in ConTeXt.
 
 I thought it could have been a bug because I have never seen ConTeXt put
 a page break between a head and the following text when it is a standard
 paragraph (which is a sensible behavior). It seems odd to allow a page
 break between two heads, except in very exceptional situations (e.g. a
 very long list of heads).

Hi Jean-Philippe,

the first time I experienced that the heading being left alone in the
bottom of a page, I thought it was a bug also.

Wolfgang kindly explained me that this was due to the default setups for
headings.

Page breaks after titles (not only between titles) seem also weird to
me. But once you know how it works, you only have to specify it in the
preamble of your documents.

 For chapters and sections, use:

 \setuphead[chapter][after={\blank[samepage, 2*big]}]
 \setuphead[section][after={\blank[samepage]}]

 I hope it helps,
 
 It works perfectly well, thank you very much Pablo.

I’m glad to read it worked.


Pablo
-- 
http://www.ousia.tk
___
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
___