[NTG-context] \right| spacing issue

Hans Hagen pragma at wxs.nl
Mon May 9 22:31:18 CEST 2016

On 5/9/2016 7:47 PM, Weber, Matthias wrote:
> Dear All,
> the right hand side moves the Y into the |.
> This used to look ok in older versions of mkiv & mkii.
> \starttext
> \startformula
>  |X\times Y|= \left| X\times Y\right|
> \stopformula
> \stoptext

This is a side effect of extreme italics in latin modern. These are 
modelled after traditional tex fonts and in traditional tex mode italics 
are always added and sometimes compensated when not needed, while in 
opentype math those corrections are only added in character sequences 
(sort of) and not in constructs (which left/right are).

Fixing thei s lm wil make other fonts behave bad so we have a chicken 
egg problem there. Best is to patch lm fonts to behave more like other 
fonts (i might provide that as pseudo feature).



     |X\times Y| = \left| X\times Y \right| = \left( X\times Y \right) = 
\left( {X\over Y} \right)
     |x\times y| = \left| x\times y \right| = \left( x\times y \right) = 
\left( {x\over y} \right)

\switchtobodyfont[cambria] \getbuffer
\switchtobodyfont[pagella] \getbuffer


the lm italic correction for Y is some 40% vs 5% for cambria.

(one can argue that for normal size fences italic correction can be 
added but for that we need proof from the specification (ok, we can make 
that an option in the engine if really needed)


                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl

More information about the ntg-context mailing list