ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* strange page break
@ 2010-05-04  5:38 Peter Münster
  2010-05-05 11:42 ` Taco Hoekwater
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-04  5:38 UTC (permalink / raw)
  To: ConTeXt list

Hello,

Here is a strange page break (version 2010.04.29 22:30):

\def\mySection{\section{bla}\dorecurse{30}{text }}
\starttext
\dorecurse8{
  \mySection\par
  bla}
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-04  5:38 strange page break Peter Münster
@ 2010-05-05 11:42 ` Taco Hoekwater
  2010-05-05 14:38   ` Peter Münster
  0 siblings, 1 reply; 22+ messages in thread
From: Taco Hoekwater @ 2010-05-05 11:42 UTC (permalink / raw)
  To: ConTeXt list

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

Peter Münster wrote:
> Hello,
> 
> Here is a strange page break (version 2010.04.29 22:30):

Looks rather normal here, see attached (ver: 2010.05.02 16:43)

Best wishes,
Taco

[-- Attachment #2: strangebreak.pdf --]
[-- Type: application/pdf, Size: 7517 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 11:42 ` Taco Hoekwater
@ 2010-05-05 14:38   ` Peter Münster
  2010-05-05 14:50     ` Taco Hoekwater
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-05 14:38 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 05 2010, Taco Hoekwater wrote:

> Looks rather normal here, see attached (ver: 2010.05.02 16:43)

A better page break would be after the last line of section 7:

\def\mySection{\section{bla}\dorecurse{30}{text }}
\starttext
\dorecurse8{
  \mySection\par
  bla
  \doif{\recurselevel}{7}{\page}}
\stoptext

This is just a minimal example. In my real life documents I have a lot of
situations like this, and often it's not just one line that has to be moved
to the previous page, but a lot more. So I have now a lot of "\page"
commands in my documents... :(

If needed, I'll try to make a better minimal example tomorrow.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 14:38   ` Peter Münster
@ 2010-05-05 14:50     ` Taco Hoekwater
  2010-05-05 14:57       ` luigi scarso
  2010-05-05 15:33       ` Peter Münster
  0 siblings, 2 replies; 22+ messages in thread
From: Taco Hoekwater @ 2010-05-05 14:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Peter Münster wrote:
> On Wed, May 05 2010, Taco Hoekwater wrote:
> 
>> Looks rather normal here, see attached (ver: 2010.05.02 16:43)
> 
> A better page break would be after the last line of section 7:

Oh, I see. Yes, it is odd that that last line is taken over
to the second page in the original test file. But the same
thing happens in mkii, so I suspect this is an unavoidable
side-effect of page breaking.

What happens is that TeX first attempts the break after two
lines into section 7 and finds a badness value for that. Then
it tries the third line, and finds another badness value for
that. Normally, TeX considers the break after the second line
better, but in your second example the \page adds a big
negative penalty for the third line which skews the result in
favor of that line.

(TeX's page break algorithm is not all that smart really,
because it does not know about sectioning at all: it only
sees lines and penalties).

Best wishes,
Taco
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 14:50     ` Taco Hoekwater
@ 2010-05-05 14:57       ` luigi scarso
  2010-05-05 15:33       ` Peter Münster
  1 sibling, 0 replies; 22+ messages in thread
From: luigi scarso @ 2010-05-05 14:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 5, 2010 at 4:50 PM, Taco Hoekwater <taco@elvenkind.com> wrote:
> Peter Münster wrote:
>>
>> On Wed, May 05 2010, Taco Hoekwater wrote:
>>
>>> Looks rather normal here, see attached (ver: 2010.05.02 16:43)
>>
>> A better page break would be after the last line of section 7:
>
> Oh, I see. Yes, it is odd that that last line is taken over
> to the second page in the original test file. But the same
> thing happens in mkii, so I suspect this is an unavoidable
> side-effect of page breaking.
in mkii the same example looks ok
but I suppose it doesn't really  matter


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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 14:50     ` Taco Hoekwater
  2010-05-05 14:57       ` luigi scarso
@ 2010-05-05 15:33       ` Peter Münster
  2010-05-05 15:44         ` Wolfgang Schuster
  1 sibling, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-05 15:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 05 2010, Taco Hoekwater wrote:

> (TeX's page break algorithm is not all that smart really,
> because it does not know about sectioning at all: it only
> sees lines and penalties).

So the question is: what can be done? I know, that LaTeX doesn't suffer
from such problems...
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 15:33       ` Peter Münster
@ 2010-05-05 15:44         ` Wolfgang Schuster
  2010-05-05 16:23           ` Peter Münster
  0 siblings, 1 reply; 22+ messages in thread
From: Wolfgang Schuster @ 2010-05-05 15:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 05.05.10 17:33, schrieb Peter Münster:
> On Wed, May 05 2010, Taco Hoekwater wrote:
>
>    
>> (TeX's page break algorithm is not all that smart really,
>> because it does not know about sectioning at all: it only
>> sees lines and penalties).
>>      
> So the question is: what can be done? I know, that LaTeX doesn't suffer
> from such problems...
>    

Without setting your own penalty values you can do this:

\setuplayout[setups=*strict]

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 15:44         ` Wolfgang Schuster
@ 2010-05-05 16:23           ` Peter Münster
  2010-05-05 16:43             ` Wolfgang Schuster
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-05 16:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 05 2010, Wolfgang Schuster wrote:

> Without setting your own penalty values you can do this:
>
> \setuplayout[setups=*strict]

I'm sorry Wolfgang, I don't understand this command. In the following
example, there is still a bad page break:

\setuplayout[setups=*strict]
\def\mySection{\section{bla}\dorecurse{30}{text }\par bla}
\starttext
\dorecurse8{\mySection}
\stoptext


Perhaps, there is a possibility to check easily what LaTeX does with
penalties and sections and apply it to ConTeXt?

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 16:23           ` Peter Münster
@ 2010-05-05 16:43             ` Wolfgang Schuster
  2010-05-05 17:21               ` Peter Münster
  0 siblings, 1 reply; 22+ messages in thread
From: Wolfgang Schuster @ 2010-05-05 16:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 05.05.10 18:23, schrieb Peter Münster:
> On Wed, May 05 2010, Wolfgang Schuster wrote
>> Without setting your own penalty values you can do this:
>>
>> \setuplayout[setups=*strict]
>>      
> I'm sorry Wolfgang, I don't understand this command. In the following
> example, there is still a bad page break:
>    

The problem is in your example the page happens between two separate
paragraphs and not in a paragraph where a penalty values is available.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 16:43             ` Wolfgang Schuster
@ 2010-05-05 17:21               ` Peter Münster
  2010-05-05 17:37                 ` Wolfgang Schuster
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-05 17:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 05 2010, Wolfgang Schuster wrote:

> The problem is in your example the page happens between two separate
> paragraphs and not in a paragraph where a penalty values is available.

What is setups=*strict supposed to do? In the following example, the page
break is even before section 7:

\showframe
\setuplayout[setups=*strict]
\def\mySection{\section{bla}\dorecurse{40}{text }}
\starttext
\dorecurse8{\mySection} % try \dorecurse7 here
\stoptext

I would really like to solve this problem: read the relevant chapters in my
TeXbook, take a look into latex-code and then patch context, but
unfortunately I don't have time for this right now, so any help is really
welcome.

Currently I'm working on two documents, where I have a lot of \page
commands as workaround.

Tomorrow, I'll try to make a better example, where page-breaks are really
bad...

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 17:21               ` Peter Münster
@ 2010-05-05 17:37                 ` Wolfgang Schuster
  2010-05-06  8:13                   ` Peter Münster
  0 siblings, 1 reply; 22+ messages in thread
From: Wolfgang Schuster @ 2010-05-05 17:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 05.05.10 19:21, schrieb Peter Münster:
> What is setups=*strict supposed to do? In the following example, the page
> break is even before section 7:
>
> \showframe
> \setuplayout[setups=*strict]
> \def\mySection{\section{bla}\dorecurse{40}{text }}
> \starttext
> \dorecurse8{\mySection} % try \dorecurse7 here
> \stoptext
>    

The *strict prevents widows and orphans (comment \setuplayout in this 
example)
but the important setting here is \setupalign[line].

\showframe
\setuplayout[setups=*strict]
\setupalign[line]
\def\mySection{\section{bla}\dorecurse{40}{text }}
\starttext
\dorecurse8{\mySection} % try \dorecurse7 here
\vfil\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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-05 17:37                 ` Wolfgang Schuster
@ 2010-05-06  8:13                   ` Peter Münster
  2010-05-06  8:46                     ` Otared Kavian
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-06  8:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, May 05 2010, Wolfgang Schuster wrote:

> The *strict prevents widows and orphans (comment \setuplayout in this 
> example)
> but the important setting here is \setupalign[line].

Hello Wolfgang,

I know that \setupalign[line] means: last line should touch the bottom.
It can be useful, but it's not always what I want.

Here an example from real life (not the content... ;). I hope you agree,
that there should be done something in the default setup of ConTeXT:

%\setuplayout[setups=*strict]  % this helps only in some cases...
%\setupalign[line]  % this means "flushbottom" and I don't always want that
\def\Lines#1{\dorecurse{#1}{\dorecurse{17}{text }}\par}
\def\Table#1{\starttable[|l|]\dorecurse{#1}{\NC bla \NC\AR}\stoptable}
\showframe
\starttext
\completecontent
\section{bla}
\Lines{10}
\Lines3
\section{bla}
\Table9
\section{bla}
\subsection{bla}
\Lines2
\placetable[force][bla1]{bla}{\Table7}
\Lines2
\subsection{bla}
\Lines7
\placetable[force][bla2]{bla}{\Table{22}}
\subsection{bla}
\Lines2
\placefigure[force][bla3]{}{\framed[height=2cm]{bla}}
\subsubsection{bla}
\Lines8
\subsubsection{bla}
\Lines2
\subsubsection{bla}
\Lines4
\subsubsection{bla}
\Lines2
\section{bla}
\Lines{15}
\Lines2
\section{bla}
\Lines2
\Table9
\Lines2
\stoptext

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06  8:13                   ` Peter Münster
@ 2010-05-06  8:46                     ` Otared Kavian
  2010-05-06  9:13                       ` Wolfgang Schuster
  0 siblings, 1 reply; 22+ messages in thread
From: Otared Kavian @ 2010-05-06  8:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2369 bytes --]

Hi Peter,

I had noticed such strange page breaks before and since it was always in small documents (maths problem sheets), I used an elementary workaround which consists in adding a \medskip or \smallskip before every \section. Actually analogous bad page breaks happen in Plain TeX with \beginsection.
Regarding the minimal example you sent, adding 
\setuphead[section][before=\smallskip]
to the top of your document, solves the problem appearing in the first section. I don't know whether this solves all other strange page breaks or not.

Best regards: OK

On 6 mai 2010, at 10:13, Peter Münster wrote:

> On Wed, May 05 2010, Wolfgang Schuster wrote:
> 
>> The *strict prevents widows and orphans (comment \setuplayout in this 
>> example)
>> but the important setting here is \setupalign[line].
> 
> Hello Wolfgang,
> 
> I know that \setupalign[line] means: last line should touch the bottom.
> It can be useful, but it's not always what I want.
> 
> Here an example from real life (not the content... ;). I hope you agree,
> that there should be done something in the default setup of ConTeXT:
> 
> %\setuplayout[setups=*strict]  % this helps only in some cases...
> %\setupalign[line]  % this means "flushbottom" and I don't always want that
> \def\Lines#1{\dorecurse{#1}{\dorecurse{17}{text }}\par}
> \def\Table#1{\starttable[|l|]\dorecurse{#1}{\NC bla \NC\AR}\stoptable}
> \showframe
> \starttext
> \completecontent
> \section{bla}
> \Lines{10}
> \Lines3
> \section{bla}
> \Table9
> \section{bla}
> \subsection{bla}
> \Lines2
> \placetable[force][bla1]{bla}{\Table7}
> \Lines2
> \subsection{bla}
> \Lines7
> \placetable[force][bla2]{bla}{\Table{22}}
> \subsection{bla}
> \Lines2
> \placefigure[force][bla3]{}{\framed[height=2cm]{bla}}
> \subsubsection{bla}
> \Lines8
> \subsubsection{bla}
> \Lines2
> \subsubsection{bla}
> \Lines4
> \subsubsection{bla}
> \Lines2
> \section{bla}
> \Lines{15}
> \Lines2
> \section{bla}
> \Lines2
> \Table9
> \Lines2
> \stoptext
> 
> Cheers, Peter

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 3671 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06  8:46                     ` Otared Kavian
@ 2010-05-06  9:13                       ` Wolfgang Schuster
  2010-05-06  9:33                         ` Otared Kavian
  2010-05-06  9:44                         ` Peter Münster
  0 siblings, 2 replies; 22+ messages in thread
From: Wolfgang Schuster @ 2010-05-06  9:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 06.05.10 10:46, schrieb Otared Kavian:
> Hi Peter,
>
> I had noticed such strange page breaks before and since it was always 
> in small documents (maths problem sheets), I used an elementary 
> workaround which consists in adding a \medskip or \smallskip before 
> every \section. Actually analogous bad page breaks happen in Plain TeX 
> with \beginsection.
> Regarding the minimal example you sent, adding
> \setuphead[section][before=\smallskip]
> to the top of your document, solves the problem appearing in the first 
> section. I don't know whether this solves all other strange page 
> breaks or not.

You should at least keep the original space before the \section.

\setuphead[section][before={\allowbreak\blank[2*big]}]

The problem is indeed that ConTeXt tries to keep the header and the material
before the header together and there is no real key to control this. 
What you
can find in the core is this

% \chardef\somestructureheadbreakmethod\plusone  % 0=nothing, 
1=weighted, 2=strict, 3=vspacing
\chardef\somestructureheadbreakmethod\plusthree

but that's not what i consider to be available for the user.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06  9:13                       ` Wolfgang Schuster
@ 2010-05-06  9:33                         ` Otared Kavian
  2010-05-06  9:55                           ` Hans Hagen
  2010-05-06  9:44                         ` Peter Münster
  1 sibling, 1 reply; 22+ messages in thread
From: Otared Kavian @ 2010-05-06  9:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On 6 mai 2010, at 11:13, Wolfgang Schuster wrote:

> Am 06.05.10 10:46, schrieb Otared Kavian:
>> Hi Peter,
>> 
>> I had noticed such strange page breaks before and since it was always in small documents (maths problem sheets), I used an elementary workaround which consists in adding a \medskip or \smallskip before every \section. Actually analogous bad page breaks happen in Plain TeX with \beginsection.
>> Regarding the minimal example you sent, adding
>> \setuphead[section][before=\smallskip]
>> to the top of your document, solves the problem appearing in the first section. I don't know whether this solves all other strange page breaks or not.
> 
> You should at least keep the original space before the \section.
> 
> \setuphead[section][before={\allowbreak\blank[2*big]}]

Hi Wolfgang,

Yes, indeed you are right: my point was that adding something before the section solves, sometimes such problems (I can't say why), but as you say one must, or it is wiser to, keep the original space around the \section.


> The problem is indeed that ConTeXt tries to keep the header and the material
> before the header together and there is no real key to control this. What you
> can find in the core is this
> 
> % \chardef\somestructureheadbreakmethod\plusone  % 0=nothing, 1=weighted, 2=strict, 3=vspacing
> \chardef\somestructureheadbreakmethod\plusthree
> 
> but that's not what i consider to be available for the user.

… well, at least not available for users such as me… But it is available for you :-)

Best regards: OK

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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06  9:13                       ` Wolfgang Schuster
  2010-05-06  9:33                         ` Otared Kavian
@ 2010-05-06  9:44                         ` Peter Münster
  1 sibling, 0 replies; 22+ messages in thread
From: Peter Münster @ 2010-05-06  9:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, May 06 2010, Wolfgang Schuster wrote:

> \setuphead[section][before={\allowbreak\blank[2*big]}]

Thanks for this workaround!


> The problem is indeed that ConTeXt tries to keep the header and the material
> before the header together

And does this make sense? Keeping header and the material after the header
together *does* make sense, but not the material *before*.

Thanks for your investigations!
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06  9:33                         ` Otared Kavian
@ 2010-05-06  9:55                           ` Hans Hagen
  2010-05-06 10:09                             ` Peter Münster
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2010-05-06  9:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Otared Kavian

On 6-5-2010 11:33, Otared Kavian wrote:
>
> On 6 mai 2010, at 11:13, Wolfgang Schuster wrote:
>
>> Am 06.05.10 10:46, schrieb Otared Kavian:
>>> Hi Peter,
>>>
>>> I had noticed such strange page breaks before and since it was always in small documents (maths problem sheets), I used an elementary workaround which consists in adding a \medskip or \smallskip before every \section. Actually analogous bad page breaks happen in Plain TeX with \beginsection.
>>> Regarding the minimal example you sent, adding
>>> \setuphead[section][before=\smallskip]
>>> to the top of your document, solves the problem appearing in the first section. I don't know whether this solves all other strange page breaks or not.
>>
>> You should at least keep the original space before the \section.
>>
>> \setuphead[section][before={\allowbreak\blank[2*big]}]

{\testpage[5]\blank[2*big]}

this will make sure that at least there are 5 line equivalents of text.

(I want to integrate that in the spacing code.)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06  9:55                           ` Hans Hagen
@ 2010-05-06 10:09                             ` Peter Münster
  2010-05-06 10:18                               ` Wolfgang Schuster
  2010-05-06 10:55                               ` Hans Hagen
  0 siblings, 2 replies; 22+ messages in thread
From: Peter Münster @ 2010-05-06 10:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, May 06 2010, Hans Hagen wrote:

>>> \setuphead[section][before={\allowbreak\blank[2*big]}]
>
> {\testpage[5]\blank[2*big]}

Hello Hans,

When you take my example from this morning, then you'll see, that
\allowbreak really helps, whereas \testpage[5] only helps in some cases.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06 10:09                             ` Peter Münster
@ 2010-05-06 10:18                               ` Wolfgang Schuster
  2010-05-06 10:55                               ` Hans Hagen
  1 sibling, 0 replies; 22+ messages in thread
From: Wolfgang Schuster @ 2010-05-06 10:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 06.05.10 12:09, schrieb Peter Münster:
> On Thu, May 06 2010, Hans Hagen wrote:
>
>    
>>>> \setuphead[section][before={\allowbreak\blank[2*big]}]
>>>>          
>> {\testpage[5]\blank[2*big]}
>>      
> Hello Hans,
>
> When you take my example from this morning, then you'll see, that
> \allowbreak really helps, whereas \testpage[5] only helps in some cases.
>    

MkIV has a 'preference' option for \blank but it does not work for me.

\setuphead[section][before={\blank[preference,2*big]}]

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06 10:09                             ` Peter Münster
  2010-05-06 10:18                               ` Wolfgang Schuster
@ 2010-05-06 10:55                               ` Hans Hagen
  2010-05-06 11:17                                 ` Peter Münster
  1 sibling, 1 reply; 22+ messages in thread
From: Hans Hagen @ 2010-05-06 10:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 6-5-2010 12:09, Peter Münster wrote:
> On Thu, May 06 2010, Hans Hagen wrote:
>
>>>> \setuphead[section][before={\allowbreak\blank[2*big]}]
>>
>> {\testpage[5]\blank[2*big]}
>
> Hello Hans,
>
> When you take my example from this morning, then you'll see, that
> \allowbreak really helps, whereas \testpage[5] only helps in some cases.

yes but allowbreak introduces a penalty node that can interfere with 
spacing

(as taco explained, it's all related to tex not being that clever in 
breaking pages and there is no 100% robust way to predict and calculate 
such situations)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06 10:55                               ` Hans Hagen
@ 2010-05-06 11:17                                 ` Peter Münster
  2010-05-06 11:27                                   ` Hans Hagen
  0 siblings, 1 reply; 22+ messages in thread
From: Peter Münster @ 2010-05-06 11:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, May 06 2010, Hans Hagen wrote:

>> When you take my example from this morning, then you'll see, that
>> \allowbreak really helps, whereas \testpage[5] only helps in some cases.
>
> yes but allowbreak introduces a penalty node that can interfere with 
> spacing

Anyway, I don't consider \allowbreak a solution, rather a work-around.
Should I put this issue on the tracker?
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: strange page break
  2010-05-06 11:17                                 ` Peter Münster
@ 2010-05-06 11:27                                   ` Hans Hagen
  0 siblings, 0 replies; 22+ messages in thread
From: Hans Hagen @ 2010-05-06 11:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 6-5-2010 1:17, Peter Münster wrote:
> On Thu, May 06 2010, Hans Hagen wrote:
>
>>> When you take my example from this morning, then you'll see, that
>>> \allowbreak really helps, whereas \testpage[5] only helps in some cases.
>>
>> yes but allowbreak introduces a penalty node that can interfere with
>> spacing
>
> Anyway, I don't consider \allowbreak a solution, rather a work-around.
> Should I put this issue on the tracker?

as long term issue ok, as it has to wait till we've opened up the par 
builder in luatex

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-05-06 11:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-04  5:38 strange page break Peter Münster
2010-05-05 11:42 ` Taco Hoekwater
2010-05-05 14:38   ` Peter Münster
2010-05-05 14:50     ` Taco Hoekwater
2010-05-05 14:57       ` luigi scarso
2010-05-05 15:33       ` Peter Münster
2010-05-05 15:44         ` Wolfgang Schuster
2010-05-05 16:23           ` Peter Münster
2010-05-05 16:43             ` Wolfgang Schuster
2010-05-05 17:21               ` Peter Münster
2010-05-05 17:37                 ` Wolfgang Schuster
2010-05-06  8:13                   ` Peter Münster
2010-05-06  8:46                     ` Otared Kavian
2010-05-06  9:13                       ` Wolfgang Schuster
2010-05-06  9:33                         ` Otared Kavian
2010-05-06  9:55                           ` Hans Hagen
2010-05-06 10:09                             ` Peter Münster
2010-05-06 10:18                               ` Wolfgang Schuster
2010-05-06 10:55                               ` Hans Hagen
2010-05-06 11:17                                 ` Peter Münster
2010-05-06 11:27                                   ` Hans Hagen
2010-05-06  9:44                         ` Peter Münster

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).