Thank you, Tomáš! 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 ... Massi Il 22/10/24 15:33, Tomáš Hála ha scritto:
Hi Massi,
I do not know if there is the completely automated solution but I guess that the following code might help you, the #3 way with \definetextmodediscretionary seems the best to me.
Tomáš
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % APOSTROPHE, HYPHENATED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For number 3 you need: \definetextmodediscretionary l' {\discretionary{-}{l'}{l'}} %\definetextmodediscretionary l’ {\discretionary{-}{l’}{l’}}
\def\mycmd{\par\thinrule \par 1.~\discretionary{nel-}{l'opera}{nell'opera} \par 2.~nel\discretionary{-}{l'}{l'}opera \par 3.~nel|l'|opera }
\starttext \hsize10cc \par \mycmd \hsize1dd \par \mycmd \stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % FULL WORDS, NO HYPHENATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For number 3 you need: \definetextmodediscretionary ' {\discretionary{a}{}{'}} %\definetextmodediscretionary ’ {\discretionary{a}{}{’}}
\def\mycmd{\par\thinrule \par 1.~\discretionary{nella}{opera}{nell'opera} \par 2.~nell\discretionary{a}{}{'}opera \par 3.~nell|'|opera }
\starttext \hsize10cc \par \mycmd \hsize1dd \par \mycmd \stoptext
On Tue, Oct 22, 2024 at 01:59:10PM +0200, mf wrote:
Hello list, ...