Dear list, when writing compound words I want the second part to be eligible for hyphenation to avoid bad breaks. Therefore, instead of »non-trivial« I write »non|-|trivial«. However, I noticed that when I make dash compound aware it is no longer kerned into the margin. MWE is below. How can I fix this? Cheers, Henri --- \showframe \setuppapersize[A6][A6] \definefontfeature [default][default] [protrusion=quality] \setupalign[hanging] \starttext % this is margin kerned Hyphenation is of compound words is non-trivial % this should be margin kerned but isn't Hyphenation is of compound words is non|-|trivial \stoptext
Dear list, I have constructed a better example (and eliminated a grammar error), see below. I think what »|-|« does is essentially »-\penalty\zerocount\hskip\zeropoint«. When I insert this as is the margin kerning is correct. Still, I have no idea how to fix |-|. Cheers, Henri --- \showframe \setuppapersize[A6][A6] \definefontfeature [default][default] [protrusion=quality] \setupalign[hanging] \starttext % this is margin kerned Hyphenation of compound words is non-trivial % this should be margin kerned but isn't Hyphenation of compound words is non|-|trivial % this does the same as |-| (?) and kerns properly Hyphenation of compound words is non-\penalty\zerocount\hskip\zeropoint\relax trivial \stoptext On 09/08/2016 10:52 AM, Henri Menke wrote:
Dear list,
when writing compound words I want the second part to be eligible for hyphenation to avoid bad breaks. Therefore, instead of »non-trivial« I write »non|-|trivial«. However, I noticed that when I make dash compound aware it is no longer kerned into the margin. MWE is below. How can I fix this?
Cheers, Henri
---
\showframe \setuppapersize[A6][A6] \definefontfeature [default][default] [protrusion=quality]
\setupalign[hanging] \starttext % this is margin kerned Hyphenation is of compound words is non-trivial
% this should be margin kerned but isn't Hyphenation is of compound words is non|-|trivial \stoptext
On 08.09.2016 11:08, Henri Menke wrote:
I have constructed a better example (and eliminated a grammar error), see below. I think what »|-|« does is essentially »-\penalty\zerocount\hskip\zeropoint«. When I insert this as is the margin kerning is correct. Still, I have no idea how to fix |-|.
Just add \setbreakpoints[compound] to the preamble of your documents, and you get both hyphenation and margin kerning, no need for |-|. Thomas
On 09/08/2016 12:12 PM, Thomas A. Schmitz wrote:
On 08.09.2016 11:08, Henri Menke wrote:
I have constructed a better example (and eliminated a grammar error), see below. I think what »|-|« does is essentially »-\penalty\zerocount\hskip\zeropoint«. When I insert this as is the margin kerning is correct. Still, I have no idea how to fix |-|.
Just add
\setbreakpoints[compound]
Oh yeah, right! Sorry for wasting your time :/ However, as I only want compounds with a hyphen to be breakable (for now) I came up with my own configuration. \definebreakpoints[hyphen] \definebreakpoint [hyphen] [-] [nleft=3,nright=3,type=6,range=yes] \setbreakpoints[hyphen]
to the preamble of your documents, and you get both hyphenation and margin kerning, no need for |-|.
Thomas ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (2)
-
Henri Menke
-
Thomas A. Schmitz