ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* page-break after \section
@ 2007-03-20 21:20 Peter Münster
  2007-03-21  4:37 ` luigi scarso
  2007-04-10 13:05 ` Aditya Mahajan
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Münster @ 2007-03-20 21:20 UTC (permalink / raw)
  To: ConTeXt list

Hello,

in the following example, there is a page-break after the second section
title. \page[no] does not help.

Is this normal or a bug?

\starttext
\section{bla}
\dorecurse{36}{bla\par}
\section{bla}
\page[no]
\startitemize
\dorecurse{5}{\item bla}
\stopitemize
\stoptext

Cheers, Peter

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

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

* Re: page-break after \section
  2007-03-20 21:20 page-break after \section Peter Münster
@ 2007-03-21  4:37 ` luigi scarso
  2007-03-21 18:26   ` Peter Münster
  2007-04-10 13:05 ` Aditya Mahajan
  1 sibling, 1 reply; 9+ messages in thread
From: luigi scarso @ 2007-03-21  4:37 UTC (permalink / raw)
  To: ntg-context

On 3/20/07, Peter Münster <pmlists@free.fr> wrote:
> Hello,
>
> in the following example, there is a page-break after the second section
> title. \page[no] does not help.
>
> Is this normal or a bug?
Normal, I believe
>
> \starttext
> \section{bla}
> \dorecurse{36}{bla\par}
> \section{bla}
> \page[no]
> \startitemize
> \dorecurse{5}{\item bla}
> \stopitemize
> \stoptext

try this
%%%%%%%%%%%%%%%%%%
\showframe
\starttext
\section{bla}
\dorecurse{36}{bla\par}
\section{bla}
\page[no]
\startitemize
\dorecurse{5}{\item bla}
\stopitemize
\stoptext
%%%%%%%%%%%%%%%%%%%%%

and this
%%%%%%%%%%%%%%%%5
\showframe
\starttext
\section{bla}
\dorecurse{34}{bla\par}%%%% not 35 or 36 !
\section{bla}
\page[no]
\startitemize
\dorecurse{5}{\item bla}
\stopitemize
\stoptext
%%%%%%%%%%%%%%%%%%%

maybe some defaults spaces of \section

luigi

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

* Re: page-break after \section
  2007-03-21  4:37 ` luigi scarso
@ 2007-03-21 18:26   ` Peter Münster
  2007-03-22 13:44     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Münster @ 2007-03-21 18:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 21 Mar 2007, luigi scarso wrote:

> > in the following example, there is a page-break after the second section
> > title. \page[no] does not help.
> >
> > Is this normal or a bug?
> Normal, I believe

Too bad. I think, there can be still some enhancements: in LaTeX, there
is never a page break after a section header, but with ConTeXt there is
sometimes by surprise...

> try this
> %%%%%%%%%%%%%%%%%%
> \showframe
> \starttext
> \section{bla}
> \dorecurse{36}{bla\par}
> \section{bla}
> \page[no]
> \startitemize
> \dorecurse{5}{\item bla}
> \stopitemize
> \stoptext
> %%%%%%%%%%%%%%%%%%%%%

There is still a page break + a frame.

> and this
> %%%%%%%%%%%%%%%%5
> \showframe
> \starttext
> \section{bla}
> \dorecurse{34}{bla\par}%%%% not 35 or 36 !
> \section{bla}
> \page[no]
> \startitemize
> \dorecurse{5}{\item bla}
> \stopitemize
> \stoptext
> %%%%%%%%%%%%%%%%%%%

No more page break after the section head, but that's normal: you changed
the number of lines.

Cheers, Peter

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

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

* Re: page-break after \section
  2007-03-21 18:26   ` Peter Münster
@ 2007-03-22 13:44     ` Hans Hagen
  2007-03-22 19:06       ` Peter Münster
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2007-03-22 13:44 UTC (permalink / raw)
  To: ntg-context

� wrote:
> On Wed, 21 Mar 2007, luigi scarso wrote:
>
>   
>>> in the following example, there is a page-break after the second section
>>> title. \page[no] does not help.
>>>
>>> Is this normal or a bug?
>>>       
>> Normal, I believe
>>     
>
> Too bad. I think, there can be still some enhancements: in LaTeX, there
> is never a page break after a section header, but with ConTeXt there is
> sometimes by surprise...
>   
well, it depends, if the next structure does a vskip of some testing 
then there can be a page break

there is no robust way to prevent this in current tex, at least nog when 
some spacing mechansism are used, ok, a penalty 10000 may sometimes 
help, but even then, successive skips and such may interfere

also, vskip12pt \penalty vskip12pt ma not what you want (i.e. collapsing 
becomes tricky)

context sectioning has some prevent-break stuff

you can add a penalty 10000 if you know what you're dealing with

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: page-break after \section
  2007-03-22 13:44     ` Hans Hagen
@ 2007-03-22 19:06       ` Peter Münster
  2007-03-22 20:23         ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Münster @ 2007-03-22 19:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 22 Mar 2007, Hans Hagen wrote:

> well, it depends, if the next structure does a vskip of some testing 
> then there can be a page break
> 
> there is no robust way to prevent this in current tex, at least nog when 
> some spacing mechansism are used, ok, a penalty 10000 may sometimes 
> help, but even then, successive skips and such may interfere

Thanks for your explanation!
Do you know, how the LaTeX people solved this problem? I've never had such
surprises with LaTeX.

> you can add a penalty 10000 if you know what you're dealing with

Ok, I'll try it.

Cheers, Peter

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

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

* Re: page-break after \section
  2007-03-22 19:06       ` Peter Münster
@ 2007-03-22 20:23         ` Hans Hagen
  2007-03-22 21:05           ` Taco Hoekwater
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2007-03-22 20:23 UTC (permalink / raw)
  To: ntg-context

� wrote:
> On Thu, 22 Mar 2007, Hans Hagen wrote:
>
>   
>> well, it depends, if the next structure does a vskip of some testing 
>> then there can be a page break
>>
>> there is no robust way to prevent this in current tex, at least nog when 
>> some spacing mechansism are used, ok, a penalty 10000 may sometimes 
>> help, but even then, successive skips and such may interfere
>>     
>
> Thanks for your explanation!
> Do you know, how the LaTeX people solved this problem? I've never had such
> surprises with LaTeX.
>   
i dunno, but i remember problems with splits between chapter, section and subsection heads and context prohibits that; *any* tex where some construct introduces whitespace has this problem but i can imagine some tricky stuff with the otr involved (and even then there may be interference with preceding material); i do (did) observe that latex has a different spacing model (and interfering penalties may be a reason why sometimes spacing gets messed up); 

i will implement a second spacing model once luatex is available 

in tex, when one has a controlled situation, solutions are possible but context is rather configurable

\setuphead[section][after=\blank\pelanty10000\relax] may help but also mess up spacing 

(esp floats are hard to interface with such things because they also look at the available space and currently don't look back; keep in mind that when looking back the content is already put in the mlv and ther ei sno knowledg ewhat is preceding the current structure 



Hans 


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: page-break after \section
  2007-03-22 20:23         ` Hans Hagen
@ 2007-03-22 21:05           ` Taco Hoekwater
  0 siblings, 0 replies; 9+ messages in thread
From: Taco Hoekwater @ 2007-03-22 21:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans Hagen wrote:
>>> 
>> Thanks for your explanation! Do you know, how the LaTeX people
>> solved this problem? I've never had such surprises with LaTeX.
>> 
> ...
> interference with preceding material); i do (did) observe that latex
> has a different spacing model (and interfering penalties may be a
> reason why sometimes spacing gets messed up);

LaTeX is pretty good in keeping section heads together with
the following material, but the tradeoff is that sometimes it
inserts massive amounts of whitespace on a page, because a section
head and a subsection head and the following first two paragraph
lines all appear after an automatically inserted pagebreak.

IIRC, it also makes float placements harder to predict.

Best wishes,
Taco

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

* Re: page-break after \section
  2007-03-20 21:20 page-break after \section Peter Münster
  2007-03-21  4:37 ` luigi scarso
@ 2007-04-10 13:05 ` Aditya Mahajan
  2007-04-11 18:11   ` Peter Münster
  1 sibling, 1 reply; 9+ messages in thread
From: Aditya Mahajan @ 2007-04-10 13:05 UTC (permalink / raw)
  To: ConTeXt list

On Tue, 20 Mar 2007, Peter Münster wrote:

> Hello,
>
> in the following example, there is a page-break after the second section
> title. \page[no] does not help.
>
> Is this normal or a bug?
>
> \starttext
> \section{bla}
> \dorecurse{36}{bla\par}
> \section{bla}
> \page[no]
> \startitemize
> \dorecurse{5}{\item bla}
> \stopitemize
> \stoptext
>

(Untested) Did you try:

\startitemize[intro]

AFAIU, intro prevents a page break before itemize.

Aditya

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

* Re: page-break after \section
  2007-04-10 13:05 ` Aditya Mahajan
@ 2007-04-11 18:11   ` Peter Münster
  0 siblings, 0 replies; 9+ messages in thread
From: Peter Münster @ 2007-04-11 18:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 10 Apr 2007, Aditya Mahajan wrote:

> (Untested) Did you try:
> 
> \startitemize[intro]
> 
> AFAIU, intro prevents a page break before itemize.

Thanks, this works!
Cheers, Peter

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

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

end of thread, other threads:[~2007-04-11 18:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 21:20 page-break after \section Peter Münster
2007-03-21  4:37 ` luigi scarso
2007-03-21 18:26   ` Peter Münster
2007-03-22 13:44     ` Hans Hagen
2007-03-22 19:06       ` Peter Münster
2007-03-22 20:23         ` Hans Hagen
2007-03-22 21:05           ` Taco Hoekwater
2007-04-10 13:05 ` Aditya Mahajan
2007-04-11 18:11   ` 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).