* [NTG-context] \brokenpenalties query
@ 2024-06-19 13:28 Alan Bowen
2024-06-19 14:06 ` [NTG-context] " Mikael Sundqvist
0 siblings, 1 reply; 8+ messages in thread
From: Alan Bowen @ 2024-06-19 13:28 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 308 bytes --]
I have in the past relied on
\setpenalties\brokenpenalties{1}{10000}\
to set the penalty for a page break after a hyphen. But with the latest
LMTX, when I run the file, I get the error message
Error count has to be 1 for \brokenpenalties
Any advice on how to fix the file would be most welcome.
Alan
[-- Attachment #1.2: Type: text/html, Size: 1100 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: \brokenpenalties query
2024-06-19 13:28 [NTG-context] \brokenpenalties query Alan Bowen
@ 2024-06-19 14:06 ` Mikael Sundqvist
2024-06-19 14:41 ` Hans Hagen via ntg-context
0 siblings, 1 reply; 8+ messages in thread
From: Mikael Sundqvist @ 2024-06-19 14:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1151 bytes --]
Hi,
On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen <bowenalan03@gmail.com> wrote:
> I have in the past relied on
> \setpenalties\brokenpenalties{1}{10000}\
> to set the penalty for a page break after a hyphen. But with the latest
> LMTX, when I run the file, I get the error message
> Error count has to be 1 for \brokenpenalties
> Any advice on how to fix the file would be most welcome.
>
> Alan
>
Probably only Hans (or Wolfgang) can give a complete answer here. But
\startsetups [*default]
\directsetup{*reset}
\frozen\brokenpenalties 1 10000\relax
\stopsetups
works here.
/Mikael
PS
An interesting new feature is the possibility to set penalties depending on
left and right page, by using options. For example
\startsetups [*default]
\directsetup{*reset}
\frozen\clubpenalties 3 options 4 1500 3000 250 500 0 0 \relax
\stopsetups
sets club club penalties 1500 for first line and 250 for second for going
from left page to right page (and then 0 for the rest) and 3000 for first
line and 500 for second (and rest 0) for going from right page to left page.
I hope this helps a bit.
[-- Attachment #1.2: Type: text/html, Size: 2392 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: \brokenpenalties query
2024-06-19 14:06 ` [NTG-context] " Mikael Sundqvist
@ 2024-06-19 14:41 ` Hans Hagen via ntg-context
2024-06-20 13:21 ` Mikael Sundqvist
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen via ntg-context @ 2024-06-19 14:41 UTC (permalink / raw)
To: ntg-context; +Cc: Hans Hagen
On 6/19/2024 4:06 PM, Mikael Sundqvist wrote:
> Hi,
>
> On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen <bowenalan03@gmail.com
> <mailto:bowenalan03@gmail.com>> wrote:
>
> I have in the past relied on
> \setpenalties\brokenpenalties{1}{10000}\
> to set the penalty for a page break after a hyphen. But with the
> latest LMTX, when I run the file, I get the error message
> Error count has to be 1 for \brokenpenalties
>
> Any advice on how to fix the file would be most welcome.
>
> Alan
>
>
> Probably only Hans (or Wolfgang) can give a complete answer here. But
>
> \startsetups [*default]
> \directsetup{*reset}
> \frozen\brokenpenalties 1 10000\relax
> \stopsetups
>
> works here.
>
> /Mikael
currently \brokenpenalties only takes one setting
\permanent\protected\def\setpenalties#1#2#3%
{\ifdefined#1%
\frozen#1\ifx#1\brokenpenalties
\plusone#3\relax
\else
\numexpr#2+\plusone\relax\space\expandedrepeat\numexpr#2\relax
{ #3}\zerocount\relax
\fi
\fi}
> PS
>
> An interesting new feature is the possibility to set penalties depending
> on left and right page, by using options. For example
>
> \startsetups [*default]
> \directsetup{*reset}
> \frozen\clubpenalties 3 options 4 1500 3000 250 500 0 0 \relax
> \stopsetups
>
> sets club club penalties 1500 for first line and 250 for second for
> going from left page to right page (and then 0 for the rest) and 3000
> for first line and 500 for second (and rest 0) for going from right page
> to left page.
>
> I hope this helps a bit.
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: \brokenpenalties query
2024-06-19 14:41 ` Hans Hagen via ntg-context
@ 2024-06-20 13:21 ` Mikael Sundqvist
2024-06-20 20:33 ` Alan Bowen
0 siblings, 1 reply; 8+ messages in thread
From: Mikael Sundqvist @ 2024-06-20 13:21 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi again,
in fact, the \brokenpenalties is new. So using \setpenalties on it in
the past did not do anything, since \ifdefined#1 would never be
true...
/Mikael
On Wed, Jun 19, 2024 at 4:45 PM Hans Hagen via ntg-context
<ntg-context@ntg.nl> wrote:
>
> On 6/19/2024 4:06 PM, Mikael Sundqvist wrote:
> > Hi,
> >
> > On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen <bowenalan03@gmail.com
> > <mailto:bowenalan03@gmail.com>> wrote:
> >
> > I have in the past relied on
> > \setpenalties\brokenpenalties{1}{10000}\
> > to set the penalty for a page break after a hyphen. But with the
> > latest LMTX, when I run the file, I get the error message
> > Error count has to be 1 for \brokenpenalties
> >
> > Any advice on how to fix the file would be most welcome.
> >
> > Alan
> >
> >
> > Probably only Hans (or Wolfgang) can give a complete answer here. But
> >
> > \startsetups [*default]
> > \directsetup{*reset}
> > \frozen\brokenpenalties 1 10000\relax
> > \stopsetups
> >
> > works here.
> >
> > /Mikael
> currently \brokenpenalties only takes one setting
>
> \permanent\protected\def\setpenalties#1#2#3%
> {\ifdefined#1%
> \frozen#1\ifx#1\brokenpenalties
> \plusone#3\relax
> \else
> \numexpr#2+\plusone\relax\space\expandedrepeat\numexpr#2\relax
> { #3}\zerocount\relax
> \fi
> \fi}
>
> > PS
> >
> > An interesting new feature is the possibility to set penalties depending
> > on left and right page, by using options. For example
> >
> > \startsetups [*default]
> > \directsetup{*reset}
> > \frozen\clubpenalties 3 options 4 1500 3000 250 500 0 0 \relax
> > \stopsetups
> >
> > sets club club penalties 1500 for first line and 250 for second for
> > going from left page to right page (and then 0 for the rest) and 3000
> > for first line and 500 for second (and rest 0) for going from right page
> > to left page.
> >
> > I hope this helps a bit.
> >
> > ___________________________________________________________________________________
> > If your question is of interest to others as well, please add an entry to the Wiki!
> >
> > maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> > archive : https://github.com/contextgarden/context
> > wiki : https://wiki.contextgarden.net
> > ___________________________________________________________________________________
>
> --
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: \brokenpenalties query
2024-06-20 13:21 ` Mikael Sundqvist
@ 2024-06-20 20:33 ` Alan Bowen
2024-06-20 20:53 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Alan Bowen @ 2024-06-20 20:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 235 bytes --]
Mikael and Hans—
Thank you so much for your help.Your advice regarding \brokenpenalities and
\clubpenalities is greatly appreciated and will solve a problem that I
was having from time to time in paginating my journal.
Alan
[-- Attachment #1.2: Type: text/html, Size: 1046 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: \brokenpenalties query
2024-06-20 20:33 ` Alan Bowen
@ 2024-06-20 20:53 ` Hans Hagen
2024-06-21 15:23 ` Alan Bowen
0 siblings, 1 reply; 8+ messages in thread
From: Hans Hagen @ 2024-06-20 20:53 UTC (permalink / raw)
To: ntg-context
On 6/20/2024 10:33 PM, Alan Bowen wrote:
> Mikael and Hans—
>
> Thank you so much for your help.Your advice regarding \brokenpenalities
> and \clubpenalities is greatly appreciated and will solve a problem that
> I was having from time to time in paginating my journal.
+ \widowpenalties
one works top down, the other bottom up and when they colide they add up
there are some more new ones, like \orphanpenalty (and \orphanpenalties)
as well as \todlerpenalty as well as multriple parpasses
another new feature is vertical expansion
some is documented alreaydy and more details will follow (probably after
the ctx meeting)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* [NTG-context] Re: \brokenpenalties query
2024-06-20 20:53 ` Hans Hagen
@ 2024-06-21 15:23 ` Alan Bowen
2024-06-21 16:10 ` Hans Hagen
0 siblings, 1 reply; 8+ messages in thread
From: Alan Bowen @ 2024-06-21 15:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1842 bytes --]
I have found entries on \widowpenalty, \widowpenalties, \orphanpenalty,
\orphanpenalities and look forward to learning about vertical expansion.
Many thanks, Hans.
Alan
On Thu, Jun 20, 2024 at 4:56 PM Hans Hagen <j.hagen@xs4all.nl> wrote:
> On 6/20/2024 10:33 PM, Alan Bowen wrote:
> > Mikael and Hans—
> >
> > Thank you so much for your help.Your advice regarding \brokenpenalities
> > and \clubpenalities is greatly appreciated and will solve a problem that
> > I was having from time to time in paginating my journal.
> + \widowpenalties
>
> one works top down, the other bottom up and when they colide they add up
>
> there are some more new ones, like \orphanpenalty (and \orphanpenalties)
> as well as \todlerpenalty as well as multriple parpasses
>
> another new feature is vertical expansion
>
> some is documented alreaydy and more details will follow (probably after
> the ctx meeting)
>
> Hans
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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 /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 3185 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-06-21 16:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-19 13:28 [NTG-context] \brokenpenalties query Alan Bowen
2024-06-19 14:06 ` [NTG-context] " Mikael Sundqvist
2024-06-19 14:41 ` Hans Hagen via ntg-context
2024-06-20 13:21 ` Mikael Sundqvist
2024-06-20 20:33 ` Alan Bowen
2024-06-20 20:53 ` Hans Hagen
2024-06-21 15:23 ` Alan Bowen
2024-06-21 16:10 ` Hans Hagen
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).