ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Margin kerning for compounds
@ 2016-09-08  8:52 Henri Menke
  2016-09-08  9:08 ` Henri Menke
  0 siblings, 1 reply; 4+ messages in thread
From: Henri Menke @ 2016-09-08  8:52 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Margin kerning for compounds
  2016-09-08  8:52 Margin kerning for compounds Henri Menke
@ 2016-09-08  9:08 ` Henri Menke
  2016-09-08 10:12   ` Thomas A. Schmitz
  0 siblings, 1 reply; 4+ messages in thread
From: Henri Menke @ 2016-09-08  9:08 UTC (permalink / raw)
  To: ntg-context

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
> 

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Margin kerning for compounds
  2016-09-08  9:08 ` Henri Menke
@ 2016-09-08 10:12   ` Thomas A. Schmitz
  2016-09-08 13:20     ` Henri Menke
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas A. Schmitz @ 2016-09-08 10:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Margin kerning for compounds
  2016-09-08 10:12   ` Thomas A. Schmitz
@ 2016-09-08 13:20     ` Henri Menke
  0 siblings, 0 replies; 4+ messages in thread
From: Henri Menke @ 2016-09-08 13:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-08 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08  8:52 Margin kerning for compounds Henri Menke
2016-09-08  9:08 ` Henri Menke
2016-09-08 10:12   ` Thomas A. Schmitz
2016-09-08 13:20     ` Henri Menke

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