From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: Adjusting column width dynamically to get rid of orphans and widows
Date: Sun, 25 Jun 2017 13:16:19 +0200 [thread overview]
Message-ID: <545bb90c-abd6-cf4a-07cf-7db8450db085@wxs.nl> (raw)
In-Reply-To: <CADf_Gt12uNP2qMQ+f+YE4TwJk22g9MNpxpc2CroE9ksbJRvnoA@mail.gmail.com>
On 6/24/2017 4:48 PM, Thomas Widmann wrote:
> On 24 June 2017 at 01:19, Henri Menke <henrimenke@gmail.com> wrote:
>>
>> How about putting every entry into a box, making it unbreakable? Of course, you get unbalanced
>> columns this way, but I think keeping the entries together is easier for the reader.
>
> Thanks for your suggestion, but I don't think that'd work. Firstly,
> it'd require you to figure out whether an entry is longer than three
> lines (and thus breakable) before putting it into a box. Secondly,
> unbalanced columns really aren't the done thing in dictionary
> publishing.
>
> Lots of published dictionaries are full of orphans and widows because
> they're so hard to avoid without a lot of manual intervention, which
> is why I'm keen to explore and novel ways to avoid them.
>
> However, all ways I can think of requires typesetting the entries in
> the last column multiple times, i.e.:
>
> repeat
> adjust parameters (column width, looseness, ...)
> typeset column
> until the column doesn't generate orphan/widow
>
> Is this possible with ConTeXt/LuaTeX?
maybe be more explicit with very large penalties helps
\startdocument
\showmakeup[penalty]
\startbuffer
\dorecurse{30}{
\widowpenalty\maxdimen
\clubpenalty \maxdimen
{\tf test #1.1}\crlf
{\bi test #1.2}\crlf
{\tf test #1.3}\crlf
{\bf test #1.4}\relax
\par
}
\stopbuffer
\dorecurse{20}{
\dontcomplain
\startmixedcolumns[balance=yes]
\dorecurse{#1}{line #1\crlf}
\getbuffer
\stopmixedcolumns
\page
}
\stopdocument
-----------------------------------------------------------------
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 / 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
___________________________________________________________________________________
next prev parent reply other threads:[~2017-06-25 11:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 8:22 Thomas Widmann
2017-06-20 9:41 ` Henri Menke
2017-06-20 9:53 ` Thomas Widmann
2017-06-20 19:33 ` Hans Hagen
2017-06-23 13:21 ` Thomas Widmann
2017-06-23 16:52 ` Thomas Widmann
2017-06-24 0:19 ` Henri Menke
2017-06-24 14:48 ` Thomas Widmann
2017-06-25 11:16 ` Hans Hagen [this message]
2017-06-26 9:31 ` Thomas Widmann
2017-06-28 9:16 ` Thomas Widmann
2017-06-28 11:04 ` Hans Hagen
2017-06-28 11:20 ` Thomas Widmann
2017-06-28 11:57 ` Hans Hagen
2017-06-28 12:49 ` Thomas Widmann
2017-07-03 15:50 ` Thomas Widmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545bb90c-abd6-cf4a-07cf-7db8450db085@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).