XeTeX + unicode-math: Which fontdimen’s are used for overline?












2















Background



In actuarial notation, one often writes something like



A ___   __
x:y : n|


Luckily, the actuarialangle package provides the command angl{<duration>} to typeset the “angle” notation. This command is designed in such a way that the vertical space between the angle roof and the duration matches that of overline when used in first-level subscript.



% !TeX program = XeLaTeX or LuaLaTeX
documentclass{article}
%usepackage{newpxtext}
%usepackage{newpxmath}
%usepackage{newtxtext}
%usepackage{newtxmath}
usepackage{actuarialangle}
newcommand*test{%
& $displaystyle overline{30},angl{30}$
& $textstyle overline{30},angl{30}$
& $scriptstyle overline{30},angl{30}$
& $scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
$mathrm{Computer Modern}$ test \
$mathrm{newpxmath}$ test \
$mathrm{newtxmath}$ test \
end{tabular}
end{document}


background





Problem with XeTeX + unicode-math



With OpenType math fonts via unicode-math, I was aware of the fact that some legacy fontdimen’s, e.g., fontdimen8scriptfont3 (used by angl), were inappropriate. See Problem with substack and substack doesn’t work properly.



My attempt of re-implementing angl is thus to replace 3fontdimen8scriptfont3 with fontdimen53 (overbar_vgap) and to replace the fixed rule thickness of 0.4pt with fontdimen54 (overbar_rule). Edit: This turns out well with LuaLaTeX (thanks @DavidCarlisle!).



% !TeX program = LuaLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { __um_overbar_vgap:N #1 } % <- seems right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


lualatex



XeLaTeX, however, seems to use the wrong font dimensions; more specifically, fontdimen53 (overbar_vgap) does not work. So I tried to use 3 times fontdimen54 (overbar_rule) for the vertical space, and it worked for all fonts but Fira Math.



% !TeX program = XeLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { 3 __um_overbar_rule:N #1 } % <- not quite right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


xelatex



Disclaimer: I have used private macros __um_..., which is considered as bad practice. Please try not to copy and paste the above “fix” unless you know what you are doing.





Questions



Which are the correct fontdimen’s, and how can I use them?



Note that there are no problems with the combinations




  • XeLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + unicode-math + __um_overbar_vgap:N #1.


The problem arises with




  • XeLaTeX + unicode-math + 3 __um_overbar_rule:N #1 + Fira Math.


IMHO, this appears to be the long standing problem with XeTeX using the wrong font dimensions.










share|improve this question

























  • luatex and xetex are different here (xetex uses (new) numbered params and luatex has named font params) which are you using? (xetex, I guess)

    – David Carlisle
    Jan 4 at 11:41













  • @DavidCarlisle Yes, I am using XeTeX. I took another wild guess: With LuaTeX, __um_overbar_vgap:N #1 yields the correct amount of vertical space across all fonts in my example. However, with XeTeX, it appears that the vertical space should be 3 __um_overbar_rule:N #1, which works for all fonts but Fira Math. This appears to be the long standing problem with XeTeX using the wrong font dimensions…

    – Ruixi Zhang
    Jan 4 at 13:09
















2















Background



In actuarial notation, one often writes something like



A ___   __
x:y : n|


Luckily, the actuarialangle package provides the command angl{<duration>} to typeset the “angle” notation. This command is designed in such a way that the vertical space between the angle roof and the duration matches that of overline when used in first-level subscript.



% !TeX program = XeLaTeX or LuaLaTeX
documentclass{article}
%usepackage{newpxtext}
%usepackage{newpxmath}
%usepackage{newtxtext}
%usepackage{newtxmath}
usepackage{actuarialangle}
newcommand*test{%
& $displaystyle overline{30},angl{30}$
& $textstyle overline{30},angl{30}$
& $scriptstyle overline{30},angl{30}$
& $scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
$mathrm{Computer Modern}$ test \
$mathrm{newpxmath}$ test \
$mathrm{newtxmath}$ test \
end{tabular}
end{document}


background





Problem with XeTeX + unicode-math



With OpenType math fonts via unicode-math, I was aware of the fact that some legacy fontdimen’s, e.g., fontdimen8scriptfont3 (used by angl), were inappropriate. See Problem with substack and substack doesn’t work properly.



My attempt of re-implementing angl is thus to replace 3fontdimen8scriptfont3 with fontdimen53 (overbar_vgap) and to replace the fixed rule thickness of 0.4pt with fontdimen54 (overbar_rule). Edit: This turns out well with LuaLaTeX (thanks @DavidCarlisle!).



% !TeX program = LuaLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { __um_overbar_vgap:N #1 } % <- seems right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


lualatex



XeLaTeX, however, seems to use the wrong font dimensions; more specifically, fontdimen53 (overbar_vgap) does not work. So I tried to use 3 times fontdimen54 (overbar_rule) for the vertical space, and it worked for all fonts but Fira Math.



% !TeX program = XeLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { 3 __um_overbar_rule:N #1 } % <- not quite right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


xelatex



Disclaimer: I have used private macros __um_..., which is considered as bad practice. Please try not to copy and paste the above “fix” unless you know what you are doing.





Questions



Which are the correct fontdimen’s, and how can I use them?



Note that there are no problems with the combinations




  • XeLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + unicode-math + __um_overbar_vgap:N #1.


The problem arises with




  • XeLaTeX + unicode-math + 3 __um_overbar_rule:N #1 + Fira Math.


IMHO, this appears to be the long standing problem with XeTeX using the wrong font dimensions.










share|improve this question

























  • luatex and xetex are different here (xetex uses (new) numbered params and luatex has named font params) which are you using? (xetex, I guess)

    – David Carlisle
    Jan 4 at 11:41













  • @DavidCarlisle Yes, I am using XeTeX. I took another wild guess: With LuaTeX, __um_overbar_vgap:N #1 yields the correct amount of vertical space across all fonts in my example. However, with XeTeX, it appears that the vertical space should be 3 __um_overbar_rule:N #1, which works for all fonts but Fira Math. This appears to be the long standing problem with XeTeX using the wrong font dimensions…

    – Ruixi Zhang
    Jan 4 at 13:09














2












2








2


1






Background



In actuarial notation, one often writes something like



A ___   __
x:y : n|


Luckily, the actuarialangle package provides the command angl{<duration>} to typeset the “angle” notation. This command is designed in such a way that the vertical space between the angle roof and the duration matches that of overline when used in first-level subscript.



% !TeX program = XeLaTeX or LuaLaTeX
documentclass{article}
%usepackage{newpxtext}
%usepackage{newpxmath}
%usepackage{newtxtext}
%usepackage{newtxmath}
usepackage{actuarialangle}
newcommand*test{%
& $displaystyle overline{30},angl{30}$
& $textstyle overline{30},angl{30}$
& $scriptstyle overline{30},angl{30}$
& $scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
$mathrm{Computer Modern}$ test \
$mathrm{newpxmath}$ test \
$mathrm{newtxmath}$ test \
end{tabular}
end{document}


background





Problem with XeTeX + unicode-math



With OpenType math fonts via unicode-math, I was aware of the fact that some legacy fontdimen’s, e.g., fontdimen8scriptfont3 (used by angl), were inappropriate. See Problem with substack and substack doesn’t work properly.



My attempt of re-implementing angl is thus to replace 3fontdimen8scriptfont3 with fontdimen53 (overbar_vgap) and to replace the fixed rule thickness of 0.4pt with fontdimen54 (overbar_rule). Edit: This turns out well with LuaLaTeX (thanks @DavidCarlisle!).



% !TeX program = LuaLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { __um_overbar_vgap:N #1 } % <- seems right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


lualatex



XeLaTeX, however, seems to use the wrong font dimensions; more specifically, fontdimen53 (overbar_vgap) does not work. So I tried to use 3 times fontdimen54 (overbar_rule) for the vertical space, and it worked for all fonts but Fira Math.



% !TeX program = XeLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { 3 __um_overbar_rule:N #1 } % <- not quite right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


xelatex



Disclaimer: I have used private macros __um_..., which is considered as bad practice. Please try not to copy and paste the above “fix” unless you know what you are doing.





Questions



Which are the correct fontdimen’s, and how can I use them?



Note that there are no problems with the combinations




  • XeLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + unicode-math + __um_overbar_vgap:N #1.


The problem arises with




  • XeLaTeX + unicode-math + 3 __um_overbar_rule:N #1 + Fira Math.


IMHO, this appears to be the long standing problem with XeTeX using the wrong font dimensions.










share|improve this question
















Background



In actuarial notation, one often writes something like



A ___   __
x:y : n|


Luckily, the actuarialangle package provides the command angl{<duration>} to typeset the “angle” notation. This command is designed in such a way that the vertical space between the angle roof and the duration matches that of overline when used in first-level subscript.



% !TeX program = XeLaTeX or LuaLaTeX
documentclass{article}
%usepackage{newpxtext}
%usepackage{newpxmath}
%usepackage{newtxtext}
%usepackage{newtxmath}
usepackage{actuarialangle}
newcommand*test{%
& $displaystyle overline{30},angl{30}$
& $textstyle overline{30},angl{30}$
& $scriptstyle overline{30},angl{30}$
& $scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
$mathrm{Computer Modern}$ test \
$mathrm{newpxmath}$ test \
$mathrm{newtxmath}$ test \
end{tabular}
end{document}


background





Problem with XeTeX + unicode-math



With OpenType math fonts via unicode-math, I was aware of the fact that some legacy fontdimen’s, e.g., fontdimen8scriptfont3 (used by angl), were inappropriate. See Problem with substack and substack doesn’t work properly.



My attempt of re-implementing angl is thus to replace 3fontdimen8scriptfont3 with fontdimen53 (overbar_vgap) and to replace the fixed rule thickness of 0.4pt with fontdimen54 (overbar_rule). Edit: This turns out well with LuaLaTeX (thanks @DavidCarlisle!).



% !TeX program = LuaLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { __um_overbar_vgap:N #1 } % <- seems right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


lualatex



XeLaTeX, however, seems to use the wrong font dimensions; more specifically, fontdimen53 (overbar_vgap) does not work. So I tried to use 3 times fontdimen54 (overbar_rule) for the vertical space, and it worked for all fonts but Fira Math.



% !TeX program = XeLaTeX
documentclass{article}
usepackage{unicode-math}
setmathfont{Latin Modern Math}[version=LM]
setmathfont{TeX Gyre Bonum Math}[version=Bonum]
setmathfont{TeX Gyre Pagella Math}[version=Pagella]
setmathfont{TeX Gyre Schola Math}[version=Schola]
setmathfont{TeX Gyre Termes Math}[version=Termes]
setmathfont{Fira Math}[version=Fira]
usepackage{actuarialangle}
makeatletter
ExplSyntaxOn
% Re-implementing the ``correct'' font dimensions
defacta@angle#1#2{%
mathord{%
mkern1mu%
vbox{hrule height __um_overbar_rule:N #1 hbox{ % <- seems right
vbox{%
kern dim_eval:n { 3 __um_overbar_rule:N #1 } % <- not quite right
hbox{$m@th#1#2$}}%
setboxz@hbox{$#1mathstrut$}%
vrule width __um_overbar_rule:N #1 depthdpz@}}% <- seems right
mkern1mu}}
ExplSyntaxOff
makeatother
newcommand*test[2]{% #1: font name, #2 mathversion
mathversion{#2}$mathup{#1}$
& mathversion{#2}$displaystyle overline{30},angl{30}$
& mathversion{#2}$textstyle overline{30},angl{30}$
& mathversion{#2}$scriptstyle overline{30},angl{30}$
& mathversion{#2}$scriptscriptstyleoverline{30},angl{30}$%
}
begin{document}
begin{tabular}{l l l l l}
test{Latin Modern Math}{LM} \
test{TG Bonum Math}{Bonum} \
test{TG Pagella Math}{Pagella} \
test{TG Schola Math}{Schola} \
test{TG Termes Math}{Termes} \
test{Fira Math}{Fira} \
end{tabular}
end{document}


xelatex



Disclaimer: I have used private macros __um_..., which is considered as bad practice. Please try not to copy and paste the above “fix” unless you know what you are doing.





Questions



Which are the correct fontdimen’s, and how can I use them?



Note that there are no problems with the combinations




  • XeLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + legacy math fonts (Type 1), first-level subscript matched.

  • LuaLaTeX + unicode-math + __um_overbar_vgap:N #1.


The problem arises with




  • XeLaTeX + unicode-math + 3 __um_overbar_rule:N #1 + Fira Math.


IMHO, this appears to be the long standing problem with XeTeX using the wrong font dimensions.







fonts unicode-math opentype






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 14:44







Ruixi Zhang

















asked Jan 4 at 2:05









Ruixi ZhangRuixi Zhang

5,183321




5,183321













  • luatex and xetex are different here (xetex uses (new) numbered params and luatex has named font params) which are you using? (xetex, I guess)

    – David Carlisle
    Jan 4 at 11:41













  • @DavidCarlisle Yes, I am using XeTeX. I took another wild guess: With LuaTeX, __um_overbar_vgap:N #1 yields the correct amount of vertical space across all fonts in my example. However, with XeTeX, it appears that the vertical space should be 3 __um_overbar_rule:N #1, which works for all fonts but Fira Math. This appears to be the long standing problem with XeTeX using the wrong font dimensions…

    – Ruixi Zhang
    Jan 4 at 13:09



















  • luatex and xetex are different here (xetex uses (new) numbered params and luatex has named font params) which are you using? (xetex, I guess)

    – David Carlisle
    Jan 4 at 11:41













  • @DavidCarlisle Yes, I am using XeTeX. I took another wild guess: With LuaTeX, __um_overbar_vgap:N #1 yields the correct amount of vertical space across all fonts in my example. However, with XeTeX, it appears that the vertical space should be 3 __um_overbar_rule:N #1, which works for all fonts but Fira Math. This appears to be the long standing problem with XeTeX using the wrong font dimensions…

    – Ruixi Zhang
    Jan 4 at 13:09

















luatex and xetex are different here (xetex uses (new) numbered params and luatex has named font params) which are you using? (xetex, I guess)

– David Carlisle
Jan 4 at 11:41







luatex and xetex are different here (xetex uses (new) numbered params and luatex has named font params) which are you using? (xetex, I guess)

– David Carlisle
Jan 4 at 11:41















@DavidCarlisle Yes, I am using XeTeX. I took another wild guess: With LuaTeX, __um_overbar_vgap:N #1 yields the correct amount of vertical space across all fonts in my example. However, with XeTeX, it appears that the vertical space should be 3 __um_overbar_rule:N #1, which works for all fonts but Fira Math. This appears to be the long standing problem with XeTeX using the wrong font dimensions…

– Ruixi Zhang
Jan 4 at 13:09





@DavidCarlisle Yes, I am using XeTeX. I took another wild guess: With LuaTeX, __um_overbar_vgap:N #1 yields the correct amount of vertical space across all fonts in my example. However, with XeTeX, it appears that the vertical space should be 3 __um_overbar_rule:N #1, which works for all fonts but Fira Math. This appears to be the long standing problem with XeTeX using the wrong font dimensions…

– Ruixi Zhang
Jan 4 at 13:09










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468496%2fxetex-unicode-math-which-fontdimen-s-are-used-for-overline%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468496%2fxetex-unicode-math-which-fontdimen-s-are-used-for-overline%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?