On 6/19/2024 4:06 PM, Mikael Sundqvist wrote:
Hi,

On Wed, Jun 19, 2024 at 3:40 PM Alan Bowen <bowenala...@gmail.com <mailto:bowenala...@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
___________________________________________________________________________________

Reply via email to