How to disable hyphenation at the end of a line?
I'm using mostly default ConTeXt settings, but an editor has warned I should avoid using hyphenation at the end of lines--at least for my particular audience. I've found manual text that says how to disable specific words from being hyphenated. Is there a whole-document switch to disable it? --Joel
Hi,
since it has to do with paragraph building and not with certain breaks
it is controlled by a demerits rather than a penalty, and there is, as
far as I know, no value that explicitly prohibits a hyphen at the last
line specifically (you can set the hyphenpenalty to 10000 to avoid
hyphenations everywhere). In the total demerits calculation penalties
are more or less squared, so setting
\finalhyphendemerits
to a ridiculously high value might do, for most paragraphs.
/Mikael
On Mon, May 20, 2024 at 3:33 AM Joel via ntg-context
I'm using mostly default ConTeXt settings, but an editor has warned I should avoid using hyphenation at the end of lines--at least for my particular audience.
I've found manual text that says how to disable specific words from being hyphenated.
Is there a whole-document switch to disable it?
--Joel ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Joel via ntg-context schrieb am 20.05.2024 um 03:30:
I'm using mostly default ConTeXt settings, but an editor has warned I should avoid using hyphenation at the end of lines--at least for my particular audience.
I've found manual text that says how to disable specific words from being hyphenated.
Is there a whole-document switch to disable it?
You can disable hyphenation with \setupalign[nothyphenated] but this setting alone isn't enough because now text tends to stick into the right margin. To get better result you have to combine it with other option like "tolerant" or "verytolerant". The example below show also how you can use font enpansion in combination with a lesser tolerance value to align the text on both margins with result in smaller interword spacer than a larger tolerance value. You can combine this with font protrusion to move punctuation marks slightly into the margin area to have a better alignment of the text alone. %%%% begin example \setupwhitespace[big] \showframe[text][text] \definefontfeature[default][default][expansion=quality,protrusion=quality] \starttext \type{alignment: default} \samplefile{lorem} \page \type{alignment: nothyphenated} \start \setupalign[nothyphenated] \samplefile{lorem} \stop \page \type{alignment: nothyphenated,flushleft} \start \setupalign[nothyphenated,flushleft] \samplefile{lorem} \stop \page \type{alignment: nothyphenated,verytolerant} \start \setupalign[nothyphenated,verytolerant] \samplefile{lorem} \stop \page \type{alignment: nothyphenated,tolerant,hz} \start \setupalign[nothyphenated,tolerant,hz] \samplefile{lorem} \stop \page \type{alignment: nothyphenated,verytolerant,hanging} \start \setupalign[nothyphenated,verytolerant,hanging] \samplefile{lorem} \stop \page \type{alignment: nothyphenated,tolerant,hz,hanging} \start \setupalign[nothyphenated,tolerant,hz,hanging] \samplefile{lorem} \stop \stoptext %%%% end example Wolfgang
participants (3)
-
Joel
-
Mikael Sundqvist
-
Wolfgang Schuster