Correct use of smash with math and root signsArgument of align has an extra '}'Depth and height confusionwhat is the correct way to typeset equations with a leading indicator/marker on eachHow can systems be side by side with an arrow between themplease help me fit my equation into my margins!Math equation with cases and division signsProblem with “missing $ inserted” messageHow can I center a set of equations and make a line under one of them?Second Equation Alignment Column Aligning IncorrectlyLatex: problems with equation numbers and space after the equal-sign
Why do player start with fighting for the corners in go?
Python π = 1 + (1/2) + (1/3) + (1/4) - (1/5) + (1/6) + (1/7) + (1/8) + (1/9) - (1/10) ...1748 Euler
Does the use of a new concept require a prior definition?
How to power down external drive safely
UX writing: When to use "we"?
Why are Star Wars Rebel Alliance ships named after letters from the Latin alphabet?
If a Shadow Magic sorcerer casts Darkness using the Eyes of the Dark feature, can they cast another spell that requires concentration?
What does a number above the 'staff' mean in tablature?
Can it be useful for a player block with a hanging piece in a back rank mate situation?
What is the most 'environmentally friendly' way to learn to fly?
How to avoid a lengthy conversation with someone from the neighborhood I don't share interests with
Feedback diagram
Is Norway in the Single Market?
How can a class have multiple methods without breaking the single responsibility principle
Does KNN have a loss function?
Why is “deal 6 damage” a legit phrase?
Adding a (stair/baby) gate without facing walls
Move label of an angle in Tikz
Should I take up a Creative Writing online course?
What is the difference between 2/4 and 4/4 when it comes the accented beats?
Partial Fractions: Why does this shortcut method work?
Return last number in sub-sequences in a list of integers
Is verification of a blockchain computationally cheaper than recreating it?
Applying for mortgage when living together but only one will be on the mortgage
Correct use of smash with math and root signs
Argument of align has an extra '}'Depth and height confusionwhat is the correct way to typeset equations with a leading indicator/marker on eachHow can systems be side by side with an arrow between themplease help me fit my equation into my margins!Math equation with cases and division signsProblem with “missing $ inserted” messageHow can I center a set of equations and make a line under one of them?Second Equation Alignment Column Aligning IncorrectlyLatex: problems with equation numbers and space after the equal-sign
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
How can I get the same height on the second root-sign as the first?;
$$sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2$$
I've tried different methods using smash
, vphantom
and rule[]
but could not work out which was the best and most 'proper' way of solving this 'problem'. TIA.
equations
add a comment |
How can I get the same height on the second root-sign as the first?;
$$sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2$$
I've tried different methods using smash
, vphantom
and rule[]
but could not work out which was the best and most 'proper' way of solving this 'problem'. TIA.
equations
Thanks for all help, but I cannot understand why the ^2 cannot go under thesmash
command in the solution suggested by Mico. The following two examples does not result in the same display:smash(4a)^2
andsmash(4a)^2
(Sorry, did not know how to type in the comment box to get better display of codes.)
– mf67
Jul 24 at 10:31
If you compare the outputs ofsmash(4a)^2
andsmash(4a)^2
, you'll notice that the exponent is placed higher relative to the baseline if the scope ofsmash
includes the exponent -- not by a huge amount, for sure, but by about 1 or 2 points. This difference results in a slight increase in the overall height of the denominator which, in turn, explains why LaTeX sees fit to employ a taller (and deeper) square root symbol when it processessmash(4a)^2
.
– Mico
Jul 24 at 12:31
add a comment |
How can I get the same height on the second root-sign as the first?;
$$sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2$$
I've tried different methods using smash
, vphantom
and rule[]
but could not work out which was the best and most 'proper' way of solving this 'problem'. TIA.
equations
How can I get the same height on the second root-sign as the first?;
$$sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2$$
I've tried different methods using smash
, vphantom
and rule[]
but could not work out which was the best and most 'proper' way of solving this 'problem'. TIA.
equations
equations
edited Jul 23 at 21:49
Mico
300k32 gold badges411 silver badges816 bronze badges
300k32 gold badges411 silver badges816 bronze badges
asked Jul 23 at 21:42
mf67mf67
653 bronze badges
653 bronze badges
Thanks for all help, but I cannot understand why the ^2 cannot go under thesmash
command in the solution suggested by Mico. The following two examples does not result in the same display:smash(4a)^2
andsmash(4a)^2
(Sorry, did not know how to type in the comment box to get better display of codes.)
– mf67
Jul 24 at 10:31
If you compare the outputs ofsmash(4a)^2
andsmash(4a)^2
, you'll notice that the exponent is placed higher relative to the baseline if the scope ofsmash
includes the exponent -- not by a huge amount, for sure, but by about 1 or 2 points. This difference results in a slight increase in the overall height of the denominator which, in turn, explains why LaTeX sees fit to employ a taller (and deeper) square root symbol when it processessmash(4a)^2
.
– Mico
Jul 24 at 12:31
add a comment |
Thanks for all help, but I cannot understand why the ^2 cannot go under thesmash
command in the solution suggested by Mico. The following two examples does not result in the same display:smash(4a)^2
andsmash(4a)^2
(Sorry, did not know how to type in the comment box to get better display of codes.)
– mf67
Jul 24 at 10:31
If you compare the outputs ofsmash(4a)^2
andsmash(4a)^2
, you'll notice that the exponent is placed higher relative to the baseline if the scope ofsmash
includes the exponent -- not by a huge amount, for sure, but by about 1 or 2 points. This difference results in a slight increase in the overall height of the denominator which, in turn, explains why LaTeX sees fit to employ a taller (and deeper) square root symbol when it processessmash(4a)^2
.
– Mico
Jul 24 at 12:31
Thanks for all help, but I cannot understand why the ^2 cannot go under the
smash
command in the solution suggested by Mico. The following two examples does not result in the same display: smash(4a)^2
and smash(4a)^2
(Sorry, did not know how to type in the comment box to get better display of codes.)– mf67
Jul 24 at 10:31
Thanks for all help, but I cannot understand why the ^2 cannot go under the
smash
command in the solution suggested by Mico. The following two examples does not result in the same display: smash(4a)^2
and smash(4a)^2
(Sorry, did not know how to type in the comment box to get better display of codes.)– mf67
Jul 24 at 10:31
If you compare the outputs of
smash(4a)^2
and smash(4a)^2
, you'll notice that the exponent is placed higher relative to the baseline if the scope of smash
includes the exponent -- not by a huge amount, for sure, but by about 1 or 2 points. This difference results in a slight increase in the overall height of the denominator which, in turn, explains why LaTeX sees fit to employ a taller (and deeper) square root symbol when it processes smash(4a)^2
.– Mico
Jul 24 at 12:31
If you compare the outputs of
smash(4a)^2
and smash(4a)^2
, you'll notice that the exponent is placed higher relative to the baseline if the scope of smash
includes the exponent -- not by a huge amount, for sure, but by about 1 or 2 points. This difference results in a slight increase in the overall height of the denominator which, in turn, explains why LaTeX sees fit to employ a taller (and deeper) square root symbol when it processes smash(4a)^2
.– Mico
Jul 24 at 12:31
add a comment |
3 Answers
3
active
oldest
votes
What you need to do is replace (4a)^2
in the second denominator with either smash(4a)^2
or smash[b](4a)^2
. This yields compact-looking square root terms, and it works with both tfrac
and dfrac
.
Observe that if you, alternatively, replaced 16a^2
in the first denominator with 16a^2mathstrut
, the two square root symbols would also have equal sizes. However, they would be much taller -- excessively and unnecessarily so, IMNSHO -- than with the adjustment suggested above.
documentclassarticle
usepackageamsmath
begindocument
[
sqrtdfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrtdfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
[
sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
enddocument
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
I don't fully understand the effect ofsmash
it seems. I thought thatsmash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than insmash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thoughtsmash(4a)^2
was, would not do that? Thesmash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from thea^2
in the numerator.
– mf67
Jul 24 at 17:12
@mf67 - I don't thinks it's entirely correct to callsmash(4a)^2
a "zero-height box". Please compile[ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which containssmash(4a)^2
, is taller than the other two. It looks like it's necessary tosmash
the term(4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writingsmash(4a)^2
...
– Mico
Jul 24 at 17:47
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactlysmash
works? There are some amazing TeX wizards on this site; they can explain howsmash
works in all gory detail -- and much much better than I ever could.
– Mico
Jul 24 at 17:50
add a comment |
Equalizing radicals is something of a black art.
The difference is due to the right hand side having parentheses. We can cope with this by adding mathstrut
in the left hand side denominator. But this makes TeX choose the next size for the radical. Using smash[b]...
for the denominator doesn't help.
The problem is that tfrac
imposes textstyle
, which has raised denominators. One could use cramped
from mathtools
, but there's a slicker solution:
documentclassarticle
usepackageamsmath
begindocument
[
textstyle
sqrtfrac1+2cdot4a^2+(4a^2)^2mathstrut 16a^2
=sqrtfrac1+2cdot4a^2+(4a^2)^2(4a)^2
]
enddocument
add a comment |
A simple vphantom
will do the trick. And, please, don't use the plain TeX construct $$ ... $$
for unnumbered displayed equations. Use [ ... ]
instead.
documentclass[11pt, a4paper]article
usepackageamsmath
begindocument
[ sqrttfrac1+2cdot4a^2+(4a^2)^2vphantom)16a^2 =sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2 ]
enddocument
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%2f501189%2fcorrect-use-of-smash-with-math-and-root-signs%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
What you need to do is replace (4a)^2
in the second denominator with either smash(4a)^2
or smash[b](4a)^2
. This yields compact-looking square root terms, and it works with both tfrac
and dfrac
.
Observe that if you, alternatively, replaced 16a^2
in the first denominator with 16a^2mathstrut
, the two square root symbols would also have equal sizes. However, they would be much taller -- excessively and unnecessarily so, IMNSHO -- than with the adjustment suggested above.
documentclassarticle
usepackageamsmath
begindocument
[
sqrtdfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrtdfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
[
sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
enddocument
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
I don't fully understand the effect ofsmash
it seems. I thought thatsmash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than insmash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thoughtsmash(4a)^2
was, would not do that? Thesmash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from thea^2
in the numerator.
– mf67
Jul 24 at 17:12
@mf67 - I don't thinks it's entirely correct to callsmash(4a)^2
a "zero-height box". Please compile[ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which containssmash(4a)^2
, is taller than the other two. It looks like it's necessary tosmash
the term(4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writingsmash(4a)^2
...
– Mico
Jul 24 at 17:47
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactlysmash
works? There are some amazing TeX wizards on this site; they can explain howsmash
works in all gory detail -- and much much better than I ever could.
– Mico
Jul 24 at 17:50
add a comment |
What you need to do is replace (4a)^2
in the second denominator with either smash(4a)^2
or smash[b](4a)^2
. This yields compact-looking square root terms, and it works with both tfrac
and dfrac
.
Observe that if you, alternatively, replaced 16a^2
in the first denominator with 16a^2mathstrut
, the two square root symbols would also have equal sizes. However, they would be much taller -- excessively and unnecessarily so, IMNSHO -- than with the adjustment suggested above.
documentclassarticle
usepackageamsmath
begindocument
[
sqrtdfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrtdfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
[
sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
enddocument
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
I don't fully understand the effect ofsmash
it seems. I thought thatsmash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than insmash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thoughtsmash(4a)^2
was, would not do that? Thesmash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from thea^2
in the numerator.
– mf67
Jul 24 at 17:12
@mf67 - I don't thinks it's entirely correct to callsmash(4a)^2
a "zero-height box". Please compile[ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which containssmash(4a)^2
, is taller than the other two. It looks like it's necessary tosmash
the term(4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writingsmash(4a)^2
...
– Mico
Jul 24 at 17:47
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactlysmash
works? There are some amazing TeX wizards on this site; they can explain howsmash
works in all gory detail -- and much much better than I ever could.
– Mico
Jul 24 at 17:50
add a comment |
What you need to do is replace (4a)^2
in the second denominator with either smash(4a)^2
or smash[b](4a)^2
. This yields compact-looking square root terms, and it works with both tfrac
and dfrac
.
Observe that if you, alternatively, replaced 16a^2
in the first denominator with 16a^2mathstrut
, the two square root symbols would also have equal sizes. However, they would be much taller -- excessively and unnecessarily so, IMNSHO -- than with the adjustment suggested above.
documentclassarticle
usepackageamsmath
begindocument
[
sqrtdfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrtdfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
[
sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
enddocument
What you need to do is replace (4a)^2
in the second denominator with either smash(4a)^2
or smash[b](4a)^2
. This yields compact-looking square root terms, and it works with both tfrac
and dfrac
.
Observe that if you, alternatively, replaced 16a^2
in the first denominator with 16a^2mathstrut
, the two square root symbols would also have equal sizes. However, they would be much taller -- excessively and unnecessarily so, IMNSHO -- than with the adjustment suggested above.
documentclassarticle
usepackageamsmath
begindocument
[
sqrtdfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrtdfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
[
sqrttfrac1+2cdot4a^2+(4a^2)^216a^2
=sqrttfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2
]
enddocument
edited Jul 24 at 12:28
answered Jul 23 at 21:57
MicoMico
300k32 gold badges411 silver badges816 bronze badges
300k32 gold badges411 silver badges816 bronze badges
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
I don't fully understand the effect ofsmash
it seems. I thought thatsmash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than insmash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thoughtsmash(4a)^2
was, would not do that? Thesmash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from thea^2
in the numerator.
– mf67
Jul 24 at 17:12
@mf67 - I don't thinks it's entirely correct to callsmash(4a)^2
a "zero-height box". Please compile[ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which containssmash(4a)^2
, is taller than the other two. It looks like it's necessary tosmash
the term(4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writingsmash(4a)^2
...
– Mico
Jul 24 at 17:47
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactlysmash
works? There are some amazing TeX wizards on this site; they can explain howsmash
works in all gory detail -- and much much better than I ever could.
– Mico
Jul 24 at 17:50
add a comment |
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
I don't fully understand the effect ofsmash
it seems. I thought thatsmash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than insmash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thoughtsmash(4a)^2
was, would not do that? Thesmash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from thea^2
in the numerator.
– mf67
Jul 24 at 17:12
@mf67 - I don't thinks it's entirely correct to callsmash(4a)^2
a "zero-height box". Please compile[ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which containssmash(4a)^2
, is taller than the other two. It looks like it's necessary tosmash
the term(4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writingsmash(4a)^2
...
– Mico
Jul 24 at 17:47
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactlysmash
works? There are some amazing TeX wizards on this site; they can explain howsmash
works in all gory detail -- and much much better than I ever could.
– Mico
Jul 24 at 17:50
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
Please see comment in the question, I might have put it in the wrong place… Perhaps it should have been here.
– mf67
Jul 24 at 10:34
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
@mf67 - Please see the comment I left below your follow-up comment. Did I answer your question? Please advise.
– Mico
Jul 24 at 12:35
I don't fully understand the effect of
smash
it seems. I thought that smash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than in smash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thought smash(4a)^2
was, would not do that? The smash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from the a^2
in the numerator.– mf67
Jul 24 at 17:12
I don't fully understand the effect of
smash
it seems. I thought that smash(4a)^2
would remove any height and 'equal' it to, e.g. an "a" or "x" and thus not extend the root sign any deeper. Instead it seems like it, as you write, places the exponent higher, but normal, than in smash(4a)^2
and thus forces down the base and therefore the depth of the root sign. A 0-height box, as I thought smash(4a)^2
was, would not do that? The smash(4a)^2
'compress' the exponent and, although not extremely disturbingly 'ugly', it looks a bit different from the a^2
in the numerator.– mf67
Jul 24 at 17:12
@mf67 - I don't thinks it's entirely correct to call
smash(4a)^2
a "zero-height box". Please compile [ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which contains smash(4a)^2
, is taller than the other two. It looks like it's necessary to smash
the term (4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writing smash(4a)^2
...– Mico
Jul 24 at 17:47
@mf67 - I don't thinks it's entirely correct to call
smash(4a)^2
a "zero-height box". Please compile [ sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smash(4a)^2 = sqrtfrac1+2cdot4a^2+(4a^2)^2smashsmash(4a)^2 ]
. You'll see that the square root term in the middle, which contains smash(4a)^2
, is taller than the other two. It looks like it's necessary to smash
the term (4a)^2
twice in order to obtain the compact square root expression shown on the left. That's why I recommended writing smash(4a)^2
...– Mico
Jul 24 at 17:47
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactly
smash
works? There are some amazing TeX wizards on this site; they can explain how smash
works in all gory detail -- and much much better than I ever could.– Mico
Jul 24 at 17:50
@mf67 - If this topic continues to puzzle you, may I suggest that you post a new query, in which you would ask for an explanation of how exactly
smash
works? There are some amazing TeX wizards on this site; they can explain how smash
works in all gory detail -- and much much better than I ever could.– Mico
Jul 24 at 17:50
add a comment |
Equalizing radicals is something of a black art.
The difference is due to the right hand side having parentheses. We can cope with this by adding mathstrut
in the left hand side denominator. But this makes TeX choose the next size for the radical. Using smash[b]...
for the denominator doesn't help.
The problem is that tfrac
imposes textstyle
, which has raised denominators. One could use cramped
from mathtools
, but there's a slicker solution:
documentclassarticle
usepackageamsmath
begindocument
[
textstyle
sqrtfrac1+2cdot4a^2+(4a^2)^2mathstrut 16a^2
=sqrtfrac1+2cdot4a^2+(4a^2)^2(4a)^2
]
enddocument
add a comment |
Equalizing radicals is something of a black art.
The difference is due to the right hand side having parentheses. We can cope with this by adding mathstrut
in the left hand side denominator. But this makes TeX choose the next size for the radical. Using smash[b]...
for the denominator doesn't help.
The problem is that tfrac
imposes textstyle
, which has raised denominators. One could use cramped
from mathtools
, but there's a slicker solution:
documentclassarticle
usepackageamsmath
begindocument
[
textstyle
sqrtfrac1+2cdot4a^2+(4a^2)^2mathstrut 16a^2
=sqrtfrac1+2cdot4a^2+(4a^2)^2(4a)^2
]
enddocument
add a comment |
Equalizing radicals is something of a black art.
The difference is due to the right hand side having parentheses. We can cope with this by adding mathstrut
in the left hand side denominator. But this makes TeX choose the next size for the radical. Using smash[b]...
for the denominator doesn't help.
The problem is that tfrac
imposes textstyle
, which has raised denominators. One could use cramped
from mathtools
, but there's a slicker solution:
documentclassarticle
usepackageamsmath
begindocument
[
textstyle
sqrtfrac1+2cdot4a^2+(4a^2)^2mathstrut 16a^2
=sqrtfrac1+2cdot4a^2+(4a^2)^2(4a)^2
]
enddocument
Equalizing radicals is something of a black art.
The difference is due to the right hand side having parentheses. We can cope with this by adding mathstrut
in the left hand side denominator. But this makes TeX choose the next size for the radical. Using smash[b]...
for the denominator doesn't help.
The problem is that tfrac
imposes textstyle
, which has raised denominators. One could use cramped
from mathtools
, but there's a slicker solution:
documentclassarticle
usepackageamsmath
begindocument
[
textstyle
sqrtfrac1+2cdot4a^2+(4a^2)^2mathstrut 16a^2
=sqrtfrac1+2cdot4a^2+(4a^2)^2(4a)^2
]
enddocument
answered Jul 23 at 22:32
egregegreg
759k90 gold badges1986 silver badges3332 bronze badges
759k90 gold badges1986 silver badges3332 bronze badges
add a comment |
add a comment |
A simple vphantom
will do the trick. And, please, don't use the plain TeX construct $$ ... $$
for unnumbered displayed equations. Use [ ... ]
instead.
documentclass[11pt, a4paper]article
usepackageamsmath
begindocument
[ sqrttfrac1+2cdot4a^2+(4a^2)^2vphantom)16a^2 =sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2 ]
enddocument
add a comment |
A simple vphantom
will do the trick. And, please, don't use the plain TeX construct $$ ... $$
for unnumbered displayed equations. Use [ ... ]
instead.
documentclass[11pt, a4paper]article
usepackageamsmath
begindocument
[ sqrttfrac1+2cdot4a^2+(4a^2)^2vphantom)16a^2 =sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2 ]
enddocument
add a comment |
A simple vphantom
will do the trick. And, please, don't use the plain TeX construct $$ ... $$
for unnumbered displayed equations. Use [ ... ]
instead.
documentclass[11pt, a4paper]article
usepackageamsmath
begindocument
[ sqrttfrac1+2cdot4a^2+(4a^2)^2vphantom)16a^2 =sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2 ]
enddocument
A simple vphantom
will do the trick. And, please, don't use the plain TeX construct $$ ... $$
for unnumbered displayed equations. Use [ ... ]
instead.
documentclass[11pt, a4paper]article
usepackageamsmath
begindocument
[ sqrttfrac1+2cdot4a^2+(4a^2)^2vphantom)16a^2 =sqrttfrac1+2cdot4a^2+(4a^2)^2(4a)^2 ]
enddocument
edited Jul 24 at 17:59
answered Jul 23 at 21:55
BernardBernard
186k7 gold badges84 silver badges220 bronze badges
186k7 gold badges84 silver badges220 bronze badges
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%2f501189%2fcorrect-use-of-smash-with-math-and-root-signs%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
Thanks for all help, but I cannot understand why the ^2 cannot go under the
smash
command in the solution suggested by Mico. The following two examples does not result in the same display:smash(4a)^2
andsmash(4a)^2
(Sorry, did not know how to type in the comment box to get better display of codes.)– mf67
Jul 24 at 10:31
If you compare the outputs of
smash(4a)^2
andsmash(4a)^2
, you'll notice that the exponent is placed higher relative to the baseline if the scope ofsmash
includes the exponent -- not by a huge amount, for sure, but by about 1 or 2 points. This difference results in a slight increase in the overall height of the denominator which, in turn, explains why LaTeX sees fit to employ a taller (and deeper) square root symbol when it processessmash(4a)^2
.– Mico
Jul 24 at 12:31