Fractions with characters that don't have descenders or ascenders
Clash Royale CLAN TAG#URR8PPP
The default vertical spacing for fractions accommodates the possibility of a character with a descender or an ascender (or the possibility of subscripts/superscripts). This is, for the most part, the desirable functionality. For example, in the code below,
$$fracga=fracac=fracab$$
nothing needs to be changed. However, there is occasion where an expression like the ones below
$$fracac$$
$$fracab$$
$$fracba$$
occurs in isolation where a reduction in the vertical space on either side, or both, seems warranted to balance the fraction.
If I'm going on a final pass through a document, what would be the best approach to remove this vertical space that would be compatible with a change of font?
math-mode spacing
add a comment |
The default vertical spacing for fractions accommodates the possibility of a character with a descender or an ascender (or the possibility of subscripts/superscripts). This is, for the most part, the desirable functionality. For example, in the code below,
$$fracga=fracac=fracab$$
nothing needs to be changed. However, there is occasion where an expression like the ones below
$$fracac$$
$$fracab$$
$$fracba$$
occurs in isolation where a reduction in the vertical space on either side, or both, seems warranted to balance the fraction.
If I'm going on a final pass through a document, what would be the best approach to remove this vertical space that would be compatible with a change of font?
math-mode spacing
Apart from don't: you write your own macro that typesets numerator and denominator inside boxes and measures it, then draw your own version of a fraction that only uses those sizes and nostrut
or similar.
– Skillmon
Jan 21 at 20:21
1
See Why is[
...]
preferable to$$
...$$
?
– Werner
Jan 21 at 21:04
@Werner I excludedamsmath
on purpose.
– Robert Wolfe
Jan 21 at 21:44
add a comment |
The default vertical spacing for fractions accommodates the possibility of a character with a descender or an ascender (or the possibility of subscripts/superscripts). This is, for the most part, the desirable functionality. For example, in the code below,
$$fracga=fracac=fracab$$
nothing needs to be changed. However, there is occasion where an expression like the ones below
$$fracac$$
$$fracab$$
$$fracba$$
occurs in isolation where a reduction in the vertical space on either side, or both, seems warranted to balance the fraction.
If I'm going on a final pass through a document, what would be the best approach to remove this vertical space that would be compatible with a change of font?
math-mode spacing
The default vertical spacing for fractions accommodates the possibility of a character with a descender or an ascender (or the possibility of subscripts/superscripts). This is, for the most part, the desirable functionality. For example, in the code below,
$$fracga=fracac=fracab$$
nothing needs to be changed. However, there is occasion where an expression like the ones below
$$fracac$$
$$fracab$$
$$fracba$$
occurs in isolation where a reduction in the vertical space on either side, or both, seems warranted to balance the fraction.
If I'm going on a final pass through a document, what would be the best approach to remove this vertical space that would be compatible with a change of font?
math-mode spacing
math-mode spacing
asked Jan 21 at 20:06
Robert WolfeRobert Wolfe
14110
14110
Apart from don't: you write your own macro that typesets numerator and denominator inside boxes and measures it, then draw your own version of a fraction that only uses those sizes and nostrut
or similar.
– Skillmon
Jan 21 at 20:21
1
See Why is[
...]
preferable to$$
...$$
?
– Werner
Jan 21 at 21:04
@Werner I excludedamsmath
on purpose.
– Robert Wolfe
Jan 21 at 21:44
add a comment |
Apart from don't: you write your own macro that typesets numerator and denominator inside boxes and measures it, then draw your own version of a fraction that only uses those sizes and nostrut
or similar.
– Skillmon
Jan 21 at 20:21
1
See Why is[
...]
preferable to$$
...$$
?
– Werner
Jan 21 at 21:04
@Werner I excludedamsmath
on purpose.
– Robert Wolfe
Jan 21 at 21:44
Apart from don't: you write your own macro that typesets numerator and denominator inside boxes and measures it, then draw your own version of a fraction that only uses those sizes and no
strut
or similar.– Skillmon
Jan 21 at 20:21
Apart from don't: you write your own macro that typesets numerator and denominator inside boxes and measures it, then draw your own version of a fraction that only uses those sizes and no
strut
or similar.– Skillmon
Jan 21 at 20:21
1
1
See Why is
[
... ]
preferable to $$
... $$
?– Werner
Jan 21 at 21:04
See Why is
[
... ]
preferable to $$
... $$
?– Werner
Jan 21 at 21:04
@Werner I excluded
amsmath
on purpose.– Robert Wolfe
Jan 21 at 21:44
@Werner I excluded
amsmath
on purpose.– Robert Wolfe
Jan 21 at 21:44
add a comment |
2 Answers
2
active
oldest
votes
I'm not sure it's a good idea. Anyhow, here's an implementation that should only be used in displays (fractions in text style or lower are already adjusted).
documentclassarticle
usepackageamsmath
newcommandafrac[2]%
dfracadjustbot#1
adjusttop#2%
makeatletter
newcommandadjustbot[1]%
begingroup
settodepthdimen@$textstyle y$%
raiseboxdimexprdepth-dimen@$m@thtextstyle#1$%
endgroup
newcommandadjusttop[1]%
begingroup
settoheightdimen@$textstyle l$%
raiseboxdimexprdimen@-height$m@thtextstyle#1$%
endgroup
makeatother
begindocument
[
fracabafracabquad
fracacafracacquad
fracbaafracbaquad
fracgaafracga
]
enddocument
add a comment |
documentclassarticle
newcommandmyfrac[2]
fracraisebox-.4ex$#1$raisebox.4ex$#2$
begindocument
$$fracpd=myfracac$$
$$fracpd=myfracab$$
$$fracpd=myfracba$$
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%2f471195%2ffractions-with-characters-that-dont-have-descenders-or-ascenders%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
I'm not sure it's a good idea. Anyhow, here's an implementation that should only be used in displays (fractions in text style or lower are already adjusted).
documentclassarticle
usepackageamsmath
newcommandafrac[2]%
dfracadjustbot#1
adjusttop#2%
makeatletter
newcommandadjustbot[1]%
begingroup
settodepthdimen@$textstyle y$%
raiseboxdimexprdepth-dimen@$m@thtextstyle#1$%
endgroup
newcommandadjusttop[1]%
begingroup
settoheightdimen@$textstyle l$%
raiseboxdimexprdimen@-height$m@thtextstyle#1$%
endgroup
makeatother
begindocument
[
fracabafracabquad
fracacafracacquad
fracbaafracbaquad
fracgaafracga
]
enddocument
add a comment |
I'm not sure it's a good idea. Anyhow, here's an implementation that should only be used in displays (fractions in text style or lower are already adjusted).
documentclassarticle
usepackageamsmath
newcommandafrac[2]%
dfracadjustbot#1
adjusttop#2%
makeatletter
newcommandadjustbot[1]%
begingroup
settodepthdimen@$textstyle y$%
raiseboxdimexprdepth-dimen@$m@thtextstyle#1$%
endgroup
newcommandadjusttop[1]%
begingroup
settoheightdimen@$textstyle l$%
raiseboxdimexprdimen@-height$m@thtextstyle#1$%
endgroup
makeatother
begindocument
[
fracabafracabquad
fracacafracacquad
fracbaafracbaquad
fracgaafracga
]
enddocument
add a comment |
I'm not sure it's a good idea. Anyhow, here's an implementation that should only be used in displays (fractions in text style or lower are already adjusted).
documentclassarticle
usepackageamsmath
newcommandafrac[2]%
dfracadjustbot#1
adjusttop#2%
makeatletter
newcommandadjustbot[1]%
begingroup
settodepthdimen@$textstyle y$%
raiseboxdimexprdepth-dimen@$m@thtextstyle#1$%
endgroup
newcommandadjusttop[1]%
begingroup
settoheightdimen@$textstyle l$%
raiseboxdimexprdimen@-height$m@thtextstyle#1$%
endgroup
makeatother
begindocument
[
fracabafracabquad
fracacafracacquad
fracbaafracbaquad
fracgaafracga
]
enddocument
I'm not sure it's a good idea. Anyhow, here's an implementation that should only be used in displays (fractions in text style or lower are already adjusted).
documentclassarticle
usepackageamsmath
newcommandafrac[2]%
dfracadjustbot#1
adjusttop#2%
makeatletter
newcommandadjustbot[1]%
begingroup
settodepthdimen@$textstyle y$%
raiseboxdimexprdepth-dimen@$m@thtextstyle#1$%
endgroup
newcommandadjusttop[1]%
begingroup
settoheightdimen@$textstyle l$%
raiseboxdimexprdimen@-height$m@thtextstyle#1$%
endgroup
makeatother
begindocument
[
fracabafracabquad
fracacafracacquad
fracbaafracbaquad
fracgaafracga
]
enddocument
answered Jan 21 at 21:52
egregegreg
718k8719043200
718k8719043200
add a comment |
add a comment |
documentclassarticle
newcommandmyfrac[2]
fracraisebox-.4ex$#1$raisebox.4ex$#2$
begindocument
$$fracpd=myfracac$$
$$fracpd=myfracab$$
$$fracpd=myfracba$$
enddocument
add a comment |
documentclassarticle
newcommandmyfrac[2]
fracraisebox-.4ex$#1$raisebox.4ex$#2$
begindocument
$$fracpd=myfracac$$
$$fracpd=myfracab$$
$$fracpd=myfracba$$
enddocument
add a comment |
documentclassarticle
newcommandmyfrac[2]
fracraisebox-.4ex$#1$raisebox.4ex$#2$
begindocument
$$fracpd=myfracac$$
$$fracpd=myfracab$$
$$fracpd=myfracba$$
enddocument
documentclassarticle
newcommandmyfrac[2]
fracraisebox-.4ex$#1$raisebox.4ex$#2$
begindocument
$$fracpd=myfracac$$
$$fracpd=myfracab$$
$$fracpd=myfracba$$
enddocument
answered Jan 21 at 20:52
user4686
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%2f471195%2ffractions-with-characters-that-dont-have-descenders-or-ascenders%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
Apart from don't: you write your own macro that typesets numerator and denominator inside boxes and measures it, then draw your own version of a fraction that only uses those sizes and no
strut
or similar.– Skillmon
Jan 21 at 20:21
1
See Why is
[
...]
preferable to$$
...$$
?– Werner
Jan 21 at 21:04
@Werner I excluded
amsmath
on purpose.– Robert Wolfe
Jan 21 at 21:44