[XeTeX] atopwithdelims

David Carlisle d.p.carlisle at gmail.com
Fri Oct 28 12:53:35 CEST 2016


I've been looking to see if I can make \atopwithdelims and related
commands a little more consistent between the tex engines
(specifically in relation to the amsmath \genfrac usage)

Short version: would it be possible to make \atopwithdelims scale
\Udelimiter specified delimiters to a size determined by font
parameters 20 and 21?

Long version:

The attached test file xetexatop.tex shows (I think) that xetex obeys
fontdimens 20 and 21 to size the delimiters used with "withdelims" but
only if the supplied delimiters have \delcode settings and tfm metrics
specifying two slots. If the delimiters have \Udelcode settings just
specifying a single slot in the OTF file
then (I think) they are just set natural size.

(I set the delcode and Udelcode to strange values in the test so ()
typeset as {} just to check the values were being picked up)

You can compare the xetex result against pdftex or against

xetex \\let\\Ucharcat\\undefined\\input xetexatop

which makes it take the "classic tex" branch.

The OpenType Math table doesn't have entries corresponding to 20/21
but these values could be set from the tex side while loading the font
so it would still be useful if xetex supported this use (luatex has
two additional named parameters for the same issue
FractionDelimiterDisplayStyleSize and FractionDelimiterSize)

For the specific use in latex where the use (should) always use an argument form
\binom{a}{b} not {a \choose b}  it is I think possible to define
things using \left\right
and get a compatible definition see the attached
genfrac-vialeftright.tex but the definition is a bit of a mess using
\mathchoice and magic numbers (2.39, 1.35 etc) designed to make the
scaling for computer modern be exactly the same whether this
definition or the primitive \atopwithdelims is used.

For the primitive syntax used as an infix operator it is much harder
to make a working definition just from tex macro redefinitions. hence
the question if the underlying engine could help here...

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetexatop.tex
Type: application/x-tex
Size: 959 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20161028/f6a43d3c/attachment.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: genfrac-vialeftright.tex
Type: application/x-tex
Size: 1930 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20161028/f6a43d3c/attachment-0001.tex>


More information about the XeTeX mailing list