ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Keeping titles together with the following text when grid is on
@ 2013-12-02  7:16 "H. Özoguz"
  2013-12-02 20:02 ` Jan Tosovsky
       [not found] ` <007e01ceef99$71547c00$53fd7400$@tosovsky@email.cz>
  0 siblings, 2 replies; 9+ messages in thread
From: "H. Özoguz" @ 2013-12-02  7:16 UTC (permalink / raw)
  To: ntg-context

Hello,

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:


\setuppapersize[B5]

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

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

%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

Huseyin
___________________________________________________________________________________
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] 9+ messages in thread

* Re: Keeping titles together with the following text when grid is on
  2013-12-02  7:16 Keeping titles together with the following text when grid is on "H. Özoguz"
@ 2013-12-02 20:02 ` Jan Tosovsky
       [not found] ` <007e01ceef99$71547c00$53fd7400$@tosovsky@email.cz>
  1 sibling, 0 replies; 9+ messages in thread
From: Jan Tosovsky @ 2013-12-02 20:02 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

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
___________________________________________________________________________________


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

* Re: Keeping titles together with the following text when grid is on
       [not found] ` <007e01ceef99$71547c00$53fd7400$@tosovsky@email.cz>
@ 2013-12-02 20:12   ` Thomas A. Schmitz
  2013-12-02 20:40     ` Jan Tosovsky
       [not found]     ` <008201ceef9e$cc7c6a20$65753e60$@tosovsky@email.cz>
  2013-12-02 20:27   ` Aditya Mahajan
  2013-12-03  8:52   ` Hans Hagen
  2 siblings, 2 replies; 9+ messages in thread
From: Thomas A. Schmitz @ 2013-12-02 20:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: Keeping titles together with the following text when grid is on
       [not found] ` <007e01ceef99$71547c00$53fd7400$@tosovsky@email.cz>
  2013-12-02 20:12   ` Thomas A. Schmitz
@ 2013-12-02 20:27   ` Aditya Mahajan
  2013-12-03  8:52   ` Hans Hagen
  2 siblings, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2013-12-02 20:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


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

* Re: Keeping titles together with the following text when grid is on
  2013-12-02 20:12   ` Thomas A. Schmitz
@ 2013-12-02 20:40     ` Jan Tosovsky
       [not found]     ` <008201ceef9e$cc7c6a20$65753e60$@tosovsky@email.cz>
  1 sibling, 0 replies; 9+ messages in thread
From: Jan Tosovsky @ 2013-12-02 20:40 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

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
___________________________________________________________________________________


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

* Re: Keeping titles together with the following text when grid is on
       [not found]     ` <008201ceef9e$cc7c6a20$65753e60$@tosovsky@email.cz>
@ 2013-12-02 22:00       ` Alan Braslau
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Braslau @ 2013-12-02 22:00 UTC (permalink / raw)
  To: j.tosovsky; +Cc: mailing list for ConTeXt users

On Mon, 2 Dec 2013 21:40:55 +0100
Jan Tosovsky <j.tosovsky@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
___________________________________________________________________________________


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

* Re: Keeping titles together with the following text when grid is on
       [not found] ` <007e01ceef99$71547c00$53fd7400$@tosovsky@email.cz>
  2013-12-02 20:12   ` Thomas A. Schmitz
  2013-12-02 20:27   ` Aditya Mahajan
@ 2013-12-03  8:52   ` Hans Hagen
  2013-12-03 15:21     ` Wolfgang Schuster
  2 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2013-12-03  8:52 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________


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

* Re: Keeping titles together with the following text when grid is on
  2013-12-03  8:52   ` Hans Hagen
@ 2013-12-03 15:21     ` Wolfgang Schuster
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Schuster @ 2013-12-03 15:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 03.12.2013 um 09:52 schrieb Hans Hagen <pragma@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
___________________________________________________________________________________

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

* Keeping titles together with the following text when grid is on
@ 2013-11-30 15:22 Jan Tosovsky
  0 siblings, 0 replies; 9+ messages in thread
From: Jan Tosovsky @ 2013-11-30 15:22 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

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}{10000}
    \setpenalties\clubpenalties {2}{10000}
\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
___________________________________________________________________________________


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

end of thread, other threads:[~2013-12-03 15:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-02  7:16 Keeping titles together with the following text when grid is on "H. Özoguz"
2013-12-02 20:02 ` Jan Tosovsky
     [not found] ` <007e01ceef99$71547c00$53fd7400$@tosovsky@email.cz>
2013-12-02 20:12   ` Thomas A. Schmitz
2013-12-02 20:40     ` Jan Tosovsky
     [not found]     ` <008201ceef9e$cc7c6a20$65753e60$@tosovsky@email.cz>
2013-12-02 22:00       ` Alan Braslau
2013-12-02 20:27   ` Aditya Mahajan
2013-12-03  8:52   ` Hans Hagen
2013-12-03 15:21     ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2013-11-30 15:22 Jan Tosovsky

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