[luatex] How to get a \mid binary relation that grows in LuaTeX

Hans Hagen pragma at wxs.nl
Wed Nov 15 15:16:45 CET 2017


On 11/14/2017 1:43 PM, Malte Dehling wrote:
> 
> Hi everyone,
> 
> I posted a question on tex.SE with the subject as title.  In short,
> there is a difference in how pdflatex and lualatex handle the expression
> $\left(a\mathrel{}\middle|\mathrel{}b\right)$.  Using pdflatex one gets
> symmetric spacing around the vertical bar while lualatex produces more
> space on the right.  See here for the question and an explanation in the
> answer:
> 
> https://tex.stackexchange.com/questions/401234/how-to-get-a-mid-binary-relation-that-grows-in-luatex
> 
> Is this a bug or intentional behavior?
A mixture.

(1) middle behaves like a mixture of open and close and this was swapped 
so that's a bug

(2) but ... luatex provides control over the spacing and as you inject a 
rel noad you get twice the spacing but you can tweak that with

     \Umathopenrelspacing \textstyle0mu
     \Umathcloserelspacing\textstyle0mu

(3) the good news is that you can do this:

     \left( a \Umiddle class 5 | b \right)

Hans


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


More information about the luatex mailing list