lualatex: too little space inside fBigl(Change bounding box of math glyphs in LuaTeXReplacing greek glyphs in math modeToo much space after integral sign with unicode-math and lualatexWhy does it take LuaLaTeX so long to load fonts and can I speed it up?Is direct utf8 input of combining diacritics in math mode possible with lualatex?LuaLaTex: Where do we stand as of 2014?LuaLaTeX: Replace character “ß” in CMU fontsGeneral guide on how to set up Minion Pro for math in lualatexWhy is the fraction off the math axis in XeTeX?How are non-unicode glyphs referenced in LuaTeX .dvi files?xelatex + unicode-math + big = ↯

How should I ask for a "pint" in countries that use metric?

This LM317 diagram doesn't make any sense to me

What are some bad ways to subvert tropes?

Possibility to correct pitch from digital versions of records with the hole not centered

Intern not wearing safety equipment; how could I have handled this differently?

What do you call a situation where you have choices but no good choice?

How many Jimmys can fit?

What purpose does mercury dichloride have in fireworks?

How to deal with account scam and fraud?

Tesco's Burger Relish Best Before End date number

QR codes, do people use them?

Sorting a list according to some pre-specified rules

Is this car delivery via Ebay Motors on Craigslist a scam?

Those who speak do not know, those who know do not speak

Uniform initialization by tuple

Shipped package arrived - didn't order, possible scam?

Does anyone have a method of differentiating informative comments from commented out code?

What is this burst transmission sequence across the entire band?

How did the IEC decide to create kibibytes?

Why am I getting unevenly-spread results when using $RANDOM?

Why do airports remove/realign runways?

What is the meaning of "prairie-dog" in this sentence?

Can we share mixing jug/beaker for developer, fixer and stop bath?

How to have a filled pattern



lualatex: too little space inside fBigl(


Change bounding box of math glyphs in LuaTeXReplacing greek glyphs in math modeToo much space after integral sign with unicode-math and lualatexWhy does it take LuaLaTeX so long to load fonts and can I speed it up?Is direct utf8 input of combining diacritics in math mode possible with lualatex?LuaLaTex: Where do we stand as of 2014?LuaLaTeX: Replace character “ß” in CMU fontsGeneral guide on how to set up Minion Pro for math in lualatexWhy is the fraction off the math axis in XeTeX?How are non-unicode glyphs referenced in LuaTeX .dvi files?xelatex + unicode-math + big = ↯






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















Consider the following example:



documentclassstandalone
usepackageunicode-math
setmathfontTeX Gyre Termes Math
begindocument
(fBigl(Bigr))
enddocument


If you compile it with xelatex, you get



f() with sufficient space between f and the opening parenthesis



But if you compile it with lualatex, you get a narrower



f() with little space between f and the opening parenthesis



Definitely, the results differ, so at least one of the engines or unicode-math is wrong about the spacing between f and the left parenthesis. Subjectively, the output of xelatex is more pleasant than that of lualatex, so, I presume, lualatex (or the code inside unicode-math run by lualatex only) is the culprit. But, I'm unaware of the "official" specification of how it should be, so, all bets are off.



  1. How large is the distance between f and ( supposed to be for the most pleasant reading?


  2. Who is the culprit? (I.e., who deviates from the way it is supposed to be?)


  3. Is there any way to repair the culprit or at least to achieve independency of the engine used for compilation more or less automatically?


Weakly related: Change bounding box of math glyphs in LuaTeX .
However, there, Ulrike said in her answer that "you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text." Here, on the contrary, we are still inside math. If you insert Uchar"200B or 🦆 right after f, you get more space for both engines, and the discrepancy remains. Moreover, it's far from automatic even if the discrepancy would have gone away.



EDIT: Concerning




This question already has an answer here:
Change bounding box of math glyphs in LuaTeX




It doesn't. The answer from there doesn't fit here. Feel free to test it.



Crosspost: http://latex.org/forum/viewtopic.php?f=46&t=32655&p=109799










share|improve this question









New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Yes, because of LuaTeX's lack of the italic correction, although, as you say, here we're in the middle of the formula. As stated in the answer, you can try (fUchar"200BBigl(Bigr)) or (f🦆Bigl(Bigr)) to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote.

    – Phelype Oleinik
    9 hours ago












  • @PhelypeOleinik In both suggestions of yours, the space after f increases both for xelatex and for lualatex. The discepancy between the two outputs remains.

    – MdAyq5
    9 hours ago











  • Your question "Who is the culprit? (I.e., who deviates from the specification?)" presupposes that there is a specification. the OpenType Math table specification is somewhat vague and font authors have to interpret it to know what values to put into the dimensions in the table, and rendering engine authors need to interpret the values in the table to lay out the math and then tex macros like unicode-math need to interpret the differences between the engines to give a consistent cross engine interface. It's amazing anything comes out looking similar, less surprising that they sometimes differ.

    – David Carlisle
    7 hours ago











  • @DavidCarlisle If so, then we should conclude that the culprit is fact of life that the specification is absent or ambiguous. The spec writers would be then the folks responsible. (I'm not saying that they did a bad job with respect to the payment they got for it; perhaps they did an excellent job, but, as usual, one can still do better. I'm not saying that they are guilty or anything. I don't know; I have not read the specs you talk about. If these are Microsoft folks; one should ping Microsoft, I guess.)

    – MdAyq5
    7 hours ago







  • 1





    why ping Murray, he doesn't have write access to luatex or xetex sources and they are the systems that you want to act the same. there is always room for interpretation mapping tex concepts like the mathord and mathopen classses of f and ( and the layout rules in OpenType.

    – David Carlisle
    7 hours ago

















4















Consider the following example:



documentclassstandalone
usepackageunicode-math
setmathfontTeX Gyre Termes Math
begindocument
(fBigl(Bigr))
enddocument


If you compile it with xelatex, you get



f() with sufficient space between f and the opening parenthesis



But if you compile it with lualatex, you get a narrower



f() with little space between f and the opening parenthesis



Definitely, the results differ, so at least one of the engines or unicode-math is wrong about the spacing between f and the left parenthesis. Subjectively, the output of xelatex is more pleasant than that of lualatex, so, I presume, lualatex (or the code inside unicode-math run by lualatex only) is the culprit. But, I'm unaware of the "official" specification of how it should be, so, all bets are off.



  1. How large is the distance between f and ( supposed to be for the most pleasant reading?


  2. Who is the culprit? (I.e., who deviates from the way it is supposed to be?)


  3. Is there any way to repair the culprit or at least to achieve independency of the engine used for compilation more or less automatically?


Weakly related: Change bounding box of math glyphs in LuaTeX .
However, there, Ulrike said in her answer that "you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text." Here, on the contrary, we are still inside math. If you insert Uchar"200B or 🦆 right after f, you get more space for both engines, and the discrepancy remains. Moreover, it's far from automatic even if the discrepancy would have gone away.



EDIT: Concerning




This question already has an answer here:
Change bounding box of math glyphs in LuaTeX




It doesn't. The answer from there doesn't fit here. Feel free to test it.



Crosspost: http://latex.org/forum/viewtopic.php?f=46&t=32655&p=109799










share|improve this question









New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Yes, because of LuaTeX's lack of the italic correction, although, as you say, here we're in the middle of the formula. As stated in the answer, you can try (fUchar"200BBigl(Bigr)) or (f🦆Bigl(Bigr)) to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote.

    – Phelype Oleinik
    9 hours ago












  • @PhelypeOleinik In both suggestions of yours, the space after f increases both for xelatex and for lualatex. The discepancy between the two outputs remains.

    – MdAyq5
    9 hours ago











  • Your question "Who is the culprit? (I.e., who deviates from the specification?)" presupposes that there is a specification. the OpenType Math table specification is somewhat vague and font authors have to interpret it to know what values to put into the dimensions in the table, and rendering engine authors need to interpret the values in the table to lay out the math and then tex macros like unicode-math need to interpret the differences between the engines to give a consistent cross engine interface. It's amazing anything comes out looking similar, less surprising that they sometimes differ.

    – David Carlisle
    7 hours ago











  • @DavidCarlisle If so, then we should conclude that the culprit is fact of life that the specification is absent or ambiguous. The spec writers would be then the folks responsible. (I'm not saying that they did a bad job with respect to the payment they got for it; perhaps they did an excellent job, but, as usual, one can still do better. I'm not saying that they are guilty or anything. I don't know; I have not read the specs you talk about. If these are Microsoft folks; one should ping Microsoft, I guess.)

    – MdAyq5
    7 hours ago







  • 1





    why ping Murray, he doesn't have write access to luatex or xetex sources and they are the systems that you want to act the same. there is always room for interpretation mapping tex concepts like the mathord and mathopen classses of f and ( and the layout rules in OpenType.

    – David Carlisle
    7 hours ago













4












4








4








Consider the following example:



documentclassstandalone
usepackageunicode-math
setmathfontTeX Gyre Termes Math
begindocument
(fBigl(Bigr))
enddocument


If you compile it with xelatex, you get



f() with sufficient space between f and the opening parenthesis



But if you compile it with lualatex, you get a narrower



f() with little space between f and the opening parenthesis



Definitely, the results differ, so at least one of the engines or unicode-math is wrong about the spacing between f and the left parenthesis. Subjectively, the output of xelatex is more pleasant than that of lualatex, so, I presume, lualatex (or the code inside unicode-math run by lualatex only) is the culprit. But, I'm unaware of the "official" specification of how it should be, so, all bets are off.



  1. How large is the distance between f and ( supposed to be for the most pleasant reading?


  2. Who is the culprit? (I.e., who deviates from the way it is supposed to be?)


  3. Is there any way to repair the culprit or at least to achieve independency of the engine used for compilation more or less automatically?


Weakly related: Change bounding box of math glyphs in LuaTeX .
However, there, Ulrike said in her answer that "you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text." Here, on the contrary, we are still inside math. If you insert Uchar"200B or 🦆 right after f, you get more space for both engines, and the discrepancy remains. Moreover, it's far from automatic even if the discrepancy would have gone away.



EDIT: Concerning




This question already has an answer here:
Change bounding box of math glyphs in LuaTeX




It doesn't. The answer from there doesn't fit here. Feel free to test it.



Crosspost: http://latex.org/forum/viewtopic.php?f=46&t=32655&p=109799










share|improve this question









New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











Consider the following example:



documentclassstandalone
usepackageunicode-math
setmathfontTeX Gyre Termes Math
begindocument
(fBigl(Bigr))
enddocument


If you compile it with xelatex, you get



f() with sufficient space between f and the opening parenthesis



But if you compile it with lualatex, you get a narrower



f() with little space between f and the opening parenthesis



Definitely, the results differ, so at least one of the engines or unicode-math is wrong about the spacing between f and the left parenthesis. Subjectively, the output of xelatex is more pleasant than that of lualatex, so, I presume, lualatex (or the code inside unicode-math run by lualatex only) is the culprit. But, I'm unaware of the "official" specification of how it should be, so, all bets are off.



  1. How large is the distance between f and ( supposed to be for the most pleasant reading?


  2. Who is the culprit? (I.e., who deviates from the way it is supposed to be?)


  3. Is there any way to repair the culprit or at least to achieve independency of the engine used for compilation more or less automatically?


Weakly related: Change bounding box of math glyphs in LuaTeX .
However, there, Ulrike said in her answer that "you are at the end of the math and luatex doesn't insert the italic correction at the boundary between math and text." Here, on the contrary, we are still inside math. If you insert Uchar"200B or 🦆 right after f, you get more space for both engines, and the discrepancy remains. Moreover, it's far from automatic even if the discrepancy would have gone away.



EDIT: Concerning




This question already has an answer here:
Change bounding box of math glyphs in LuaTeX




It doesn't. The answer from there doesn't fit here. Feel free to test it.



Crosspost: http://latex.org/forum/viewtopic.php?f=46&t=32655&p=109799







math-mode spacing xetex luatex unicode-math






share|improve this question









New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 4 hours ago







MdAyq5













New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 9 hours ago









MdAyq5MdAyq5

213 bronze badges




213 bronze badges




New contributor



MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




MdAyq5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • Yes, because of LuaTeX's lack of the italic correction, although, as you say, here we're in the middle of the formula. As stated in the answer, you can try (fUchar"200BBigl(Bigr)) or (f🦆Bigl(Bigr)) to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote.

    – Phelype Oleinik
    9 hours ago












  • @PhelypeOleinik In both suggestions of yours, the space after f increases both for xelatex and for lualatex. The discepancy between the two outputs remains.

    – MdAyq5
    9 hours ago











  • Your question "Who is the culprit? (I.e., who deviates from the specification?)" presupposes that there is a specification. the OpenType Math table specification is somewhat vague and font authors have to interpret it to know what values to put into the dimensions in the table, and rendering engine authors need to interpret the values in the table to lay out the math and then tex macros like unicode-math need to interpret the differences between the engines to give a consistent cross engine interface. It's amazing anything comes out looking similar, less surprising that they sometimes differ.

    – David Carlisle
    7 hours ago











  • @DavidCarlisle If so, then we should conclude that the culprit is fact of life that the specification is absent or ambiguous. The spec writers would be then the folks responsible. (I'm not saying that they did a bad job with respect to the payment they got for it; perhaps they did an excellent job, but, as usual, one can still do better. I'm not saying that they are guilty or anything. I don't know; I have not read the specs you talk about. If these are Microsoft folks; one should ping Microsoft, I guess.)

    – MdAyq5
    7 hours ago







  • 1





    why ping Murray, he doesn't have write access to luatex or xetex sources and they are the systems that you want to act the same. there is always room for interpretation mapping tex concepts like the mathord and mathopen classses of f and ( and the layout rules in OpenType.

    – David Carlisle
    7 hours ago

















  • Yes, because of LuaTeX's lack of the italic correction, although, as you say, here we're in the middle of the formula. As stated in the answer, you can try (fUchar"200BBigl(Bigr)) or (f🦆Bigl(Bigr)) to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote.

    – Phelype Oleinik
    9 hours ago












  • @PhelypeOleinik In both suggestions of yours, the space after f increases both for xelatex and for lualatex. The discepancy between the two outputs remains.

    – MdAyq5
    9 hours ago











  • Your question "Who is the culprit? (I.e., who deviates from the specification?)" presupposes that there is a specification. the OpenType Math table specification is somewhat vague and font authors have to interpret it to know what values to put into the dimensions in the table, and rendering engine authors need to interpret the values in the table to lay out the math and then tex macros like unicode-math need to interpret the differences between the engines to give a consistent cross engine interface. It's amazing anything comes out looking similar, less surprising that they sometimes differ.

    – David Carlisle
    7 hours ago











  • @DavidCarlisle If so, then we should conclude that the culprit is fact of life that the specification is absent or ambiguous. The spec writers would be then the folks responsible. (I'm not saying that they did a bad job with respect to the payment they got for it; perhaps they did an excellent job, but, as usual, one can still do better. I'm not saying that they are guilty or anything. I don't know; I have not read the specs you talk about. If these are Microsoft folks; one should ping Microsoft, I guess.)

    – MdAyq5
    7 hours ago







  • 1





    why ping Murray, he doesn't have write access to luatex or xetex sources and they are the systems that you want to act the same. there is always room for interpretation mapping tex concepts like the mathord and mathopen classses of f and ( and the layout rules in OpenType.

    – David Carlisle
    7 hours ago
















Yes, because of LuaTeX's lack of the italic correction, although, as you say, here we're in the middle of the formula. As stated in the answer, you can try (fUchar"200BBigl(Bigr)) or (f🦆Bigl(Bigr)) to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote.

– Phelype Oleinik
9 hours ago






Yes, because of LuaTeX's lack of the italic correction, although, as you say, here we're in the middle of the formula. As stated in the answer, you can try (fUchar"200BBigl(Bigr)) or (f🦆Bigl(Bigr)) to have the spacing fixed. However I must say that it's a pain to do that eveywhere... I'll retract my close vote.

– Phelype Oleinik
9 hours ago














@PhelypeOleinik In both suggestions of yours, the space after f increases both for xelatex and for lualatex. The discepancy between the two outputs remains.

– MdAyq5
9 hours ago





@PhelypeOleinik In both suggestions of yours, the space after f increases both for xelatex and for lualatex. The discepancy between the two outputs remains.

– MdAyq5
9 hours ago













Your question "Who is the culprit? (I.e., who deviates from the specification?)" presupposes that there is a specification. the OpenType Math table specification is somewhat vague and font authors have to interpret it to know what values to put into the dimensions in the table, and rendering engine authors need to interpret the values in the table to lay out the math and then tex macros like unicode-math need to interpret the differences between the engines to give a consistent cross engine interface. It's amazing anything comes out looking similar, less surprising that they sometimes differ.

– David Carlisle
7 hours ago





Your question "Who is the culprit? (I.e., who deviates from the specification?)" presupposes that there is a specification. the OpenType Math table specification is somewhat vague and font authors have to interpret it to know what values to put into the dimensions in the table, and rendering engine authors need to interpret the values in the table to lay out the math and then tex macros like unicode-math need to interpret the differences between the engines to give a consistent cross engine interface. It's amazing anything comes out looking similar, less surprising that they sometimes differ.

– David Carlisle
7 hours ago













@DavidCarlisle If so, then we should conclude that the culprit is fact of life that the specification is absent or ambiguous. The spec writers would be then the folks responsible. (I'm not saying that they did a bad job with respect to the payment they got for it; perhaps they did an excellent job, but, as usual, one can still do better. I'm not saying that they are guilty or anything. I don't know; I have not read the specs you talk about. If these are Microsoft folks; one should ping Microsoft, I guess.)

– MdAyq5
7 hours ago






@DavidCarlisle If so, then we should conclude that the culprit is fact of life that the specification is absent or ambiguous. The spec writers would be then the folks responsible. (I'm not saying that they did a bad job with respect to the payment they got for it; perhaps they did an excellent job, but, as usual, one can still do better. I'm not saying that they are guilty or anything. I don't know; I have not read the specs you talk about. If these are Microsoft folks; one should ping Microsoft, I guess.)

– MdAyq5
7 hours ago





1




1





why ping Murray, he doesn't have write access to luatex or xetex sources and they are the systems that you want to act the same. there is always room for interpretation mapping tex concepts like the mathord and mathopen classses of f and ( and the layout rules in OpenType.

– David Carlisle
7 hours ago





why ping Murray, he doesn't have write access to luatex or xetex sources and they are the systems that you want to act the same. there is always room for interpretation mapping tex concepts like the mathord and mathopen classses of f and ( and the layout rules in OpenType.

– David Carlisle
7 hours ago










1 Answer
1






active

oldest

votes


















5














What does the relevant specification actually say?




Italics correction can be used in the following situations:



  • When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width.



(The OpenType MATH table specification, emphasis mine)



Now the TeX engine has to decide how to translate this to TeX concepts. XeTeX generally classifies mathopen atoms as "delimiters" and therefore "straight characters", but LuaTeX only classifies TeX delimiters, (left, right, etc.) as "delimiters".



I tend to agree with XeTeX here.



To get consistant behaviour, you can add explicitly add the italic correction through /, so in your example:



documentclassstandalone
usepackageunicode-math,ifluatex
setmathfontTeX Gyre Termes Math
ifluatex
mathitalicsmode=1
fi
begindocument
(f/Bigl(Bigr))
enddocument


This can also be automated using the mlist_to_hlist callback.






share|improve this answer

























  • Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

    – MdAyq5
    6 hours ago












  • @MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

    – Marcel Krüger
    6 hours ago











  • Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

    – MdAyq5
    5 hours ago












  • @MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

    – Marcel Krüger
    5 hours ago






  • 1





    @MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

    – Marcel Krüger
    5 hours ago













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
);



);






MdAyq5 is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f498776%2flualatex-too-little-space-inside-f-bigl%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









5














What does the relevant specification actually say?




Italics correction can be used in the following situations:



  • When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width.



(The OpenType MATH table specification, emphasis mine)



Now the TeX engine has to decide how to translate this to TeX concepts. XeTeX generally classifies mathopen atoms as "delimiters" and therefore "straight characters", but LuaTeX only classifies TeX delimiters, (left, right, etc.) as "delimiters".



I tend to agree with XeTeX here.



To get consistant behaviour, you can add explicitly add the italic correction through /, so in your example:



documentclassstandalone
usepackageunicode-math,ifluatex
setmathfontTeX Gyre Termes Math
ifluatex
mathitalicsmode=1
fi
begindocument
(f/Bigl(Bigr))
enddocument


This can also be automated using the mlist_to_hlist callback.






share|improve this answer

























  • Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

    – MdAyq5
    6 hours ago












  • @MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

    – Marcel Krüger
    6 hours ago











  • Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

    – MdAyq5
    5 hours ago












  • @MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

    – Marcel Krüger
    5 hours ago






  • 1





    @MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

    – Marcel Krüger
    5 hours ago















5














What does the relevant specification actually say?




Italics correction can be used in the following situations:



  • When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width.



(The OpenType MATH table specification, emphasis mine)



Now the TeX engine has to decide how to translate this to TeX concepts. XeTeX generally classifies mathopen atoms as "delimiters" and therefore "straight characters", but LuaTeX only classifies TeX delimiters, (left, right, etc.) as "delimiters".



I tend to agree with XeTeX here.



To get consistant behaviour, you can add explicitly add the italic correction through /, so in your example:



documentclassstandalone
usepackageunicode-math,ifluatex
setmathfontTeX Gyre Termes Math
ifluatex
mathitalicsmode=1
fi
begindocument
(f/Bigl(Bigr))
enddocument


This can also be automated using the mlist_to_hlist callback.






share|improve this answer

























  • Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

    – MdAyq5
    6 hours ago












  • @MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

    – Marcel Krüger
    6 hours ago











  • Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

    – MdAyq5
    5 hours ago












  • @MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

    – Marcel Krüger
    5 hours ago






  • 1





    @MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

    – Marcel Krüger
    5 hours ago













5












5








5







What does the relevant specification actually say?




Italics correction can be used in the following situations:



  • When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width.



(The OpenType MATH table specification, emphasis mine)



Now the TeX engine has to decide how to translate this to TeX concepts. XeTeX generally classifies mathopen atoms as "delimiters" and therefore "straight characters", but LuaTeX only classifies TeX delimiters, (left, right, etc.) as "delimiters".



I tend to agree with XeTeX here.



To get consistant behaviour, you can add explicitly add the italic correction through /, so in your example:



documentclassstandalone
usepackageunicode-math,ifluatex
setmathfontTeX Gyre Termes Math
ifluatex
mathitalicsmode=1
fi
begindocument
(f/Bigl(Bigr))
enddocument


This can also be automated using the mlist_to_hlist callback.






share|improve this answer















What does the relevant specification actually say?




Italics correction can be used in the following situations:



  • When a run of slanted characters is followed by a straight character (such as an operator or a delimiter), the italics correction of the last glyph is added to its advance width.



(The OpenType MATH table specification, emphasis mine)



Now the TeX engine has to decide how to translate this to TeX concepts. XeTeX generally classifies mathopen atoms as "delimiters" and therefore "straight characters", but LuaTeX only classifies TeX delimiters, (left, right, etc.) as "delimiters".



I tend to agree with XeTeX here.



To get consistant behaviour, you can add explicitly add the italic correction through /, so in your example:



documentclassstandalone
usepackageunicode-math,ifluatex
setmathfontTeX Gyre Termes Math
ifluatex
mathitalicsmode=1
fi
begindocument
(f/Bigl(Bigr))
enddocument


This can also be automated using the mlist_to_hlist callback.







share|improve this answer














share|improve this answer



share|improve this answer








edited 6 hours ago

























answered 7 hours ago









Marcel KrügerMarcel Krüger

14.4k1 gold badge17 silver badges37 bronze badges




14.4k1 gold badge17 silver badges37 bronze badges












  • Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

    – MdAyq5
    6 hours ago












  • @MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

    – Marcel Krüger
    6 hours ago











  • Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

    – MdAyq5
    5 hours ago












  • @MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

    – Marcel Krüger
    5 hours ago






  • 1





    @MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

    – Marcel Krüger
    5 hours ago

















  • Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

    – MdAyq5
    6 hours ago












  • @MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

    – Marcel Krüger
    6 hours ago











  • Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

    – MdAyq5
    5 hours ago












  • @MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

    – Marcel Krüger
    5 hours ago






  • 1





    @MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

    – Marcel Krüger
    5 hours ago
















Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

– MdAyq5
6 hours ago






Now, it works like a charm. Thank you. Any idea on why mathitalicsmode=1 is not the default in lualatex?

– MdAyq5
6 hours ago














@MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

– Marcel Krüger
6 hours ago





@MdAyq5 AFAICT mostly historical reasons. Earlier versions of the OpenType MATH specs did not include the part quoted above, so it was unclear when italic correction should be added. Later the default probably never changed to stay compatible.

– Marcel Krüger
6 hours ago













Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

– MdAyq5
5 hours ago






Setting mathitalicsmode=1 incurs some tiny changes in the remainder of a huge document (from which my example above has been taken). Do you know, perhaps, whether setting mathitalicsmode=1 a good thing in general for LuaLaTeX for new documents or does it have some downsides overwieghing the problem described?

– MdAyq5
5 hours ago














@MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

– Marcel Krüger
5 hours ago





@MdAyq5 As documented, mathitalicsmode=1 forces italic correction before "noads that represent some more complex structure". So basically it answers the question: What if a slanted character is not followed by a character at all. This isn't specified (the quote above only talks about slanted characters followed by straight characters). So the entire point behind mathitalicsmode is that it is not clear what setting is "good". You have to decide for yourself, probably depending on the math font.

– Marcel Krüger
5 hours ago




1




1





@MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

– Marcel Krüger
5 hours ago





@MdAyq5 Yes, but you can't change it inside a math formula. (To be precise, as usual the setting active at the end of the formula will apply to the entire formula.)

– Marcel Krüger
5 hours ago










MdAyq5 is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















MdAyq5 is a new contributor. Be nice, and check out our Code of Conduct.












MdAyq5 is a new contributor. Be nice, and check out our Code of Conduct.











MdAyq5 is a new contributor. Be nice, and check out our Code of Conduct.














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%2f498776%2flualatex-too-little-space-inside-f-bigl%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

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її