ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Understanding penalties for orphans and widows
@ 2021-06-01 12:05 denis.maier
  0 siblings, 0 replies; only message in thread
From: denis.maier @ 2021-06-01 12:05 UTC (permalink / raw)
  To: ntg-context


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

Hi,

I've read in the wiki (https://wiki.contextgarden.net/Widows_and_orphans_control) that this setting can be used to keep at least two lines together:

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

After experimenting with the first argument (see below) it looks to me as if the wording on the wiki should be changed a bit, from <Example how to keep at least 2 lines together> to <Example how to keep at least 2 full lines together> (penalties1 gives me one full line and a second line that is almost full ; penalties2 results in two full lines with a third line that is almost full.).

Is my interpretation correct?

Denis

\setuppapersize[A6]
\setuplayout[lines=20]
\setupalign[line]

\showframe

\startsetups[penalties1]
    \setdefaultpenalties
    \setpenalties\widowpenalties{1}{10000}
\stopsetups

\startsetups[penalties2]
    \setdefaultpenalties
    \setpenalties\widowpenalties{2}{10000}
\stopsetups

\starttext

\setuplayout[setups=penalties1]

\samplefile{tufte}\par
Here we are writing some more words to see the effect.
Here we are writing some more words to see the effect.
Here we are writing some more words to see the effect.

\page
\setuplayout[setups=penalties2]

\samplefile{tufte}\par
Here we are writing some more words to see the effect.
Here we are writing some more words to see the effect.
Here we are writing some more words to see the effect.

\stoptext

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

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-01 12:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 12:05 Understanding penalties for orphans and widows denis.maier

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