Menu

#87 vphantom, superscripts, and unicode-math

Future
open
nobody
None
5
2023-03-15
2014-01-27
Zhen Lin
No

Vertical alignment of superscripts using \vphantom doesn't seem to quite work in unicode-math + XeTeX; see attached file for test case. There is no problem when using XeTeX without unicode-math, and there is no problem when using LuaTeX.

This appears to be a regression: things work as expected in TeX Live 2011 (XeTeX 0.9997.5) but not in TeX Live 2012 (XeTeX 0.9998) or TeX Live 2013 (XeTeX 0.9999.3).

1 Attachments

Discussion

  • Anonymous

    Anonymous - 2016-02-26

    I'll give another, even shorter example. The following code goes wrong with XeLaTeX but not with LuaLaTeX: the vertical position of the second 'a' is too low. (If you replace unicode-math by amsmath or remove \usepackage{unicode-math} altogether, everything goes right: both occurrences of 'a' have the same vertical position.)

    \documentclass{article}
    \usepackage{unicode-math}
    \begin{document}
    \(|^a\) \(\vphantom{|}^a\)
    \end\document}
    

     

    Last edit: Anonymous 2016-02-27
  • U_Fischer

    U_Fischer - 2018-06-02

    Work fine for me in texlive 2018 and a current miktex: both a are at the same vertical position.

     
  • Henri Menke

    Henri Menke - 2019-01-03

    It's still there in TeX Live 2018, even though it's very subtle.

    \documentclass{article}
    \usepackage{unicode-math}
    \begin{document}
    
    $\vphantom{\textstyle q}_t q_t$%
    \llap{\vrule height 0pt depth .1pt width 15pt}
    
    $\vphantom{q}_t q_t$%
    \llap{\vrule height 0pt depth .1pt width 15pt}
    
    \end{document}
    

    bug

     

    Last edit: Henri Menke 2019-01-03
  • Anonymous

    Anonymous - 2019-02-07

    The original file test.tex no more compiles ("greek-shape=unicode" is no more recognized). The bug reported on 2016-02-26 by Anonymous is gone. The bug reported on 2019-01-03 by Henri is still there.

     
    👍
    1
  • Henri Menke

    Henri Menke - 2019-07-03

    Still broken.

    $ xelatex --version
    XeTeX 3.14159265-2.6-0.999991 (TeX Live 2019)
    

     

    Last edit: Henri Menke 2019-07-03
  • Just A. Man

    Just A. Man - 2020-07-13

    I confirm that the original example no longer compiles, and that the bug reported on 2016-02-26 is gone. There is a typo there; the proper source code of the example should have been

    \documentclass{article}\pagestyle{empty}
    \usepackage{unicode-math}
    \begin{document}
    \(|^a\) \(\vphantom{|}^a\)
    \end{document}
    

    The ouput is attached.

     

    Last edit: Just A. Man 2020-07-24
  • Just A. Man

    Just A. Man - 2020-07-13

    As for the bug reported by Henri, the output is still as he stated using XeTeX 3.14159265-2.6-0.999991 (TeX Live 2019/Debian).

     
  • Just A. Man

    Just A. Man - 2023-03-15

    Henri's bug is still there with XeTeX, Version 3.141592653-2.6-0.999994 (TeX Live 2022/Debian) (preloaded format=xelatex 2023.2.17).

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB