Math script size changed between unicode-math v0.8e and v0.8g?












4














I have just compiled an existing document using a more recent version of unicode-math and noticed that a lot of line/page breaks were different. The reason seems to be that the sizes of sub-/superscripts in math mode changed somewhere between unicode-math versions 0.8e and 0.8g.



For example, using the minimal document



documentclass[12pt]{article}

usepackage{unicode-math}

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


unicode-math 0.8e yields



unicode-math 0.8e output



while unicode-math 0.8g gives



unicode-math 0.8g output



My questions is whether this is intentional/expected? In the release notes for unicode-math 0.8g, I see





  • Better use of scriptstyle sizes in LuaTeX (I think a regression).




and indeed, as far as I can tell, only LuaTeX seems to be affected?










share|improve this question






















  • The chosen size for the superscripts used to be 8pt like in standard LaTeX, now it's 8.41483pt, for both XeLaTeX and LuaLaTeX.
    – egreg
    Jun 28 '18 at 8:09










  • @egreg Hm, interesting. Do you know if there is some kind of advantage to this new choice that’s worth it to make a breaking change?
    – Socob
    Jun 29 '18 at 8:46










  • I'm not sure the effect was actually wanted.
    – egreg
    Jun 29 '18 at 8:52






  • 1




    Opened issue at github.com/wspr/unicode-math/issues/478
    – egreg
    Jun 29 '18 at 10:22










  • @barbarabeeton The document uses 12pt
    – egreg
    Jun 29 '18 at 19:36
















4














I have just compiled an existing document using a more recent version of unicode-math and noticed that a lot of line/page breaks were different. The reason seems to be that the sizes of sub-/superscripts in math mode changed somewhere between unicode-math versions 0.8e and 0.8g.



For example, using the minimal document



documentclass[12pt]{article}

usepackage{unicode-math}

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


unicode-math 0.8e yields



unicode-math 0.8e output



while unicode-math 0.8g gives



unicode-math 0.8g output



My questions is whether this is intentional/expected? In the release notes for unicode-math 0.8g, I see





  • Better use of scriptstyle sizes in LuaTeX (I think a regression).




and indeed, as far as I can tell, only LuaTeX seems to be affected?










share|improve this question






















  • The chosen size for the superscripts used to be 8pt like in standard LaTeX, now it's 8.41483pt, for both XeLaTeX and LuaLaTeX.
    – egreg
    Jun 28 '18 at 8:09










  • @egreg Hm, interesting. Do you know if there is some kind of advantage to this new choice that’s worth it to make a breaking change?
    – Socob
    Jun 29 '18 at 8:46










  • I'm not sure the effect was actually wanted.
    – egreg
    Jun 29 '18 at 8:52






  • 1




    Opened issue at github.com/wspr/unicode-math/issues/478
    – egreg
    Jun 29 '18 at 10:22










  • @barbarabeeton The document uses 12pt
    – egreg
    Jun 29 '18 at 19:36














4












4








4







I have just compiled an existing document using a more recent version of unicode-math and noticed that a lot of line/page breaks were different. The reason seems to be that the sizes of sub-/superscripts in math mode changed somewhere between unicode-math versions 0.8e and 0.8g.



For example, using the minimal document



documentclass[12pt]{article}

usepackage{unicode-math}

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


unicode-math 0.8e yields



unicode-math 0.8e output



while unicode-math 0.8g gives



unicode-math 0.8g output



My questions is whether this is intentional/expected? In the release notes for unicode-math 0.8g, I see





  • Better use of scriptstyle sizes in LuaTeX (I think a regression).




and indeed, as far as I can tell, only LuaTeX seems to be affected?










share|improve this question













I have just compiled an existing document using a more recent version of unicode-math and noticed that a lot of line/page breaks were different. The reason seems to be that the sizes of sub-/superscripts in math mode changed somewhere between unicode-math versions 0.8e and 0.8g.



For example, using the minimal document



documentclass[12pt]{article}

usepackage{unicode-math}

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


unicode-math 0.8e yields



unicode-math 0.8e output



while unicode-math 0.8g gives



unicode-math 0.8g output



My questions is whether this is intentional/expected? In the release notes for unicode-math 0.8g, I see





  • Better use of scriptstyle sizes in LuaTeX (I think a regression).




and indeed, as far as I can tell, only LuaTeX seems to be affected?







luatex subscripts unicode-math superscripts






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 27 '18 at 23:54









Socob

708516




708516












  • The chosen size for the superscripts used to be 8pt like in standard LaTeX, now it's 8.41483pt, for both XeLaTeX and LuaLaTeX.
    – egreg
    Jun 28 '18 at 8:09










  • @egreg Hm, interesting. Do you know if there is some kind of advantage to this new choice that’s worth it to make a breaking change?
    – Socob
    Jun 29 '18 at 8:46










  • I'm not sure the effect was actually wanted.
    – egreg
    Jun 29 '18 at 8:52






  • 1




    Opened issue at github.com/wspr/unicode-math/issues/478
    – egreg
    Jun 29 '18 at 10:22










  • @barbarabeeton The document uses 12pt
    – egreg
    Jun 29 '18 at 19:36


















  • The chosen size for the superscripts used to be 8pt like in standard LaTeX, now it's 8.41483pt, for both XeLaTeX and LuaLaTeX.
    – egreg
    Jun 28 '18 at 8:09










  • @egreg Hm, interesting. Do you know if there is some kind of advantage to this new choice that’s worth it to make a breaking change?
    – Socob
    Jun 29 '18 at 8:46










  • I'm not sure the effect was actually wanted.
    – egreg
    Jun 29 '18 at 8:52






  • 1




    Opened issue at github.com/wspr/unicode-math/issues/478
    – egreg
    Jun 29 '18 at 10:22










  • @barbarabeeton The document uses 12pt
    – egreg
    Jun 29 '18 at 19:36
















The chosen size for the superscripts used to be 8pt like in standard LaTeX, now it's 8.41483pt, for both XeLaTeX and LuaLaTeX.
– egreg
Jun 28 '18 at 8:09




The chosen size for the superscripts used to be 8pt like in standard LaTeX, now it's 8.41483pt, for both XeLaTeX and LuaLaTeX.
– egreg
Jun 28 '18 at 8:09












@egreg Hm, interesting. Do you know if there is some kind of advantage to this new choice that’s worth it to make a breaking change?
– Socob
Jun 29 '18 at 8:46




@egreg Hm, interesting. Do you know if there is some kind of advantage to this new choice that’s worth it to make a breaking change?
– Socob
Jun 29 '18 at 8:46












I'm not sure the effect was actually wanted.
– egreg
Jun 29 '18 at 8:52




I'm not sure the effect was actually wanted.
– egreg
Jun 29 '18 at 8:52




1




1




Opened issue at github.com/wspr/unicode-math/issues/478
– egreg
Jun 29 '18 at 10:22




Opened issue at github.com/wspr/unicode-math/issues/478
– egreg
Jun 29 '18 at 10:22












@barbarabeeton The document uses 12pt
– egreg
Jun 29 '18 at 19:36




@barbarabeeton The document uses 12pt
– egreg
Jun 29 '18 at 19:36










1 Answer
1






active

oldest

votes


















3














Edited to provide more details



I managed to track down the related changes made in v0.8g. In particular, the follow code was introduced in um-code-main.dtx:



cs_new:Nn @@_declare_math_sizes:
{
dim_compare:nF { fontdimen 10 g_@@_trial_font == 0pt }
{
DeclareMathSizes { f@size } { f@size }
{ @@_fontdimen_to_scale:nN {10} g_@@_trial_font }
{ @@_fontdimen_to_scale:nN {11} g_@@_trial_font }
}
}


We see that the unicode-math package intentionally overwrites the declaration of math sizes at normalsize. This is because OpenType math fonts contain additional parameters ScriptPercentScaleDown (fontdimen10) and ScriptScriptPercentScaleDown (fontdimen11). For OpenType Latin Modern Math, these are 70 and 50, respectively.



Therefore, in a 12pt article, the intended font sizes (according to the new unicode-math) for first- and second-level scripts are 8.4pt and 6pt, respectively. Note that the LaTeX kernel legacy declarations are 8pt and 6pt for first- and second-level scripts in 12pt text. So, you would observe slightly larger first-level scripts using unicode-math.





There are more subtle differences in 12pt article between pdfLaTeX’s usepackage{lmodern} and XeLaTeX/LuaLaTeX’s usepackage{unicode-math} with OTF LM Math.



In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively.



But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses OTF LM Math 10pt font scaled up to 12pt, the script-size uses OTF LM Math 7pt font scaled up to 8.4pt, and the script-script-size uses OTF LM Math 5pt font scaled up to 6pt.





Addendum



The strange 8.41483pt for the first-level script is due to the improper order of floating-point arithmetic.



I have provided a fix for the rounding error (not for honoring the original math size declarations, as I believe we should use the OpenType parameters) in the issue opened by @egreg:



documentclass[12pt]{article}
usepackage{unicode-math}

ExplSyntaxOn
cs_set:Nn __um_fontdimen_to_percent:nN
{
fp_eval:n { dim_to_decimal:n { 65536 fontdimen #1 #2 } / 100 }
}
ExplSyntaxOff

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


Hopefully this will be implemented soon. This has made into the source code of unicode-math. So no more rounding errors, yeah!






share|improve this answer























  • Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
    – Socob
    Dec 12 '18 at 23:28










  • @Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
    – Ruixi Zhang
    Dec 13 '18 at 0:06












  • @Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
    – Ruixi Zhang
    Dec 13 '18 at 0:13










  • @Socob I edited my answer to better reflect your original question. :)
    – Ruixi Zhang
    Dec 13 '18 at 0:36













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%2f438296%2fmath-script-size-changed-between-unicode-math-v0-8e-and-v0-8g%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














Edited to provide more details



I managed to track down the related changes made in v0.8g. In particular, the follow code was introduced in um-code-main.dtx:



cs_new:Nn @@_declare_math_sizes:
{
dim_compare:nF { fontdimen 10 g_@@_trial_font == 0pt }
{
DeclareMathSizes { f@size } { f@size }
{ @@_fontdimen_to_scale:nN {10} g_@@_trial_font }
{ @@_fontdimen_to_scale:nN {11} g_@@_trial_font }
}
}


We see that the unicode-math package intentionally overwrites the declaration of math sizes at normalsize. This is because OpenType math fonts contain additional parameters ScriptPercentScaleDown (fontdimen10) and ScriptScriptPercentScaleDown (fontdimen11). For OpenType Latin Modern Math, these are 70 and 50, respectively.



Therefore, in a 12pt article, the intended font sizes (according to the new unicode-math) for first- and second-level scripts are 8.4pt and 6pt, respectively. Note that the LaTeX kernel legacy declarations are 8pt and 6pt for first- and second-level scripts in 12pt text. So, you would observe slightly larger first-level scripts using unicode-math.





There are more subtle differences in 12pt article between pdfLaTeX’s usepackage{lmodern} and XeLaTeX/LuaLaTeX’s usepackage{unicode-math} with OTF LM Math.



In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively.



But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses OTF LM Math 10pt font scaled up to 12pt, the script-size uses OTF LM Math 7pt font scaled up to 8.4pt, and the script-script-size uses OTF LM Math 5pt font scaled up to 6pt.





Addendum



The strange 8.41483pt for the first-level script is due to the improper order of floating-point arithmetic.



I have provided a fix for the rounding error (not for honoring the original math size declarations, as I believe we should use the OpenType parameters) in the issue opened by @egreg:



documentclass[12pt]{article}
usepackage{unicode-math}

ExplSyntaxOn
cs_set:Nn __um_fontdimen_to_percent:nN
{
fp_eval:n { dim_to_decimal:n { 65536 fontdimen #1 #2 } / 100 }
}
ExplSyntaxOff

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


Hopefully this will be implemented soon. This has made into the source code of unicode-math. So no more rounding errors, yeah!






share|improve this answer























  • Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
    – Socob
    Dec 12 '18 at 23:28










  • @Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
    – Ruixi Zhang
    Dec 13 '18 at 0:06












  • @Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
    – Ruixi Zhang
    Dec 13 '18 at 0:13










  • @Socob I edited my answer to better reflect your original question. :)
    – Ruixi Zhang
    Dec 13 '18 at 0:36


















3














Edited to provide more details



I managed to track down the related changes made in v0.8g. In particular, the follow code was introduced in um-code-main.dtx:



cs_new:Nn @@_declare_math_sizes:
{
dim_compare:nF { fontdimen 10 g_@@_trial_font == 0pt }
{
DeclareMathSizes { f@size } { f@size }
{ @@_fontdimen_to_scale:nN {10} g_@@_trial_font }
{ @@_fontdimen_to_scale:nN {11} g_@@_trial_font }
}
}


We see that the unicode-math package intentionally overwrites the declaration of math sizes at normalsize. This is because OpenType math fonts contain additional parameters ScriptPercentScaleDown (fontdimen10) and ScriptScriptPercentScaleDown (fontdimen11). For OpenType Latin Modern Math, these are 70 and 50, respectively.



Therefore, in a 12pt article, the intended font sizes (according to the new unicode-math) for first- and second-level scripts are 8.4pt and 6pt, respectively. Note that the LaTeX kernel legacy declarations are 8pt and 6pt for first- and second-level scripts in 12pt text. So, you would observe slightly larger first-level scripts using unicode-math.





There are more subtle differences in 12pt article between pdfLaTeX’s usepackage{lmodern} and XeLaTeX/LuaLaTeX’s usepackage{unicode-math} with OTF LM Math.



In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively.



But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses OTF LM Math 10pt font scaled up to 12pt, the script-size uses OTF LM Math 7pt font scaled up to 8.4pt, and the script-script-size uses OTF LM Math 5pt font scaled up to 6pt.





Addendum



The strange 8.41483pt for the first-level script is due to the improper order of floating-point arithmetic.



I have provided a fix for the rounding error (not for honoring the original math size declarations, as I believe we should use the OpenType parameters) in the issue opened by @egreg:



documentclass[12pt]{article}
usepackage{unicode-math}

ExplSyntaxOn
cs_set:Nn __um_fontdimen_to_percent:nN
{
fp_eval:n { dim_to_decimal:n { 65536 fontdimen #1 #2 } / 100 }
}
ExplSyntaxOff

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


Hopefully this will be implemented soon. This has made into the source code of unicode-math. So no more rounding errors, yeah!






share|improve this answer























  • Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
    – Socob
    Dec 12 '18 at 23:28










  • @Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
    – Ruixi Zhang
    Dec 13 '18 at 0:06












  • @Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
    – Ruixi Zhang
    Dec 13 '18 at 0:13










  • @Socob I edited my answer to better reflect your original question. :)
    – Ruixi Zhang
    Dec 13 '18 at 0:36
















3












3








3






Edited to provide more details



I managed to track down the related changes made in v0.8g. In particular, the follow code was introduced in um-code-main.dtx:



cs_new:Nn @@_declare_math_sizes:
{
dim_compare:nF { fontdimen 10 g_@@_trial_font == 0pt }
{
DeclareMathSizes { f@size } { f@size }
{ @@_fontdimen_to_scale:nN {10} g_@@_trial_font }
{ @@_fontdimen_to_scale:nN {11} g_@@_trial_font }
}
}


We see that the unicode-math package intentionally overwrites the declaration of math sizes at normalsize. This is because OpenType math fonts contain additional parameters ScriptPercentScaleDown (fontdimen10) and ScriptScriptPercentScaleDown (fontdimen11). For OpenType Latin Modern Math, these are 70 and 50, respectively.



Therefore, in a 12pt article, the intended font sizes (according to the new unicode-math) for first- and second-level scripts are 8.4pt and 6pt, respectively. Note that the LaTeX kernel legacy declarations are 8pt and 6pt for first- and second-level scripts in 12pt text. So, you would observe slightly larger first-level scripts using unicode-math.





There are more subtle differences in 12pt article between pdfLaTeX’s usepackage{lmodern} and XeLaTeX/LuaLaTeX’s usepackage{unicode-math} with OTF LM Math.



In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively.



But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses OTF LM Math 10pt font scaled up to 12pt, the script-size uses OTF LM Math 7pt font scaled up to 8.4pt, and the script-script-size uses OTF LM Math 5pt font scaled up to 6pt.





Addendum



The strange 8.41483pt for the first-level script is due to the improper order of floating-point arithmetic.



I have provided a fix for the rounding error (not for honoring the original math size declarations, as I believe we should use the OpenType parameters) in the issue opened by @egreg:



documentclass[12pt]{article}
usepackage{unicode-math}

ExplSyntaxOn
cs_set:Nn __um_fontdimen_to_percent:nN
{
fp_eval:n { dim_to_decimal:n { 65536 fontdimen #1 #2 } / 100 }
}
ExplSyntaxOff

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


Hopefully this will be implemented soon. This has made into the source code of unicode-math. So no more rounding errors, yeah!






share|improve this answer














Edited to provide more details



I managed to track down the related changes made in v0.8g. In particular, the follow code was introduced in um-code-main.dtx:



cs_new:Nn @@_declare_math_sizes:
{
dim_compare:nF { fontdimen 10 g_@@_trial_font == 0pt }
{
DeclareMathSizes { f@size } { f@size }
{ @@_fontdimen_to_scale:nN {10} g_@@_trial_font }
{ @@_fontdimen_to_scale:nN {11} g_@@_trial_font }
}
}


We see that the unicode-math package intentionally overwrites the declaration of math sizes at normalsize. This is because OpenType math fonts contain additional parameters ScriptPercentScaleDown (fontdimen10) and ScriptScriptPercentScaleDown (fontdimen11). For OpenType Latin Modern Math, these are 70 and 50, respectively.



Therefore, in a 12pt article, the intended font sizes (according to the new unicode-math) for first- and second-level scripts are 8.4pt and 6pt, respectively. Note that the LaTeX kernel legacy declarations are 8pt and 6pt for first- and second-level scripts in 12pt text. So, you would observe slightly larger first-level scripts using unicode-math.





There are more subtle differences in 12pt article between pdfLaTeX’s usepackage{lmodern} and XeLaTeX/LuaLaTeX’s usepackage{unicode-math} with OTF LM Math.



In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively.



But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses OTF LM Math 10pt font scaled up to 12pt, the script-size uses OTF LM Math 7pt font scaled up to 8.4pt, and the script-script-size uses OTF LM Math 5pt font scaled up to 6pt.





Addendum



The strange 8.41483pt for the first-level script is due to the improper order of floating-point arithmetic.



I have provided a fix for the rounding error (not for honoring the original math size declarations, as I believe we should use the OpenType parameters) in the issue opened by @egreg:



documentclass[12pt]{article}
usepackage{unicode-math}

ExplSyntaxOn
cs_set:Nn __um_fontdimen_to_percent:nN
{
fp_eval:n { dim_to_decimal:n { 65536 fontdimen #1 #2 } / 100 }
}
ExplSyntaxOff

begin{document}

begin{equation}
x^Ax^Bx^Cx^Dx^Ex^Fx^Gx^Hx^Ix^Jx^Kx^Lx^Mx^Nx^Ox^Px^Qx^Rx^Sx^Tx^Ux^Vx^Wx^Xx^Yx^Z
end{equation}

end{document}


Hopefully this will be implemented soon. This has made into the source code of unicode-math. So no more rounding errors, yeah!







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 13 '18 at 0:36

























answered Dec 12 '18 at 15:35









Ruixi Zhang

5,113320




5,113320












  • Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
    – Socob
    Dec 12 '18 at 23:28










  • @Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
    – Ruixi Zhang
    Dec 13 '18 at 0:06












  • @Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
    – Ruixi Zhang
    Dec 13 '18 at 0:13










  • @Socob I edited my answer to better reflect your original question. :)
    – Ruixi Zhang
    Dec 13 '18 at 0:36




















  • Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
    – Socob
    Dec 12 '18 at 23:28










  • @Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
    – Ruixi Zhang
    Dec 13 '18 at 0:06












  • @Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
    – Ruixi Zhang
    Dec 13 '18 at 0:13










  • @Socob I edited my answer to better reflect your original question. :)
    – Ruixi Zhang
    Dec 13 '18 at 0:36


















Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
– Socob
Dec 12 '18 at 23:28




Remember that the actual question was mainly about version differences between 0.8e and 0.8g. So what you’re telling me is that this change is expected/intentional (rounding errors notwithstanding)? In my opinion, changes to line/page breaks are very disruptive and should be clearly marked.
– Socob
Dec 12 '18 at 23:28












@Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
– Ruixi Zhang
Dec 13 '18 at 0:06






@Socob You are correct! This change in math size declarations you've observed in version 0.8g of unicode-math is indeed intentional. Will Robertson and I are discussing this in github.com/wspr/unicode-math/issues/478, and hopefully egreg can also provide some insights. Long story short, unicode-math decided to use OTF parameters instead of LaTeX kernel legacy declarations, which unfortunately would result in 8.4pt script-size instead of 8pt.
– Ruixi Zhang
Dec 13 '18 at 0:06














@Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
– Ruixi Zhang
Dec 13 '18 at 0:13




@Socob I should also mention the more subtle differences in 12pt article between pdfLaTeX's usepackage{lmodern} and XeLaTeX/LuaLaTeX's usepackage{unicode-math} OTF LM Math. In the pdfLaTeX case, the design sizes used at text-size, script-size and script-script-size are LMMathItalic12, LMMathItalic8 and LMMathItalic6, respectively. But in the XeLaTeX/LuaLaTeX case with usepackage{unicode-math}, the text-size uses LM Math 10pt font scaled up, the script-size uses LM Math 7pt font scaled up and the script-script-size uses LM Math 5pt font scaled up.
– Ruixi Zhang
Dec 13 '18 at 0:13












@Socob I edited my answer to better reflect your original question. :)
– Ruixi Zhang
Dec 13 '18 at 0:36






@Socob I edited my answer to better reflect your original question. :)
– Ruixi Zhang
Dec 13 '18 at 0:36




















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f438296%2fmath-script-size-changed-between-unicode-math-v0-8e-and-v0-8g%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?