Re: [NTG-context] Keeping titles together with the following text when grid is on

2013-12-03 Thread Hans Hagen

On 12/2/2013 9:02 PM, Jan Tosovsky wrote:

On 2013-12-02 H. Özoguz wrote:

On 2013-12-01 Jan Tosovsky wrote:


when grid is on, orphan and widows have to be eliminated using

additional

penalty settings. Whereas it works fine for body text, section titles

are

still sometimes left at the bottom of the page.


this is not the same question as handling orphan and widows - because
you surely do not want some titles with only 2-3 lines of body text
after them.

I always use \testpage[x] to handle those issues, see your example
with testpage:

\setuphead[section][before={\testpage[8]\blank}]


\blank[samepage,big]


Thanks, it works! Another magic command not documented anywhere in the
ConTeXt Guide or Wiki...

I was looking for any alternative for XSL-FO's keep-with-next=always. This
is a different approach, but it doesn't matter.

Btw, I still don't understand why keeping the title and text behaves
differently when grid is on...

Jan

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




--

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


Re: [NTG-context] Keeping titles together with the following text when grid is on

2013-12-03 Thread Wolfgang Schuster

Am 03.12.2013 um 09:52 schrieb Hans Hagen pra...@wxs.nl:

 On 12/2/2013 9:02 PM, Jan Tosovsky wrote:
 On 2013-12-02 H. Özoguz wrote:
 On 2013-12-01 Jan Tosovsky wrote:
 
 when grid is on, orphan and widows have to be eliminated using
 additional
 penalty settings. Whereas it works fine for body text, section titles
 are
 still sometimes left at the bottom of the page.
 
 this is not the same question as handling orphan and widows - because
 you surely do not want some titles with only 2-3 lines of body text
 after them.
 
 I always use \testpage[x] to handle those issues, see your example
 with testpage:
 
 \setuphead[section][before={\testpage[8]\blank}]
 
 \blank[samepage,big]

This doesn’t work because “samepage” is ignored when the grid is enabled.

%\setuplayout[grid=yes,lines=10]
\setuplayout[lines=10]

\showgrid

\starttext
\dontleavehmode\blank[fixed,8*line]
text
\blank[samepage,line]
text
\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
___

Re: [NTG-context] Keeping titles together with the following text when grid is on

2013-12-02 Thread Jan Tosovsky
On 2013-12-02 H. Özoguz wrote:
 On 2013-12-01 Jan Tosovsky wrote:
  
  when grid is on, orphan and widows have to be eliminated using
additional
  penalty settings. Whereas it works fine for body text, section titles
are
  still sometimes left at the bottom of the page.
 
 this is not the same question as handling orphan and widows - because
 you surely do not want some titles with only 2-3 lines of body text
 after them.
 
 I always use \testpage[x] to handle those issues, see your example
 with testpage:
 
 \setuphead[section][before={\testpage[8]\blank}]

Thanks, it works! Another magic command not documented anywhere in the
ConTeXt Guide or Wiki...

I was looking for any alternative for XSL-FO's keep-with-next=always. This
is a different approach, but it doesn't matter.

Btw, I still don't understand why keeping the title and text behaves
differently when grid is on...
 
Jan

___
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] Keeping titles together with the following text when grid is on

2013-12-02 Thread Thomas A. Schmitz
On 12/02/2013 09:02 PM, Jan Tosovsky wrote:
 Thanks, it works! Another magic command not documented anywhere in the
 ConTeXt Guide or Wiki...

So have you added it yet?

Thomas
___
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] Keeping titles together with the following text when grid is on

2013-12-02 Thread Aditya Mahajan

On Mon, 2 Dec 2013, Jan Tosovsky wrote:


\setuphead[section][before={\testpage[8]\blank}]


Thanks, it works! Another magic command not documented anywhere in the
ConTeXt Guide or Wiki...


In that case, please add it to the wiki.

Aditya
___
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] Keeping titles together with the following text when grid is on

2013-12-02 Thread Jan Tosovsky
On 2013-12-02 Thomas A. Schmitz wrote:
 On 12/02/2013 09:02 PM, Jan Tosovsky wrote:
  Thanks, it works! Another magic command not documented anywhere in
  the ConTeXt Guide or Wiki...
 
 So have you added it yet?
 

I plan to update some pages in near future, but rather in form of examples
of use. 

It is hard to describe commands without knowing what exactly they do, in
which versions they are supported (I work in most recent MkIV which is not
the case of everybody), whether they are perspective/deprecated or if there
are any limitations when they are used. 

Nowadays most of API/command references are generated automatically directly
from the source code comments. It ensures up to date data, but it helps also
to programmers. Descriptive comments in the source helps to understand the
given code when editing older parts. I do not know to what extent it could
be implemented here, but the respective person could give it a try.

Jan

___
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] Keeping titles together with the following text when grid is on

2013-12-02 Thread Alan Braslau
On Mon, 2 Dec 2013 21:40:55 +0100
Jan Tosovsky j.tosov...@email.cz wrote:

 Nowadays most of API/command references are generated automatically
 directly from the source code comments. It ensures up to date data,
 but it helps also to programmers. Descriptive comments in the source
 helps to understand the given code when editing older parts. I do not
 know to what extent it could be implemented here, but the respective
 person could give it a try

Sometimes/often the answers to many questions can be found in the
source code, indeed. Also, most names are intended to be quite
descriptive, and ConTeXt does not error in the use of terse, cryptic
labels. In fact, descriptive comments in the source then become
redundant when the code is written in such an explicit style.

This does not mean that there is no need for good documentation and
tutorials.

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


[NTG-context] Keeping titles together with the following text when grid is on

2013-11-30 Thread Jan Tosovsky
Dear All,

when grid is on, orphan and widows have to be eliminated using additional
penalty settings. Whereas it works fine for body text, section titles are
still sometimes left at the bottom of the page.

It can be reproduced using this example:

\setuppapersize[B5]

\startsetups[grid][mypenalties]
\setdefaultpenalties
\setpenalties\widowpenalties{2}{1}
\setpenalties\clubpenalties {2}{1}
\stopsetups

%comment the following line to see the difference
\setuplayout[grid=yes, setups=mypenalties] 
\showgrid 

\starttext
   \blank[force, 9.5cm]
   \input tufte
   \section{Tufte}
   \input tufte
\stoptext

Is there any extra option for handling this?

Thanks, Jan

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