ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: italian words with apostrophe - hyphenation and discretionary
Date: Tue, 22 Oct 2024 17:36:54 +0200	[thread overview]
Message-ID: <02d83ce4-5879-4f1e-be76-b6c4098f9dbe@xs4all.nl> (raw)
In-Reply-To: <e4c527df-c302-4a94-a763-ee98f4d71342@fastwebnet.it>

Hi Tomáš and Massi,

> I chose this one:
> 
> nell\discretionary{a}{}{'}opera
> 
> It's not a general solution, but it's a local, elegant fix.
> 
> In my case I had "dell’Informazione", hyphenated as "del-l’Informazione".
> That hyphenation is fine in general, but here it happens at the end of 
> an odd page, so that you must turn the page to see what comes after "del-".
> 
> Now the page ends with "della", and the next one starts with 
> "Informazione". Which is typographically better.
> 
> If the text preceding those words changes, they may end in the middle of 
> a line, but as "dell’Informazione" instead of "della Informazione".
> 
> Moreover, I found a way to make it work with my XML workflow.
> It's actually something like this:
> 
> ... dell<ctx>\discretionary{a}{}{</ctx>’<ctx>}</ctx>Informazione ...
> 
> Think of the <ctx> tag as a way to inject ConTeXt code that is not part 
> of the contents of the document, but it's important for a particular 
> typesetting layout.
> 
> Once you expunge the <ctx> tags, you get back the pure, intact content:
> 
> ... dell’Informazione ...

There's a fourh way ...

\starttext

\startexceptions
     nell{a}{}{a'}opera
\stopexceptions

\start \hsize 10cm nella'opera \par \stop
\start \hsize 01mm nella'opera \par \stop

\start \hsize 10cm nell\discretionary{a}{}{'}opera \par \stop
\start \hsize 01mm nell\discretionary{a}{}{'}opera \par \stop

\stoptext



-----------------------------------------------------------------
                                           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	other threads:[~2024-10-22 15:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 11:59 [NTG-context] " mf
2024-10-22 13:33 ` [NTG-context] " Tomáš Hála
2024-10-22 14:06   ` mf
2024-10-22 15:36     ` Hans Hagen [this message]
2024-10-22 16:32       ` Tomáš Hála
2024-10-22 17:22         ` Tomáš Hála
2024-10-22 19:22           ` Hans Hagen via ntg-context
2024-10-22 23:46             ` mf

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=02d83ce4-5879-4f1e-be76-b6c4098f9dbe@xs4all.nl \
    --to=j.hagen@xs4all.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).