ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] How to disable hyphenation at the end of a line?
       [not found] <355610415.658426.1716168615345.ref@mail.yahoo.com>
@ 2024-05-20  1:30 ` Joel via ntg-context
  2024-05-20  5:45   ` [NTG-context] " Mikael Sundqvist
  2024-05-20  7:37   ` Wolfgang Schuster
  0 siblings, 2 replies; 3+ messages in thread
From: Joel via ntg-context @ 2024-05-20  1:30 UTC (permalink / raw)
  To: Mailing List for ConTeXt Users; +Cc: Joel


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

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

[-- Attachment #1.2: Type: text/html, Size: 759 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] 3+ messages in thread

* [NTG-context] Re: How to disable hyphenation at the end of a line?
  2024-05-20  1:30 ` [NTG-context] How to disable hyphenation at the end of a line? Joel via ntg-context
@ 2024-05-20  5:45   ` Mikael Sundqvist
  2024-05-20  7:37   ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Mikael Sundqvist @ 2024-05-20  5:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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 <ntg-context@ntg.nl> wrote:
>
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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] 3+ messages in thread

* [NTG-context] Re: How to disable hyphenation at the end of a line?
  2024-05-20  1:30 ` [NTG-context] How to disable hyphenation at the end of a line? Joel via ntg-context
  2024-05-20  5:45   ` [NTG-context] " Mikael Sundqvist
@ 2024-05-20  7:37   ` Wolfgang Schuster
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2024-05-20  7:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Joel via ntg-context

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
___________________________________________________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2024-05-20  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <355610415.658426.1716168615345.ref@mail.yahoo.com>
2024-05-20  1:30 ` [NTG-context] How to disable hyphenation at the end of a line? Joel via ntg-context
2024-05-20  5:45   ` [NTG-context] " Mikael Sundqvist
2024-05-20  7:37   ` Wolfgang Schuster

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