mtpro2 SQRT with root index affect the subsequent spacing
I recently installed math professional II font (mtpro2 lite). It works fine except that the SQRT with root index sucks.
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000}= 100 ]
Output
Is this a problem of the lite version (intended or not)? Does the complete version have this problem too? How can I define a new command to handle the situation automatically?
spacing mtpro
add a comment |
I recently installed math professional II font (mtpro2 lite). It works fine except that the SQRT with root index sucks.
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000}= 100 ]
Output
Is this a problem of the lite version (intended or not)? Does the complete version have this problem too? How can I define a new command to handle the situation automatically?
spacing mtpro
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– Martin Schröder
Jul 29 '15 at 8:35
1
I can confirm that the fullmtpro2
package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015.
– Mico
Jul 29 '15 at 11:04
Yup, same here.
– JPi
Jul 30 '15 at 2:44
add a comment |
I recently installed math professional II font (mtpro2 lite). It works fine except that the SQRT with root index sucks.
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000}= 100 ]
Output
Is this a problem of the lite version (intended or not)? Does the complete version have this problem too? How can I define a new command to handle the situation automatically?
spacing mtpro
I recently installed math professional II font (mtpro2 lite). It works fine except that the SQRT with root index sucks.
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000}= 100 ]
Output
Is this a problem of the lite version (intended or not)? Does the complete version have this problem too? How can I define a new command to handle the situation automatically?
spacing mtpro
spacing mtpro
edited Jul 29 '15 at 18:24
Lei Zhao
asked Jul 29 '15 at 8:15
Lei ZhaoLei Zhao
857
857
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– Martin Schröder
Jul 29 '15 at 8:35
1
I can confirm that the fullmtpro2
package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015.
– Mico
Jul 29 '15 at 11:04
Yup, same here.
– JPi
Jul 30 '15 at 2:44
add a comment |
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– Martin Schröder
Jul 29 '15 at 8:35
1
I can confirm that the fullmtpro2
package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015.
– Mico
Jul 29 '15 at 11:04
Yup, same here.
– JPi
Jul 30 '15 at 2:44
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– Martin Schröder
Jul 29 '15 at 8:35
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– Martin Schröder
Jul 29 '15 at 8:35
1
1
I can confirm that the full
mtpro2
package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015.– Mico
Jul 29 '15 at 11:04
I can confirm that the full
mtpro2
package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015.– Mico
Jul 29 '15 at 11:04
Yup, same here.
– JPi
Jul 30 '15 at 2:44
Yup, same here.
– JPi
Jul 30 '15 at 2:44
add a comment |
2 Answers
2
active
oldest
votes
Don't know exactly why this fixes the problem, but it seems to. ;-)
documentclass{article}
usepackage{mtpro2}
usepackage{mathtools}
newcommand{SQRTFIX}[2][ ]{{hphantom{scriptscriptstyle{#1}}}SQRT[mathllap{#1}]{#2}}
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[
SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100
]
[
SQRTFIX[100]{1000000} =1000 quad SQRTFIX[3]{1000000} = 100
]
end{document}
The second image simply shows in the yellow box what the original $SQRT$ does and in the blue box what $SQRTFIX$ does.
Good eyesight! Thanks to you, I was able to track down the bug in themtpro2
package.
– Ruixi Zhang
32 mins ago
add a comment |
Thanks to @JPi’s amazing eyesight, I was able to track down exactly the bug in the mtpro2
package. All credits goes to him/her.
@JPi’s solution suggests that the offsetting space is somehow the width of the root index. I confirm this is the case. The root index is placed inside a box called rootbox
. Here is how LaTeX defines its placement:
% From ltmath.dtx:
defr@@t#1#2{%
setboxz@hbox{$m@th#1sqrtsign{#2}$}%
dimen@htz@ advancedimen@-dpz@
mkern5muraise.6dimen@copyrootbox
mkern-10muboxz@}
which is the default, while mtpro2
does some similar things like:
% From mtpro2.dtx or mtpro2.sty
defR@@T#1#2{setboxz@hbox{$UPROOT@z@LEFTROOT@z@m@th#1SQR@@T{#2}$}%
dimen@htz@advancedimen@-dpz@
dimen@iidimen@
setboxtw@hbox{$m@th#1mskipUPROOT@ mu$}advancedimen@ii by1.667wdtw@
setboxtw@hbox{$m@th#1mskip10mu$}%
ifcaseSQcount@advancedimen@3wdtw@oradvancedimen@1.5wdtw@or
advancedimen@wdtw@fi
mkern1mukern.13dimen@mkern-LEFTROOT@ mu
raise.5dimen@iicopyrootbox % was .44
mkern-1mukern-.13dimen@mkernLEFTROOT@ muboxz@kern-wdrootbox
LEFTROOTz@UPROOTz@}
Focusing on the overall structures, we see immediately that R@@T
has additional code of kern-wdrootbox
, which IMHO is utterly wrong. So here is my fix:
documentclass{article}
usepackage{newtxtext}
usepackage{mtpro2}% lite or complete, does not matter here
usepackage{etoolbox}
makeatletter
patchcmdR@@T
{kern-wdrootbox} % search this within R@@T
{} % replace it with nothing
{}{}
makeatother
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100 ]
end{document}
Note: sqrt
and SQRT
, by design, will produce slightly different results (as seen in the above picture). SQRT
is supposed to be used for really large formulae (hence the awkward root index placement). Please refrain from using SQRT
for small formulae.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f257641%2fmtpro2-sqrt-with-root-index-affect-the-subsequent-spacing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Don't know exactly why this fixes the problem, but it seems to. ;-)
documentclass{article}
usepackage{mtpro2}
usepackage{mathtools}
newcommand{SQRTFIX}[2][ ]{{hphantom{scriptscriptstyle{#1}}}SQRT[mathllap{#1}]{#2}}
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[
SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100
]
[
SQRTFIX[100]{1000000} =1000 quad SQRTFIX[3]{1000000} = 100
]
end{document}
The second image simply shows in the yellow box what the original $SQRT$ does and in the blue box what $SQRTFIX$ does.
Good eyesight! Thanks to you, I was able to track down the bug in themtpro2
package.
– Ruixi Zhang
32 mins ago
add a comment |
Don't know exactly why this fixes the problem, but it seems to. ;-)
documentclass{article}
usepackage{mtpro2}
usepackage{mathtools}
newcommand{SQRTFIX}[2][ ]{{hphantom{scriptscriptstyle{#1}}}SQRT[mathllap{#1}]{#2}}
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[
SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100
]
[
SQRTFIX[100]{1000000} =1000 quad SQRTFIX[3]{1000000} = 100
]
end{document}
The second image simply shows in the yellow box what the original $SQRT$ does and in the blue box what $SQRTFIX$ does.
Good eyesight! Thanks to you, I was able to track down the bug in themtpro2
package.
– Ruixi Zhang
32 mins ago
add a comment |
Don't know exactly why this fixes the problem, but it seems to. ;-)
documentclass{article}
usepackage{mtpro2}
usepackage{mathtools}
newcommand{SQRTFIX}[2][ ]{{hphantom{scriptscriptstyle{#1}}}SQRT[mathllap{#1}]{#2}}
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[
SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100
]
[
SQRTFIX[100]{1000000} =1000 quad SQRTFIX[3]{1000000} = 100
]
end{document}
The second image simply shows in the yellow box what the original $SQRT$ does and in the blue box what $SQRTFIX$ does.
Don't know exactly why this fixes the problem, but it seems to. ;-)
documentclass{article}
usepackage{mtpro2}
usepackage{mathtools}
newcommand{SQRTFIX}[2][ ]{{hphantom{scriptscriptstyle{#1}}}SQRT[mathllap{#1}]{#2}}
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[
SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100
]
[
SQRTFIX[100]{1000000} =1000 quad SQRTFIX[3]{1000000} = 100
]
end{document}
The second image simply shows in the yellow box what the original $SQRT$ does and in the blue box what $SQRTFIX$ does.
edited Jul 30 '15 at 3:41
answered Jul 30 '15 at 2:58
JPiJPi
9,70421550
9,70421550
Good eyesight! Thanks to you, I was able to track down the bug in themtpro2
package.
– Ruixi Zhang
32 mins ago
add a comment |
Good eyesight! Thanks to you, I was able to track down the bug in themtpro2
package.
– Ruixi Zhang
32 mins ago
Good eyesight! Thanks to you, I was able to track down the bug in the
mtpro2
package.– Ruixi Zhang
32 mins ago
Good eyesight! Thanks to you, I was able to track down the bug in the
mtpro2
package.– Ruixi Zhang
32 mins ago
add a comment |
Thanks to @JPi’s amazing eyesight, I was able to track down exactly the bug in the mtpro2
package. All credits goes to him/her.
@JPi’s solution suggests that the offsetting space is somehow the width of the root index. I confirm this is the case. The root index is placed inside a box called rootbox
. Here is how LaTeX defines its placement:
% From ltmath.dtx:
defr@@t#1#2{%
setboxz@hbox{$m@th#1sqrtsign{#2}$}%
dimen@htz@ advancedimen@-dpz@
mkern5muraise.6dimen@copyrootbox
mkern-10muboxz@}
which is the default, while mtpro2
does some similar things like:
% From mtpro2.dtx or mtpro2.sty
defR@@T#1#2{setboxz@hbox{$UPROOT@z@LEFTROOT@z@m@th#1SQR@@T{#2}$}%
dimen@htz@advancedimen@-dpz@
dimen@iidimen@
setboxtw@hbox{$m@th#1mskipUPROOT@ mu$}advancedimen@ii by1.667wdtw@
setboxtw@hbox{$m@th#1mskip10mu$}%
ifcaseSQcount@advancedimen@3wdtw@oradvancedimen@1.5wdtw@or
advancedimen@wdtw@fi
mkern1mukern.13dimen@mkern-LEFTROOT@ mu
raise.5dimen@iicopyrootbox % was .44
mkern-1mukern-.13dimen@mkernLEFTROOT@ muboxz@kern-wdrootbox
LEFTROOTz@UPROOTz@}
Focusing on the overall structures, we see immediately that R@@T
has additional code of kern-wdrootbox
, which IMHO is utterly wrong. So here is my fix:
documentclass{article}
usepackage{newtxtext}
usepackage{mtpro2}% lite or complete, does not matter here
usepackage{etoolbox}
makeatletter
patchcmdR@@T
{kern-wdrootbox} % search this within R@@T
{} % replace it with nothing
{}{}
makeatother
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100 ]
end{document}
Note: sqrt
and SQRT
, by design, will produce slightly different results (as seen in the above picture). SQRT
is supposed to be used for really large formulae (hence the awkward root index placement). Please refrain from using SQRT
for small formulae.
add a comment |
Thanks to @JPi’s amazing eyesight, I was able to track down exactly the bug in the mtpro2
package. All credits goes to him/her.
@JPi’s solution suggests that the offsetting space is somehow the width of the root index. I confirm this is the case. The root index is placed inside a box called rootbox
. Here is how LaTeX defines its placement:
% From ltmath.dtx:
defr@@t#1#2{%
setboxz@hbox{$m@th#1sqrtsign{#2}$}%
dimen@htz@ advancedimen@-dpz@
mkern5muraise.6dimen@copyrootbox
mkern-10muboxz@}
which is the default, while mtpro2
does some similar things like:
% From mtpro2.dtx or mtpro2.sty
defR@@T#1#2{setboxz@hbox{$UPROOT@z@LEFTROOT@z@m@th#1SQR@@T{#2}$}%
dimen@htz@advancedimen@-dpz@
dimen@iidimen@
setboxtw@hbox{$m@th#1mskipUPROOT@ mu$}advancedimen@ii by1.667wdtw@
setboxtw@hbox{$m@th#1mskip10mu$}%
ifcaseSQcount@advancedimen@3wdtw@oradvancedimen@1.5wdtw@or
advancedimen@wdtw@fi
mkern1mukern.13dimen@mkern-LEFTROOT@ mu
raise.5dimen@iicopyrootbox % was .44
mkern-1mukern-.13dimen@mkernLEFTROOT@ muboxz@kern-wdrootbox
LEFTROOTz@UPROOTz@}
Focusing on the overall structures, we see immediately that R@@T
has additional code of kern-wdrootbox
, which IMHO is utterly wrong. So here is my fix:
documentclass{article}
usepackage{newtxtext}
usepackage{mtpro2}% lite or complete, does not matter here
usepackage{etoolbox}
makeatletter
patchcmdR@@T
{kern-wdrootbox} % search this within R@@T
{} % replace it with nothing
{}{}
makeatother
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100 ]
end{document}
Note: sqrt
and SQRT
, by design, will produce slightly different results (as seen in the above picture). SQRT
is supposed to be used for really large formulae (hence the awkward root index placement). Please refrain from using SQRT
for small formulae.
add a comment |
Thanks to @JPi’s amazing eyesight, I was able to track down exactly the bug in the mtpro2
package. All credits goes to him/her.
@JPi’s solution suggests that the offsetting space is somehow the width of the root index. I confirm this is the case. The root index is placed inside a box called rootbox
. Here is how LaTeX defines its placement:
% From ltmath.dtx:
defr@@t#1#2{%
setboxz@hbox{$m@th#1sqrtsign{#2}$}%
dimen@htz@ advancedimen@-dpz@
mkern5muraise.6dimen@copyrootbox
mkern-10muboxz@}
which is the default, while mtpro2
does some similar things like:
% From mtpro2.dtx or mtpro2.sty
defR@@T#1#2{setboxz@hbox{$UPROOT@z@LEFTROOT@z@m@th#1SQR@@T{#2}$}%
dimen@htz@advancedimen@-dpz@
dimen@iidimen@
setboxtw@hbox{$m@th#1mskipUPROOT@ mu$}advancedimen@ii by1.667wdtw@
setboxtw@hbox{$m@th#1mskip10mu$}%
ifcaseSQcount@advancedimen@3wdtw@oradvancedimen@1.5wdtw@or
advancedimen@wdtw@fi
mkern1mukern.13dimen@mkern-LEFTROOT@ mu
raise.5dimen@iicopyrootbox % was .44
mkern-1mukern-.13dimen@mkernLEFTROOT@ muboxz@kern-wdrootbox
LEFTROOTz@UPROOTz@}
Focusing on the overall structures, we see immediately that R@@T
has additional code of kern-wdrootbox
, which IMHO is utterly wrong. So here is my fix:
documentclass{article}
usepackage{newtxtext}
usepackage{mtpro2}% lite or complete, does not matter here
usepackage{etoolbox}
makeatletter
patchcmdR@@T
{kern-wdrootbox} % search this within R@@T
{} % replace it with nothing
{}{}
makeatother
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100 ]
end{document}
Note: sqrt
and SQRT
, by design, will produce slightly different results (as seen in the above picture). SQRT
is supposed to be used for really large formulae (hence the awkward root index placement). Please refrain from using SQRT
for small formulae.
Thanks to @JPi’s amazing eyesight, I was able to track down exactly the bug in the mtpro2
package. All credits goes to him/her.
@JPi’s solution suggests that the offsetting space is somehow the width of the root index. I confirm this is the case. The root index is placed inside a box called rootbox
. Here is how LaTeX defines its placement:
% From ltmath.dtx:
defr@@t#1#2{%
setboxz@hbox{$m@th#1sqrtsign{#2}$}%
dimen@htz@ advancedimen@-dpz@
mkern5muraise.6dimen@copyrootbox
mkern-10muboxz@}
which is the default, while mtpro2
does some similar things like:
% From mtpro2.dtx or mtpro2.sty
defR@@T#1#2{setboxz@hbox{$UPROOT@z@LEFTROOT@z@m@th#1SQR@@T{#2}$}%
dimen@htz@advancedimen@-dpz@
dimen@iidimen@
setboxtw@hbox{$m@th#1mskipUPROOT@ mu$}advancedimen@ii by1.667wdtw@
setboxtw@hbox{$m@th#1mskip10mu$}%
ifcaseSQcount@advancedimen@3wdtw@oradvancedimen@1.5wdtw@or
advancedimen@wdtw@fi
mkern1mukern.13dimen@mkern-LEFTROOT@ mu
raise.5dimen@iicopyrootbox % was .44
mkern-1mukern-.13dimen@mkernLEFTROOT@ muboxz@kern-wdrootbox
LEFTROOTz@UPROOTz@}
Focusing on the overall structures, we see immediately that R@@T
has additional code of kern-wdrootbox
, which IMHO is utterly wrong. So here is my fix:
documentclass{article}
usepackage{newtxtext}
usepackage{mtpro2}% lite or complete, does not matter here
usepackage{etoolbox}
makeatletter
patchcmdR@@T
{kern-wdrootbox} % search this within R@@T
{} % replace it with nothing
{}{}
makeatother
begin{document}
[ sqrt[100]{1000000} = 1000 quad sqrt[3]{1000000} = 100 ]
[ SQRT[100]{1000000} = 1000 quad SQRT[3]{1000000} = 100 ]
end{document}
Note: sqrt
and SQRT
, by design, will produce slightly different results (as seen in the above picture). SQRT
is supposed to be used for really large formulae (hence the awkward root index placement). Please refrain from using SQRT
for small formulae.
answered 3 mins ago
Ruixi ZhangRuixi Zhang
5,563322
5,563322
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f257641%2fmtpro2-sqrt-with-root-index-affect-the-subsequent-spacing%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
– Martin Schröder
Jul 29 '15 at 8:35
1
I can confirm that the full
mtpro2
package suffers the same problem. My system runs MacOSX 10.10.4, and I use the version of pdfLaTeX that comes with MacTeX2015.– Mico
Jul 29 '15 at 11:04
Yup, same here.
– JPi
Jul 30 '15 at 2:44