Underbrace in equation makes expression a bit too big











up vote
6
down vote

favorite












I have an expression with an underbrace, where the parenthesis and a second partial devirative gets a little to big.



Here is the code:



begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{1 - left(frac{lambda}{n} right)^2 underbrace{frac{partial^2 n}{partial lambda^2}}_{=0}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
end{fleqn}


and here the result:



enter image description here



How can I adjust the code so that the second order partial derivative is as big as the term over the fraction line?










share|improve this question




















  • 1




    Welcome to TeX.SX! The simplest would be removing the big parentheses which are redundant. But also the underbrace needs a fix.
    – egreg
    Nov 4 at 14:31















up vote
6
down vote

favorite












I have an expression with an underbrace, where the parenthesis and a second partial devirative gets a little to big.



Here is the code:



begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{1 - left(frac{lambda}{n} right)^2 underbrace{frac{partial^2 n}{partial lambda^2}}_{=0}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
end{fleqn}


and here the result:



enter image description here



How can I adjust the code so that the second order partial derivative is as big as the term over the fraction line?










share|improve this question




















  • 1




    Welcome to TeX.SX! The simplest would be removing the big parentheses which are redundant. But also the underbrace needs a fix.
    – egreg
    Nov 4 at 14:31













up vote
6
down vote

favorite









up vote
6
down vote

favorite











I have an expression with an underbrace, where the parenthesis and a second partial devirative gets a little to big.



Here is the code:



begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{1 - left(frac{lambda}{n} right)^2 underbrace{frac{partial^2 n}{partial lambda^2}}_{=0}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
end{fleqn}


and here the result:



enter image description here



How can I adjust the code so that the second order partial derivative is as big as the term over the fraction line?










share|improve this question















I have an expression with an underbrace, where the parenthesis and a second partial devirative gets a little to big.



Here is the code:



begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{1 - left(frac{lambda}{n} right)^2 underbrace{frac{partial^2 n}{partial lambda^2}}_{=0}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
end{fleqn}


and here the result:



enter image description here



How can I adjust the code so that the second order partial derivative is as big as the term over the fraction line?







underbrace






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 4 at 14:55









CarLaTeX

27k445118




27k445118










asked Nov 4 at 14:28









astronerd

312




312








  • 1




    Welcome to TeX.SX! The simplest would be removing the big parentheses which are redundant. But also the underbrace needs a fix.
    – egreg
    Nov 4 at 14:31














  • 1




    Welcome to TeX.SX! The simplest would be removing the big parentheses which are redundant. But also the underbrace needs a fix.
    – egreg
    Nov 4 at 14:31








1




1




Welcome to TeX.SX! The simplest would be removing the big parentheses which are redundant. But also the underbrace needs a fix.
– egreg
Nov 4 at 14:31




Welcome to TeX.SX! The simplest would be removing the big parentheses which are redundant. But also the underbrace needs a fix.
– egreg
Nov 4 at 14:31










3 Answers
3






active

oldest

votes

















up vote
5
down vote













I would simply omit those redundant parentheses. And most certainly fix the size of the underbrace object.



It's also possible (but requires a phantom) to have the right size for the parentheses:



documentclass{article}
usepackage{amsmath}

makeatletter
newcommand{fixedunderbrace}[2]{{mathpalettefixed@underbrace{{#1}{#2}}}}
newcommand{fixed@underbrace}[2]{fixed@@underbrace#1#2}
newcommand{fixed@@underbrace}[3]{underbrace{#1#2}_{#3}}
makeatother

begin{document}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
left(
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
smash[b]{fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}}
right)
vphantom{
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

end{document}


enter image description here






share|improve this answer





















  • With mathlap or something like that command is also possible?
    – manooooh
    Nov 4 at 14:51






  • 1




    @manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
    – egreg
    Nov 4 at 14:57












  • @egreg Thank you very much! <3 <3
    – astronerd
    Nov 4 at 15:22


















up vote
3
down vote













Some suggestions (the first two of which have already been made by @egreg):




  • Omit the large parentheses entirely -- they seem to satisfy no useful purpose.


  • Use tfrac (or textstylefrac) instead of frac in the first argument of underbrace. (By default, the first argument of underbrace is processed in display-style math mode. However, the remainder of the denominator is processed in text style, not display style. That's why it's necessary to write tfrac instead of just frac.)


  • Omit all cdot directives. They achieve little but clutter up the appearance of the equation.


  • For better horizontal spacing as well as for more typographically-appropriate sizing of the parentheses in the final part of the equation, use Bigl( and Bigr) instead of left( and right).



enter image description here



documentclass{article}
usepackage{amsmath} % for "tfrac" macro
begin{document}
[
frac{1}{v_G}
= frac{1}{v_{ph}}
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{%
1 - bigl(frac{lambda}{n} bigr)^{!2} !
underbrace{tfrac{partial^2 n}{partiallambda^2}}_{=0}}
= frac{1}{v_{ph}} Bigl( 1 - frac{lambda}{n}
frac{partial n}{partial lambda} Bigr)
]
end{document}





share|improve this answer





















  • Thanks for your answer!
    – astronerd
    Nov 4 at 15:22


















up vote
2
down vote













You can either use the cfrac command to have all fractions in display style, or tfrac for the underbraced partial derivative. I don't like such a discrepancy between these two sizes in the same formula, so I suggest using the medium size commands from nccmath (~80% of displaystyle). I give an example of both, with some spacing improvements, and in the second example, the use ofthe esdiff package to simpify typing of partial derivatives:



documentclass{article}

usepackage{amsmath, nccmath}
usepackage{esdiff}
usepackage{bigstrut}

begin{document}

begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - cfrac{lambda}{nbigstrut[b]} cfrac{partial n}{partial lambda}}{1 - biggl(cfrac{lambda}{n} biggr)^{mkern-5mu 2} smash[b]{underbrace{cfrac{partial^2 n}{partial lambda^2}}_{=0}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
bigskip

begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - medmath{frac{lambda}{nbigstrut[b]} diffp{n}{lambda}}}{1 - medmath{ left(frac{lambda}{n} right)^{mkern-5mu 2} smash[b]{underbrace{diffp[2]{n}{lambda}}_{=0}}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} diffp{n}{lambda} right)
end{align*}
end{fleqn}

end{document}


enter image description here






share|improve this answer





















  • @Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
    – astronerd
    Nov 4 at 15:28











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


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458332%2funderbrace-in-equation-makes-expression-a-bit-too-big%23new-answer', 'question_page');
}
);

Post as a guest
































3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote













I would simply omit those redundant parentheses. And most certainly fix the size of the underbrace object.



It's also possible (but requires a phantom) to have the right size for the parentheses:



documentclass{article}
usepackage{amsmath}

makeatletter
newcommand{fixedunderbrace}[2]{{mathpalettefixed@underbrace{{#1}{#2}}}}
newcommand{fixed@underbrace}[2]{fixed@@underbrace#1#2}
newcommand{fixed@@underbrace}[3]{underbrace{#1#2}_{#3}}
makeatother

begin{document}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
left(
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
smash[b]{fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}}
right)
vphantom{
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

end{document}


enter image description here






share|improve this answer





















  • With mathlap or something like that command is also possible?
    – manooooh
    Nov 4 at 14:51






  • 1




    @manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
    – egreg
    Nov 4 at 14:57












  • @egreg Thank you very much! <3 <3
    – astronerd
    Nov 4 at 15:22















up vote
5
down vote













I would simply omit those redundant parentheses. And most certainly fix the size of the underbrace object.



It's also possible (but requires a phantom) to have the right size for the parentheses:



documentclass{article}
usepackage{amsmath}

makeatletter
newcommand{fixedunderbrace}[2]{{mathpalettefixed@underbrace{{#1}{#2}}}}
newcommand{fixed@underbrace}[2]{fixed@@underbrace#1#2}
newcommand{fixed@@underbrace}[3]{underbrace{#1#2}_{#3}}
makeatother

begin{document}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
left(
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
smash[b]{fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}}
right)
vphantom{
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

end{document}


enter image description here






share|improve this answer





















  • With mathlap or something like that command is also possible?
    – manooooh
    Nov 4 at 14:51






  • 1




    @manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
    – egreg
    Nov 4 at 14:57












  • @egreg Thank you very much! <3 <3
    – astronerd
    Nov 4 at 15:22













up vote
5
down vote










up vote
5
down vote









I would simply omit those redundant parentheses. And most certainly fix the size of the underbrace object.



It's also possible (but requires a phantom) to have the right size for the parentheses:



documentclass{article}
usepackage{amsmath}

makeatletter
newcommand{fixedunderbrace}[2]{{mathpalettefixed@underbrace{{#1}{#2}}}}
newcommand{fixed@underbrace}[2]{fixed@@underbrace#1#2}
newcommand{fixed@@underbrace}[3]{underbrace{#1#2}_{#3}}
makeatother

begin{document}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
left(
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
smash[b]{fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}}
right)
vphantom{
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

end{document}


enter image description here






share|improve this answer












I would simply omit those redundant parentheses. And most certainly fix the size of the underbrace object.



It's also possible (but requires a phantom) to have the right size for the parentheses:



documentclass{article}
usepackage{amsmath}

makeatletter
newcommand{fixedunderbrace}[2]{{mathpalettefixed@underbrace{{#1}{#2}}}}
newcommand{fixed@underbrace}[2]{fixed@@underbrace#1#2}
newcommand{fixed@@underbrace}[3]{underbrace{#1#2}_{#3}}
makeatother

begin{document}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

begin{equation*}
frac{1}{v_G} =
frac{1}{v_{ph}} cdot
left(
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
smash[b]{fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}}
right)
vphantom{
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}
{1 - left(frac{lambda}{n} right)^2
fixedunderbrace{frac{partial^2 n}{partial lambda^2}}{=0}}
}
= frac{1}{v_{ph}} cdot
left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{equation*}

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 4 at 14:48









egreg

696k8518483111




696k8518483111












  • With mathlap or something like that command is also possible?
    – manooooh
    Nov 4 at 14:51






  • 1




    @manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
    – egreg
    Nov 4 at 14:57












  • @egreg Thank you very much! <3 <3
    – astronerd
    Nov 4 at 15:22


















  • With mathlap or something like that command is also possible?
    – manooooh
    Nov 4 at 14:51






  • 1




    @manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
    – egreg
    Nov 4 at 14:57












  • @egreg Thank you very much! <3 <3
    – astronerd
    Nov 4 at 15:22
















With mathlap or something like that command is also possible?
– manooooh
Nov 4 at 14:51




With mathlap or something like that command is also possible?
– manooooh
Nov 4 at 14:51




1




1




@manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
– egreg
Nov 4 at 14:57






@manooooh No, math[r|c|l]lap is for hiding horizontal lengths; for hiding a vertical length one needs smash; however, the real height has to be reinforced later or the vertical spacing would break (the line below the display would be too near, in this case).
– egreg
Nov 4 at 14:57














@egreg Thank you very much! <3 <3
– astronerd
Nov 4 at 15:22




@egreg Thank you very much! <3 <3
– astronerd
Nov 4 at 15:22










up vote
3
down vote













Some suggestions (the first two of which have already been made by @egreg):




  • Omit the large parentheses entirely -- they seem to satisfy no useful purpose.


  • Use tfrac (or textstylefrac) instead of frac in the first argument of underbrace. (By default, the first argument of underbrace is processed in display-style math mode. However, the remainder of the denominator is processed in text style, not display style. That's why it's necessary to write tfrac instead of just frac.)


  • Omit all cdot directives. They achieve little but clutter up the appearance of the equation.


  • For better horizontal spacing as well as for more typographically-appropriate sizing of the parentheses in the final part of the equation, use Bigl( and Bigr) instead of left( and right).



enter image description here



documentclass{article}
usepackage{amsmath} % for "tfrac" macro
begin{document}
[
frac{1}{v_G}
= frac{1}{v_{ph}}
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{%
1 - bigl(frac{lambda}{n} bigr)^{!2} !
underbrace{tfrac{partial^2 n}{partiallambda^2}}_{=0}}
= frac{1}{v_{ph}} Bigl( 1 - frac{lambda}{n}
frac{partial n}{partial lambda} Bigr)
]
end{document}





share|improve this answer





















  • Thanks for your answer!
    – astronerd
    Nov 4 at 15:22















up vote
3
down vote













Some suggestions (the first two of which have already been made by @egreg):




  • Omit the large parentheses entirely -- they seem to satisfy no useful purpose.


  • Use tfrac (or textstylefrac) instead of frac in the first argument of underbrace. (By default, the first argument of underbrace is processed in display-style math mode. However, the remainder of the denominator is processed in text style, not display style. That's why it's necessary to write tfrac instead of just frac.)


  • Omit all cdot directives. They achieve little but clutter up the appearance of the equation.


  • For better horizontal spacing as well as for more typographically-appropriate sizing of the parentheses in the final part of the equation, use Bigl( and Bigr) instead of left( and right).



enter image description here



documentclass{article}
usepackage{amsmath} % for "tfrac" macro
begin{document}
[
frac{1}{v_G}
= frac{1}{v_{ph}}
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{%
1 - bigl(frac{lambda}{n} bigr)^{!2} !
underbrace{tfrac{partial^2 n}{partiallambda^2}}_{=0}}
= frac{1}{v_{ph}} Bigl( 1 - frac{lambda}{n}
frac{partial n}{partial lambda} Bigr)
]
end{document}





share|improve this answer





















  • Thanks for your answer!
    – astronerd
    Nov 4 at 15:22













up vote
3
down vote










up vote
3
down vote









Some suggestions (the first two of which have already been made by @egreg):




  • Omit the large parentheses entirely -- they seem to satisfy no useful purpose.


  • Use tfrac (or textstylefrac) instead of frac in the first argument of underbrace. (By default, the first argument of underbrace is processed in display-style math mode. However, the remainder of the denominator is processed in text style, not display style. That's why it's necessary to write tfrac instead of just frac.)


  • Omit all cdot directives. They achieve little but clutter up the appearance of the equation.


  • For better horizontal spacing as well as for more typographically-appropriate sizing of the parentheses in the final part of the equation, use Bigl( and Bigr) instead of left( and right).



enter image description here



documentclass{article}
usepackage{amsmath} % for "tfrac" macro
begin{document}
[
frac{1}{v_G}
= frac{1}{v_{ph}}
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{%
1 - bigl(frac{lambda}{n} bigr)^{!2} !
underbrace{tfrac{partial^2 n}{partiallambda^2}}_{=0}}
= frac{1}{v_{ph}} Bigl( 1 - frac{lambda}{n}
frac{partial n}{partial lambda} Bigr)
]
end{document}





share|improve this answer












Some suggestions (the first two of which have already been made by @egreg):




  • Omit the large parentheses entirely -- they seem to satisfy no useful purpose.


  • Use tfrac (or textstylefrac) instead of frac in the first argument of underbrace. (By default, the first argument of underbrace is processed in display-style math mode. However, the remainder of the denominator is processed in text style, not display style. That's why it's necessary to write tfrac instead of just frac.)


  • Omit all cdot directives. They achieve little but clutter up the appearance of the equation.


  • For better horizontal spacing as well as for more typographically-appropriate sizing of the parentheses in the final part of the equation, use Bigl( and Bigr) instead of left( and right).



enter image description here



documentclass{article}
usepackage{amsmath} % for "tfrac" macro
begin{document}
[
frac{1}{v_G}
= frac{1}{v_{ph}}
frac{1 - frac{lambda}{n} frac{partial n}{partial lambda}}{%
1 - bigl(frac{lambda}{n} bigr)^{!2} !
underbrace{tfrac{partial^2 n}{partiallambda^2}}_{=0}}
= frac{1}{v_{ph}} Bigl( 1 - frac{lambda}{n}
frac{partial n}{partial lambda} Bigr)
]
end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 4 at 14:52









Mico

268k30362747




268k30362747












  • Thanks for your answer!
    – astronerd
    Nov 4 at 15:22


















  • Thanks for your answer!
    – astronerd
    Nov 4 at 15:22
















Thanks for your answer!
– astronerd
Nov 4 at 15:22




Thanks for your answer!
– astronerd
Nov 4 at 15:22










up vote
2
down vote













You can either use the cfrac command to have all fractions in display style, or tfrac for the underbraced partial derivative. I don't like such a discrepancy between these two sizes in the same formula, so I suggest using the medium size commands from nccmath (~80% of displaystyle). I give an example of both, with some spacing improvements, and in the second example, the use ofthe esdiff package to simpify typing of partial derivatives:



documentclass{article}

usepackage{amsmath, nccmath}
usepackage{esdiff}
usepackage{bigstrut}

begin{document}

begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - cfrac{lambda}{nbigstrut[b]} cfrac{partial n}{partial lambda}}{1 - biggl(cfrac{lambda}{n} biggr)^{mkern-5mu 2} smash[b]{underbrace{cfrac{partial^2 n}{partial lambda^2}}_{=0}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
bigskip

begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - medmath{frac{lambda}{nbigstrut[b]} diffp{n}{lambda}}}{1 - medmath{ left(frac{lambda}{n} right)^{mkern-5mu 2} smash[b]{underbrace{diffp[2]{n}{lambda}}_{=0}}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} diffp{n}{lambda} right)
end{align*}
end{fleqn}

end{document}


enter image description here






share|improve this answer





















  • @Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
    – astronerd
    Nov 4 at 15:28















up vote
2
down vote













You can either use the cfrac command to have all fractions in display style, or tfrac for the underbraced partial derivative. I don't like such a discrepancy between these two sizes in the same formula, so I suggest using the medium size commands from nccmath (~80% of displaystyle). I give an example of both, with some spacing improvements, and in the second example, the use ofthe esdiff package to simpify typing of partial derivatives:



documentclass{article}

usepackage{amsmath, nccmath}
usepackage{esdiff}
usepackage{bigstrut}

begin{document}

begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - cfrac{lambda}{nbigstrut[b]} cfrac{partial n}{partial lambda}}{1 - biggl(cfrac{lambda}{n} biggr)^{mkern-5mu 2} smash[b]{underbrace{cfrac{partial^2 n}{partial lambda^2}}_{=0}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
bigskip

begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - medmath{frac{lambda}{nbigstrut[b]} diffp{n}{lambda}}}{1 - medmath{ left(frac{lambda}{n} right)^{mkern-5mu 2} smash[b]{underbrace{diffp[2]{n}{lambda}}_{=0}}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} diffp{n}{lambda} right)
end{align*}
end{fleqn}

end{document}


enter image description here






share|improve this answer





















  • @Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
    – astronerd
    Nov 4 at 15:28













up vote
2
down vote










up vote
2
down vote









You can either use the cfrac command to have all fractions in display style, or tfrac for the underbraced partial derivative. I don't like such a discrepancy between these two sizes in the same formula, so I suggest using the medium size commands from nccmath (~80% of displaystyle). I give an example of both, with some spacing improvements, and in the second example, the use ofthe esdiff package to simpify typing of partial derivatives:



documentclass{article}

usepackage{amsmath, nccmath}
usepackage{esdiff}
usepackage{bigstrut}

begin{document}

begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - cfrac{lambda}{nbigstrut[b]} cfrac{partial n}{partial lambda}}{1 - biggl(cfrac{lambda}{n} biggr)^{mkern-5mu 2} smash[b]{underbrace{cfrac{partial^2 n}{partial lambda^2}}_{=0}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
bigskip

begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - medmath{frac{lambda}{nbigstrut[b]} diffp{n}{lambda}}}{1 - medmath{ left(frac{lambda}{n} right)^{mkern-5mu 2} smash[b]{underbrace{diffp[2]{n}{lambda}}_{=0}}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} diffp{n}{lambda} right)
end{align*}
end{fleqn}

end{document}


enter image description here






share|improve this answer












You can either use the cfrac command to have all fractions in display style, or tfrac for the underbraced partial derivative. I don't like such a discrepancy between these two sizes in the same formula, so I suggest using the medium size commands from nccmath (~80% of displaystyle). I give an example of both, with some spacing improvements, and in the second example, the use ofthe esdiff package to simpify typing of partial derivatives:



documentclass{article}

usepackage{amsmath, nccmath}
usepackage{esdiff}
usepackage{bigstrut}

begin{document}

begin{fleqn}
begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - cfrac{lambda}{nbigstrut[b]} cfrac{partial n}{partial lambda}}{1 - biggl(cfrac{lambda}{n} biggr)^{mkern-5mu 2} smash[b]{underbrace{cfrac{partial^2 n}{partial lambda^2}}_{=0}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} frac{partial n}{partial lambda} right)
end{align*}
bigskip

begin{align*}
frac{1}{v_G} = frac{1}{v_{ph}} cdot left(frac{1 - medmath{frac{lambda}{nbigstrut[b]} diffp{n}{lambda}}}{1 - medmath{ left(frac{lambda}{n} right)^{mkern-5mu 2} smash[b]{underbrace{diffp[2]{n}{lambda}}_{=0}}}} right) = frac{1}{v_{ph}} cdot left( 1 - frac{lambda}{n} diffp{n}{lambda} right)
end{align*}
end{fleqn}

end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 4 at 15:21









Bernard

161k767192




161k767192












  • @Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
    – astronerd
    Nov 4 at 15:28


















  • @Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
    – astronerd
    Nov 4 at 15:28
















@Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
– astronerd
Nov 4 at 15:28




@Bernhard Thank you very much! Your solution seems to be very compact. In future, I will use the usepackage{esdiff} :)
– astronerd
Nov 4 at 15:28


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f458332%2funderbrace-in-equation-makes-expression-a-bit-too-big%23new-answer', 'question_page');
}
);

Post as a guest




















































































這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()