ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Joel via ntg-context <ntg-context@ntg.nl>
Subject: [NTG-context] Re: How to disable hyphenation at the end of a line?
Date: Mon, 20 May 2024 09:37:31 +0200	[thread overview]
Message-ID: <96564e9a-0637-23ea-39d8-96f27c30409d@gmail.com> (raw)
In-Reply-To: <355610415.658426.1716168615345@mail.yahoo.com>

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
___________________________________________________________________________________

      parent reply	other threads:[~2024-05-20  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <355610415.658426.1716168615345.ref@mail.yahoo.com>
2024-05-20  1:30 ` [NTG-context] " Joel via ntg-context
2024-05-20  5:45   ` [NTG-context] " Mikael Sundqvist
2024-05-20  7:37   ` Wolfgang Schuster [this message]

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=96564e9a-0637-23ea-39d8-96f27c30409d@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --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).