Increase the space between numerator and denominator
I have created two fractions (see example below), but the denominator is a little too close to the division bar. Can I change this somehow?
documentclass{article}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
end{document}
fractions
add a comment |
I have created two fractions (see example below), but the denominator is a little too close to the division bar. Can I change this somehow?
documentclass{article}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
end{document}
fractions
2
Usedfracinstead offrac.
– JouleV
10 hours ago
You could add avphantomcommand (for examlevphantom{A^{A^A}}) in the beginning of each problematic dominator, and keep the style as inline math.
– koleygr
10 hours ago
add a comment |
I have created two fractions (see example below), but the denominator is a little too close to the division bar. Can I change this somehow?
documentclass{article}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
end{document}
fractions
I have created two fractions (see example below), but the denominator is a little too close to the division bar. Can I change this somehow?
documentclass{article}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
end{document}
fractions
fractions
asked 10 hours ago
user503842user503842
1086
1086
2
Usedfracinstead offrac.
– JouleV
10 hours ago
You could add avphantomcommand (for examlevphantom{A^{A^A}}) in the beginning of each problematic dominator, and keep the style as inline math.
– koleygr
10 hours ago
add a comment |
2
Usedfracinstead offrac.
– JouleV
10 hours ago
You could add avphantomcommand (for examlevphantom{A^{A^A}}) in the beginning of each problematic dominator, and keep the style as inline math.
– koleygr
10 hours ago
2
2
Use
dfrac instead of frac.– JouleV
10 hours ago
Use
dfrac instead of frac.– JouleV
10 hours ago
You could add a
vphantom command (for examle vphantom{A^{A^A}}) in the beginning of each problematic dominator, and keep the style as inline math.– koleygr
10 hours ago
You could add a
vphantom command (for examle vphantom{A^{A^A}}) in the beginning of each problematic dominator, and keep the style as inline math.– koleygr
10 hours ago
add a comment |
2 Answers
2
active
oldest
votes
You have two main options:
Switch from
frac{...}{...}-notation to inline-fraction notationSwitch to display math to typeset the formulas for
muandsigma^2.

documentclass{article}
usepackage{amsmath} % for "text" macro
begin{document}
noindent
1. OP's original version:
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$.
medskipnoindent
2. Partial switch to inline-math notation
Combining two Gaussians with mean $mu_1, mu_2$ and variance
$sigma_1^2, sigma_2^2$ yields a new Gaussian with mean
$mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$
and variance $sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2}$.
medskipnoindent
3. Full switch to inline math notation
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu = (sigma_2^2 mu_1 + sigma_1^2 mu_2)/(sigma_1^2 +
sigma_2^2)$ and variance $sigma^2 = 1/(1/sigma_1^2 + 1/sigma_2^2)$.
medskipnoindent
4. Switch to display math
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu$ and variance $sigma^2$ given by
[
mu=frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}
quadtext{and}quad
sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2},.
]
end{document}
everymath{displaystyle}would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)
– koleygr
10 hours ago
1
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting adfracexpression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...
– Mico
9 hours ago
1
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
1
went for the last option. Thx, Mico!
– user503842
9 hours ago
add a comment |
Here, I preserve the fraction in its native textstyle, but add a (default) 1pt buffer above and below the numerator and denominator of each fraction, which can be changed with an optional argument. I call it qfrac{}{}. The MWE shows before and after.
documentclass{article}
usepackage{stackengine,scalerel}
stackMath
newcommandqfrac[3][1pt]{frac{%
ThisStyle{addstackgap[#1]{SavedStyle#2}}}{%
ThisStyle{addstackgap[#1]{SavedStyle#3}}%
}}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = qfrac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
qfrac[.5pt]{1}{qfrac{1}{sigma_1^2} + qfrac{1}{sigma_2^2}}$
end{document}

1
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
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%2f478396%2fincrease-the-space-between-numerator-and-denominator%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
You have two main options:
Switch from
frac{...}{...}-notation to inline-fraction notationSwitch to display math to typeset the formulas for
muandsigma^2.

documentclass{article}
usepackage{amsmath} % for "text" macro
begin{document}
noindent
1. OP's original version:
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$.
medskipnoindent
2. Partial switch to inline-math notation
Combining two Gaussians with mean $mu_1, mu_2$ and variance
$sigma_1^2, sigma_2^2$ yields a new Gaussian with mean
$mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$
and variance $sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2}$.
medskipnoindent
3. Full switch to inline math notation
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu = (sigma_2^2 mu_1 + sigma_1^2 mu_2)/(sigma_1^2 +
sigma_2^2)$ and variance $sigma^2 = 1/(1/sigma_1^2 + 1/sigma_2^2)$.
medskipnoindent
4. Switch to display math
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu$ and variance $sigma^2$ given by
[
mu=frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}
quadtext{and}quad
sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2},.
]
end{document}
everymath{displaystyle}would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)
– koleygr
10 hours ago
1
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting adfracexpression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...
– Mico
9 hours ago
1
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
1
went for the last option. Thx, Mico!
– user503842
9 hours ago
add a comment |
You have two main options:
Switch from
frac{...}{...}-notation to inline-fraction notationSwitch to display math to typeset the formulas for
muandsigma^2.

documentclass{article}
usepackage{amsmath} % for "text" macro
begin{document}
noindent
1. OP's original version:
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$.
medskipnoindent
2. Partial switch to inline-math notation
Combining two Gaussians with mean $mu_1, mu_2$ and variance
$sigma_1^2, sigma_2^2$ yields a new Gaussian with mean
$mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$
and variance $sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2}$.
medskipnoindent
3. Full switch to inline math notation
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu = (sigma_2^2 mu_1 + sigma_1^2 mu_2)/(sigma_1^2 +
sigma_2^2)$ and variance $sigma^2 = 1/(1/sigma_1^2 + 1/sigma_2^2)$.
medskipnoindent
4. Switch to display math
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu$ and variance $sigma^2$ given by
[
mu=frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}
quadtext{and}quad
sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2},.
]
end{document}
everymath{displaystyle}would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)
– koleygr
10 hours ago
1
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting adfracexpression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...
– Mico
9 hours ago
1
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
1
went for the last option. Thx, Mico!
– user503842
9 hours ago
add a comment |
You have two main options:
Switch from
frac{...}{...}-notation to inline-fraction notationSwitch to display math to typeset the formulas for
muandsigma^2.

documentclass{article}
usepackage{amsmath} % for "text" macro
begin{document}
noindent
1. OP's original version:
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$.
medskipnoindent
2. Partial switch to inline-math notation
Combining two Gaussians with mean $mu_1, mu_2$ and variance
$sigma_1^2, sigma_2^2$ yields a new Gaussian with mean
$mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$
and variance $sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2}$.
medskipnoindent
3. Full switch to inline math notation
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu = (sigma_2^2 mu_1 + sigma_1^2 mu_2)/(sigma_1^2 +
sigma_2^2)$ and variance $sigma^2 = 1/(1/sigma_1^2 + 1/sigma_2^2)$.
medskipnoindent
4. Switch to display math
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu$ and variance $sigma^2$ given by
[
mu=frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}
quadtext{and}quad
sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2},.
]
end{document}
You have two main options:
Switch from
frac{...}{...}-notation to inline-fraction notationSwitch to display math to typeset the formulas for
muandsigma^2.

documentclass{article}
usepackage{amsmath} % for "text" macro
begin{document}
noindent
1. OP's original version:
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2, sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 = frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$.
medskipnoindent
2. Partial switch to inline-math notation
Combining two Gaussians with mean $mu_1, mu_2$ and variance
$sigma_1^2, sigma_2^2$ yields a new Gaussian with mean
$mu = frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$
and variance $sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2}$.
medskipnoindent
3. Full switch to inline math notation
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu = (sigma_2^2 mu_1 + sigma_1^2 mu_2)/(sigma_1^2 +
sigma_2^2)$ and variance $sigma^2 = 1/(1/sigma_1^2 + 1/sigma_2^2)$.
medskipnoindent
4. Switch to display math
Combining two Gaussians with means $mu_1$ and $mu_2$ and
variances $sigma_1^2$ and $sigma_2^2$ yields a new Gaussian
with mean $mu$ and variance $sigma^2$ given by
[
mu=frac{sigma_2^2 mu_1 + sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}
quadtext{and}quad
sigma^2 = frac{1}{1/sigma_1^2 + 1/sigma_2^2},.
]
end{document}
answered 10 hours ago
MicoMico
282k31385774
282k31385774
everymath{displaystyle}would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)
– koleygr
10 hours ago
1
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting adfracexpression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...
– Mico
9 hours ago
1
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
1
went for the last option. Thx, Mico!
– user503842
9 hours ago
add a comment |
everymath{displaystyle}would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)
– koleygr
10 hours ago
1
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting adfracexpression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...
– Mico
9 hours ago
1
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
1
went for the last option. Thx, Mico!
– user503842
9 hours ago
everymath{displaystyle} would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)– koleygr
10 hours ago
everymath{displaystyle} would be an additional option (Just in case that the document can afford such thing.) Of course I would not use it often, but have used in special cases that looked ok. (+1)– koleygr
10 hours ago
1
1
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting a
dfrac expression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...– Mico
9 hours ago
@koleygr - Unless the paragraph in question is double-spaced (and hence already damaged beyond repair, typographically speaking), typesetting a
dfrac expression in running text must surely be a high crime against all known forms of decent typography. :-) If you doubt this claim, just look at the outputs of Sebastiano's and Steven's solutions...– Mico
9 hours ago
1
1
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
Thanks for the info, I also didn't like these kind of solutions but just added the comment in order to propose a more general answer for every case. But of course you are right!
– koleygr
9 hours ago
1
1
went for the last option. Thx, Mico!
– user503842
9 hours ago
went for the last option. Thx, Mico!
– user503842
9 hours ago
add a comment |
Here, I preserve the fraction in its native textstyle, but add a (default) 1pt buffer above and below the numerator and denominator of each fraction, which can be changed with an optional argument. I call it qfrac{}{}. The MWE shows before and after.
documentclass{article}
usepackage{stackengine,scalerel}
stackMath
newcommandqfrac[3][1pt]{frac{%
ThisStyle{addstackgap[#1]{SavedStyle#2}}}{%
ThisStyle{addstackgap[#1]{SavedStyle#3}}%
}}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = qfrac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
qfrac[.5pt]{1}{qfrac{1}{sigma_1^2} + qfrac{1}{sigma_2^2}}$
end{document}

1
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
add a comment |
Here, I preserve the fraction in its native textstyle, but add a (default) 1pt buffer above and below the numerator and denominator of each fraction, which can be changed with an optional argument. I call it qfrac{}{}. The MWE shows before and after.
documentclass{article}
usepackage{stackengine,scalerel}
stackMath
newcommandqfrac[3][1pt]{frac{%
ThisStyle{addstackgap[#1]{SavedStyle#2}}}{%
ThisStyle{addstackgap[#1]{SavedStyle#3}}%
}}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = qfrac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
qfrac[.5pt]{1}{qfrac{1}{sigma_1^2} + qfrac{1}{sigma_2^2}}$
end{document}

1
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
add a comment |
Here, I preserve the fraction in its native textstyle, but add a (default) 1pt buffer above and below the numerator and denominator of each fraction, which can be changed with an optional argument. I call it qfrac{}{}. The MWE shows before and after.
documentclass{article}
usepackage{stackengine,scalerel}
stackMath
newcommandqfrac[3][1pt]{frac{%
ThisStyle{addstackgap[#1]{SavedStyle#2}}}{%
ThisStyle{addstackgap[#1]{SavedStyle#3}}%
}}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = qfrac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
qfrac[.5pt]{1}{qfrac{1}{sigma_1^2} + qfrac{1}{sigma_2^2}}$
end{document}

Here, I preserve the fraction in its native textstyle, but add a (default) 1pt buffer above and below the numerator and denominator of each fraction, which can be changed with an optional argument. I call it qfrac{}{}. The MWE shows before and after.
documentclass{article}
usepackage{stackengine,scalerel}
stackMath
newcommandqfrac[3][1pt]{frac{%
ThisStyle{addstackgap[#1]{SavedStyle#2}}}{%
ThisStyle{addstackgap[#1]{SavedStyle#3}}%
}}
usepackage{amsmath}
begin{document}
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = frac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
frac{1}{frac{1}{sigma_1^2} + frac{1}{sigma_2^2}}$
Combining two Gaussians with mean $mu_1, mu_2$ and variance $sigma_1^2,
sigma_2^2$ yields a new Gaussian with mean $mu = qfrac{sigma_2^2 mu_1 +
sigma_1^2 mu_2}{sigma_1^2 + sigma_2^2}$ and variance $sigma^2 =
qfrac[.5pt]{1}{qfrac{1}{sigma_1^2} + qfrac{1}{sigma_2^2}}$
end{document}

edited 10 hours ago
answered 10 hours ago
Steven B. SegletesSteven B. Segletes
157k9204411
157k9204411
1
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
add a comment |
1
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
1
1
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
(+1)... I would add your "1pt" inside an extra optional argument of the command.
– koleygr
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
@koleygr Excellent idea. Thanks
– Steven B. Segletes
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
Nice answer... Straightforward to the OP's problem. Welcome.
– koleygr
10 hours ago
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%2f478396%2fincrease-the-space-between-numerator-and-denominator%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
2
Use
dfracinstead offrac.– JouleV
10 hours ago
You could add a
vphantomcommand (for examlevphantom{A^{A^A}}) in the beginning of each problematic dominator, and keep the style as inline math.– koleygr
10 hours ago