Fractional alignment The 2019 Stack Overflow Developer Survey Results Are Incommath and ifinnerHow to keep alignment consistent with non-LaTeX contents?Suggestions for splitting a large fractional equation?Nicer alignment of x^*/2How to change horizontal alignment of frac?How to change horizontal alignment for frac?Display fractional formula nicelyFormatting a fractional exponent in display mathUsing braces with equations - how to make fractional terms 'bigger'Alignment of fractions of the form (a-b)/(c-d)Equation alignment between columns
Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?
Button changing its text & action. Good or terrible?
Is bread bad for ducks?
Is it possible for absolutely everyone to attain enlightenment?
Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?
What to do when moving next to a bird sanctuary with a loosely-domesticated cat?
Why “相同意思的词” is called “同义词” instead of "同意词"?
Keeping a retro style to sci-fi spaceships?
Is it safe to harvest rainwater that fell on solar panels?
What's the name of these plastic connectors
What do hard-Brexiteers want with respect to the Irish border?
Are spiders unable to hurt humans, especially very small spiders?
How do I free up internal storage if I don't have any apps downloaded?
What is this sharp, curved notch on my knife for?
Can there be female White Walkers?
Kerning for subscripts of sigma?
Correct punctuation for showing a character's confusion
Are turbopumps lubricated?
For what reasons would an animal species NOT cross a *horizontal* land bridge?
Did any laptop computers have a built-in 5 1/4 inch floppy drive?
Why isn't the circumferential light around the M87 black hole's event horizon symmetric?
How to charge AirPods to keep battery healthy?
What is this business jet?
Why doesn't shell automatically fix "useless use of cat"?
Fractional alignment
The 2019 Stack Overflow Developer Survey Results Are Incommath and ifinnerHow to keep alignment consistent with non-LaTeX contents?Suggestions for splitting a large fractional equation?Nicer alignment of x^*/2How to change horizontal alignment of frac?How to change horizontal alignment for frac?Display fractional formula nicelyFormatting a fractional exponent in display mathUsing braces with equations - how to make fractional terms 'bigger'Alignment of fractions of the form (a-b)/(c-d)Equation alignment between columns
So I have this basic code:
But the fractional alignment looks awful, any tips to fix this?
documentclass[11pt, a4paper]report
usepackagebm
usepackageamsfonts, graphicx, verbatim, amsmath,amssymb, amsthm, mathrsfs, eufrak
usepackagecolor
usepackagearray
usepackagesetspace% if you must (for double spacing thesis)
usepackagefancyhdr
usepackageenumitem
usepackagetikz
usepackageparskip
usepackagelipsum
usepackagefloatrow
usepackagecommath
providecommandU[1]protectrule.1in.1in
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity, the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
as you notice, it looks awful.
fractions commath
|
show 3 more comments
So I have this basic code:
But the fractional alignment looks awful, any tips to fix this?
documentclass[11pt, a4paper]report
usepackagebm
usepackageamsfonts, graphicx, verbatim, amsmath,amssymb, amsthm, mathrsfs, eufrak
usepackagecolor
usepackagearray
usepackagesetspace% if you must (for double spacing thesis)
usepackagefancyhdr
usepackageenumitem
usepackagetikz
usepackageparskip
usepackagelipsum
usepackagefloatrow
usepackagecommath
providecommandU[1]protectrule.1in.1in
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity, the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
as you notice, it looks awful.
fractions commath
I mean, can the |G| be pushed a little to the right? since the vertical "bars" and not aligned with the horizontal fractional line?
– Maths
2 days ago
1
You can always add space to it:,abs G.
– JouleV
2 days ago
1
Hmm, I don't think it deserves closure. This is a good question and my solution is only a workaround - it is not 100% centered. Maybe some TeXperts out there will provide a good answer.
– JouleV
2 days ago
1
@JouleV I agree, the question shouldn't be closed. It's definitely a bug (feature?) incommath.
– campa
2 days ago
1
See tex.stackexchange.com/a/135985/4427, if you really want to usecommathmacros.
– egreg
2 days ago
|
show 3 more comments
So I have this basic code:
But the fractional alignment looks awful, any tips to fix this?
documentclass[11pt, a4paper]report
usepackagebm
usepackageamsfonts, graphicx, verbatim, amsmath,amssymb, amsthm, mathrsfs, eufrak
usepackagecolor
usepackagearray
usepackagesetspace% if you must (for double spacing thesis)
usepackagefancyhdr
usepackageenumitem
usepackagetikz
usepackageparskip
usepackagelipsum
usepackagefloatrow
usepackagecommath
providecommandU[1]protectrule.1in.1in
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity, the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
as you notice, it looks awful.
fractions commath
So I have this basic code:
But the fractional alignment looks awful, any tips to fix this?
documentclass[11pt, a4paper]report
usepackagebm
usepackageamsfonts, graphicx, verbatim, amsmath,amssymb, amsthm, mathrsfs, eufrak
usepackagecolor
usepackagearray
usepackagesetspace% if you must (for double spacing thesis)
usepackagefancyhdr
usepackageenumitem
usepackagetikz
usepackageparskip
usepackagelipsum
usepackagefloatrow
usepackagecommath
providecommandU[1]protectrule.1in.1in
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity, the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
as you notice, it looks awful.
fractions commath
fractions commath
edited 2 days ago
Mico
286k32391779
286k32391779
asked 2 days ago
MathsMaths
44311
44311
I mean, can the |G| be pushed a little to the right? since the vertical "bars" and not aligned with the horizontal fractional line?
– Maths
2 days ago
1
You can always add space to it:,abs G.
– JouleV
2 days ago
1
Hmm, I don't think it deserves closure. This is a good question and my solution is only a workaround - it is not 100% centered. Maybe some TeXperts out there will provide a good answer.
– JouleV
2 days ago
1
@JouleV I agree, the question shouldn't be closed. It's definitely a bug (feature?) incommath.
– campa
2 days ago
1
See tex.stackexchange.com/a/135985/4427, if you really want to usecommathmacros.
– egreg
2 days ago
|
show 3 more comments
I mean, can the |G| be pushed a little to the right? since the vertical "bars" and not aligned with the horizontal fractional line?
– Maths
2 days ago
1
You can always add space to it:,abs G.
– JouleV
2 days ago
1
Hmm, I don't think it deserves closure. This is a good question and my solution is only a workaround - it is not 100% centered. Maybe some TeXperts out there will provide a good answer.
– JouleV
2 days ago
1
@JouleV I agree, the question shouldn't be closed. It's definitely a bug (feature?) incommath.
– campa
2 days ago
1
See tex.stackexchange.com/a/135985/4427, if you really want to usecommathmacros.
– egreg
2 days ago
I mean, can the |G| be pushed a little to the right? since the vertical "bars" and not aligned with the horizontal fractional line?
– Maths
2 days ago
I mean, can the |G| be pushed a little to the right? since the vertical "bars" and not aligned with the horizontal fractional line?
– Maths
2 days ago
1
1
You can always add space to it:
,abs G.– JouleV
2 days ago
You can always add space to it:
,abs G.– JouleV
2 days ago
1
1
Hmm, I don't think it deserves closure. This is a good question and my solution is only a workaround - it is not 100% centered. Maybe some TeXperts out there will provide a good answer.
– JouleV
2 days ago
Hmm, I don't think it deserves closure. This is a good question and my solution is only a workaround - it is not 100% centered. Maybe some TeXperts out there will provide a good answer.
– JouleV
2 days ago
1
1
@JouleV I agree, the question shouldn't be closed. It's definitely a bug (feature?) in
commath.– campa
2 days ago
@JouleV I agree, the question shouldn't be closed. It's definitely a bug (feature?) in
commath.– campa
2 days ago
1
1
See tex.stackexchange.com/a/135985/4427, if you really want to use
commath macros.– egreg
2 days ago
See tex.stackexchange.com/a/135985/4427, if you really want to use
commath macros.– egreg
2 days ago
|
show 3 more comments
2 Answers
2
active
oldest
votes
The commath package provides a highly questionable implementation of abs. Don't load this package unless you absolutely have to. (Aside: You do not have to for the example at hand.)
Instead of loading this package, I suggest you
load the
mathtoolspackage instead of theamsmathpackage. Themathtoolspackage is, for all intents and purposes, a superset of theamsmathpackage; andissue the instruction
DeclarePairedDelimiterabslvertrvertin the preamble. This sets up a proper implementation of
abs.... If you need to auto-size the vertical bars, simply useabs*....
*Addendum": More about how commath implements envert (abs is just an alias for envert): If envert<arg> is invoked without an optional sizing argument (a whole number between 0 and 4), the following code gets executed:
!leftlvert#2rightrvert
It's the ! ("negative thinspace") instruction that messes up the symmetry of the full expression. Either write abs[0]<arg> to execute lvert#2rvert or, more safely, don't load commath at all and go for a cleaner definition of abs. The definitions of abs[1]... thru abs[4]... are also messed up, by the way, as are the definitions of norm and norm[1] thru norm]4]. While it's possible, in principle, to correct the faulty definitions of envert, abs, enVert, and norm, one is better off going for a setup that avoids these complications...
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
1
@Maths - Themathtoolspackage automatically loads theamsmathpackage, while taking great care not to mess with the operational details of the macros.
– Mico
2 days ago
add a comment |
Compare the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
usepackagecommath
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument

with the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
makeatletter
% begin definitions for a "better commath"
newcommanddifmathop!mathrmd
newcommandDifmathop!mathrmD
newcommandspx[1]%
ifrelaxdetokenize#1relax
expandafter@gobble
else
expandafter@firstofone
fi
^#1%
newcommandpd[3][]fracpartialspx#1#2partial#3spx#1
newcommandtpd[3][]tfracpartialspx#1#2partial#3spx#1
newcommanddpd[3][]dfracpartialspx#1#2partial#3spx#1
newcommandmd[6]fracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandtmd[6]tfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommanddmd[6]dfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandod[3][]fracdifspx#1#2dif#3spx#1
newcommandtod[3][]tfracdifspx#1#2dif#3spx#1
newcommanddod[3][]dfracdifspx#1#2dif#3spx#1
newcommandgenericdel[4]%
ifcase#3relax
ifx#1.else#1fi#4ifx#2.else#2fior
bigl#1#4bigr#2or
Bigl#1#4Bigr#2or
biggl#1#4biggr#2or
Biggl#1#4Biggr#2else
left#1#4right#2fi
newcommanddel[2][-1]genericdel()#1#2
newcommandset[2][-1]genericdel#1#2
letcbrset
newcommandsbr[2][-1]genericdel[]#1#2
letintoodel
letintccsbr
newcommandintoc[2][-1]genericdel(]#1#2
newcommandintco[2][-1]genericdel[)#1#2
newcommandeval[2][-1]#1#2
newcommandenvert[2][-1]genericdel
letabsenvert
newcommandsVert[1][0]%
ifcase#1relax
rvertorbigr
newcommandenVert[2][-1]genericdel
letnormenVert
newcommandfullfunction[5]%
beginarray@r@r@c@l@
#1 colon & #2 & longrightarrow & #3 \
& #4 & longmapsto & #5
endarray
%%% end of the definitions
makeatother
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
The code has already been presented in https://tex.stackexchange.com/a/135985/4427 and provides a full replacement of commath, avoiding all its weaknesses. If you're tied to commath because you use its macros and features in other places, this can save you. Otherwise define abs with DeclarePairedDelimiter as suggested by Mico.
For instance, you can notice the reduced space between “where” and “|G|” in the commath version.

You should define anyway an operator name for “Tr”.
If you decide to go for this, save the part between
% begin definitions for a "better commath"
and
% end of the definitions
in a file called bettercommath.sty in the working directory and do usepackagebettercommath.
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%2f483944%2ffractional-alignment%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
The commath package provides a highly questionable implementation of abs. Don't load this package unless you absolutely have to. (Aside: You do not have to for the example at hand.)
Instead of loading this package, I suggest you
load the
mathtoolspackage instead of theamsmathpackage. Themathtoolspackage is, for all intents and purposes, a superset of theamsmathpackage; andissue the instruction
DeclarePairedDelimiterabslvertrvertin the preamble. This sets up a proper implementation of
abs.... If you need to auto-size the vertical bars, simply useabs*....
*Addendum": More about how commath implements envert (abs is just an alias for envert): If envert<arg> is invoked without an optional sizing argument (a whole number between 0 and 4), the following code gets executed:
!leftlvert#2rightrvert
It's the ! ("negative thinspace") instruction that messes up the symmetry of the full expression. Either write abs[0]<arg> to execute lvert#2rvert or, more safely, don't load commath at all and go for a cleaner definition of abs. The definitions of abs[1]... thru abs[4]... are also messed up, by the way, as are the definitions of norm and norm[1] thru norm]4]. While it's possible, in principle, to correct the faulty definitions of envert, abs, enVert, and norm, one is better off going for a setup that avoids these complications...
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
1
@Maths - Themathtoolspackage automatically loads theamsmathpackage, while taking great care not to mess with the operational details of the macros.
– Mico
2 days ago
add a comment |
The commath package provides a highly questionable implementation of abs. Don't load this package unless you absolutely have to. (Aside: You do not have to for the example at hand.)
Instead of loading this package, I suggest you
load the
mathtoolspackage instead of theamsmathpackage. Themathtoolspackage is, for all intents and purposes, a superset of theamsmathpackage; andissue the instruction
DeclarePairedDelimiterabslvertrvertin the preamble. This sets up a proper implementation of
abs.... If you need to auto-size the vertical bars, simply useabs*....
*Addendum": More about how commath implements envert (abs is just an alias for envert): If envert<arg> is invoked without an optional sizing argument (a whole number between 0 and 4), the following code gets executed:
!leftlvert#2rightrvert
It's the ! ("negative thinspace") instruction that messes up the symmetry of the full expression. Either write abs[0]<arg> to execute lvert#2rvert or, more safely, don't load commath at all and go for a cleaner definition of abs. The definitions of abs[1]... thru abs[4]... are also messed up, by the way, as are the definitions of norm and norm[1] thru norm]4]. While it's possible, in principle, to correct the faulty definitions of envert, abs, enVert, and norm, one is better off going for a setup that avoids these complications...
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
1
@Maths - Themathtoolspackage automatically loads theamsmathpackage, while taking great care not to mess with the operational details of the macros.
– Mico
2 days ago
add a comment |
The commath package provides a highly questionable implementation of abs. Don't load this package unless you absolutely have to. (Aside: You do not have to for the example at hand.)
Instead of loading this package, I suggest you
load the
mathtoolspackage instead of theamsmathpackage. Themathtoolspackage is, for all intents and purposes, a superset of theamsmathpackage; andissue the instruction
DeclarePairedDelimiterabslvertrvertin the preamble. This sets up a proper implementation of
abs.... If you need to auto-size the vertical bars, simply useabs*....
*Addendum": More about how commath implements envert (abs is just an alias for envert): If envert<arg> is invoked without an optional sizing argument (a whole number between 0 and 4), the following code gets executed:
!leftlvert#2rightrvert
It's the ! ("negative thinspace") instruction that messes up the symmetry of the full expression. Either write abs[0]<arg> to execute lvert#2rvert or, more safely, don't load commath at all and go for a cleaner definition of abs. The definitions of abs[1]... thru abs[4]... are also messed up, by the way, as are the definitions of norm and norm[1] thru norm]4]. While it's possible, in principle, to correct the faulty definitions of envert, abs, enVert, and norm, one is better off going for a setup that avoids these complications...
The commath package provides a highly questionable implementation of abs. Don't load this package unless you absolutely have to. (Aside: You do not have to for the example at hand.)
Instead of loading this package, I suggest you
load the
mathtoolspackage instead of theamsmathpackage. Themathtoolspackage is, for all intents and purposes, a superset of theamsmathpackage; andissue the instruction
DeclarePairedDelimiterabslvertrvertin the preamble. This sets up a proper implementation of
abs.... If you need to auto-size the vertical bars, simply useabs*....
*Addendum": More about how commath implements envert (abs is just an alias for envert): If envert<arg> is invoked without an optional sizing argument (a whole number between 0 and 4), the following code gets executed:
!leftlvert#2rightrvert
It's the ! ("negative thinspace") instruction that messes up the symmetry of the full expression. Either write abs[0]<arg> to execute lvert#2rvert or, more safely, don't load commath at all and go for a cleaner definition of abs. The definitions of abs[1]... thru abs[4]... are also messed up, by the way, as are the definitions of norm and norm[1] thru norm]4]. While it's possible, in principle, to correct the faulty definitions of envert, abs, enVert, and norm, one is better off going for a setup that avoids these complications...
edited 2 days ago
answered 2 days ago
MicoMico
286k32391779
286k32391779
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
1
@Maths - Themathtoolspackage automatically loads theamsmathpackage, while taking great care not to mess with the operational details of the macros.
– Mico
2 days ago
add a comment |
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
1
@Maths - Themathtoolspackage automatically loads theamsmathpackage, while taking great care not to mess with the operational details of the macros.
– Mico
2 days ago
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
So I should remove the amsath package and insert the mathtools package? would this affect the remaining document consisting of 40-50 pages? if not then I'll change it since you have much more experience.
– Maths
2 days ago
1
1
@Maths - The
mathtools package automatically loads the amsmath package, while taking great care not to mess with the operational details of the macros.– Mico
2 days ago
@Maths - The
mathtools package automatically loads the amsmath package, while taking great care not to mess with the operational details of the macros.– Mico
2 days ago
add a comment |
Compare the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
usepackagecommath
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument

with the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
makeatletter
% begin definitions for a "better commath"
newcommanddifmathop!mathrmd
newcommandDifmathop!mathrmD
newcommandspx[1]%
ifrelaxdetokenize#1relax
expandafter@gobble
else
expandafter@firstofone
fi
^#1%
newcommandpd[3][]fracpartialspx#1#2partial#3spx#1
newcommandtpd[3][]tfracpartialspx#1#2partial#3spx#1
newcommanddpd[3][]dfracpartialspx#1#2partial#3spx#1
newcommandmd[6]fracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandtmd[6]tfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommanddmd[6]dfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandod[3][]fracdifspx#1#2dif#3spx#1
newcommandtod[3][]tfracdifspx#1#2dif#3spx#1
newcommanddod[3][]dfracdifspx#1#2dif#3spx#1
newcommandgenericdel[4]%
ifcase#3relax
ifx#1.else#1fi#4ifx#2.else#2fior
bigl#1#4bigr#2or
Bigl#1#4Bigr#2or
biggl#1#4biggr#2or
Biggl#1#4Biggr#2else
left#1#4right#2fi
newcommanddel[2][-1]genericdel()#1#2
newcommandset[2][-1]genericdel#1#2
letcbrset
newcommandsbr[2][-1]genericdel[]#1#2
letintoodel
letintccsbr
newcommandintoc[2][-1]genericdel(]#1#2
newcommandintco[2][-1]genericdel[)#1#2
newcommandeval[2][-1]#1#2
newcommandenvert[2][-1]genericdel
letabsenvert
newcommandsVert[1][0]%
ifcase#1relax
rvertorbigr
newcommandenVert[2][-1]genericdel
letnormenVert
newcommandfullfunction[5]%
beginarray@r@r@c@l@
#1 colon & #2 & longrightarrow & #3 \
& #4 & longmapsto & #5
endarray
%%% end of the definitions
makeatother
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
The code has already been presented in https://tex.stackexchange.com/a/135985/4427 and provides a full replacement of commath, avoiding all its weaknesses. If you're tied to commath because you use its macros and features in other places, this can save you. Otherwise define abs with DeclarePairedDelimiter as suggested by Mico.
For instance, you can notice the reduced space between “where” and “|G|” in the commath version.

You should define anyway an operator name for “Tr”.
If you decide to go for this, save the part between
% begin definitions for a "better commath"
and
% end of the definitions
in a file called bettercommath.sty in the working directory and do usepackagebettercommath.
add a comment |
Compare the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
usepackagecommath
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument

with the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
makeatletter
% begin definitions for a "better commath"
newcommanddifmathop!mathrmd
newcommandDifmathop!mathrmD
newcommandspx[1]%
ifrelaxdetokenize#1relax
expandafter@gobble
else
expandafter@firstofone
fi
^#1%
newcommandpd[3][]fracpartialspx#1#2partial#3spx#1
newcommandtpd[3][]tfracpartialspx#1#2partial#3spx#1
newcommanddpd[3][]dfracpartialspx#1#2partial#3spx#1
newcommandmd[6]fracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandtmd[6]tfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommanddmd[6]dfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandod[3][]fracdifspx#1#2dif#3spx#1
newcommandtod[3][]tfracdifspx#1#2dif#3spx#1
newcommanddod[3][]dfracdifspx#1#2dif#3spx#1
newcommandgenericdel[4]%
ifcase#3relax
ifx#1.else#1fi#4ifx#2.else#2fior
bigl#1#4bigr#2or
Bigl#1#4Bigr#2or
biggl#1#4biggr#2or
Biggl#1#4Biggr#2else
left#1#4right#2fi
newcommanddel[2][-1]genericdel()#1#2
newcommandset[2][-1]genericdel#1#2
letcbrset
newcommandsbr[2][-1]genericdel[]#1#2
letintoodel
letintccsbr
newcommandintoc[2][-1]genericdel(]#1#2
newcommandintco[2][-1]genericdel[)#1#2
newcommandeval[2][-1]#1#2
newcommandenvert[2][-1]genericdel
letabsenvert
newcommandsVert[1][0]%
ifcase#1relax
rvertorbigr
newcommandenVert[2][-1]genericdel
letnormenVert
newcommandfullfunction[5]%
beginarray@r@r@c@l@
#1 colon & #2 & longrightarrow & #3 \
& #4 & longmapsto & #5
endarray
%%% end of the definitions
makeatother
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
The code has already been presented in https://tex.stackexchange.com/a/135985/4427 and provides a full replacement of commath, avoiding all its weaknesses. If you're tied to commath because you use its macros and features in other places, this can save you. Otherwise define abs with DeclarePairedDelimiter as suggested by Mico.
For instance, you can notice the reduced space between “where” and “|G|” in the commath version.

You should define anyway an operator name for “Tr”.
If you decide to go for this, save the part between
% begin definitions for a "better commath"
and
% end of the definitions
in a file called bettercommath.sty in the working directory and do usepackagebettercommath.
add a comment |
Compare the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
usepackagecommath
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument

with the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
makeatletter
% begin definitions for a "better commath"
newcommanddifmathop!mathrmd
newcommandDifmathop!mathrmD
newcommandspx[1]%
ifrelaxdetokenize#1relax
expandafter@gobble
else
expandafter@firstofone
fi
^#1%
newcommandpd[3][]fracpartialspx#1#2partial#3spx#1
newcommandtpd[3][]tfracpartialspx#1#2partial#3spx#1
newcommanddpd[3][]dfracpartialspx#1#2partial#3spx#1
newcommandmd[6]fracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandtmd[6]tfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommanddmd[6]dfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandod[3][]fracdifspx#1#2dif#3spx#1
newcommandtod[3][]tfracdifspx#1#2dif#3spx#1
newcommanddod[3][]dfracdifspx#1#2dif#3spx#1
newcommandgenericdel[4]%
ifcase#3relax
ifx#1.else#1fi#4ifx#2.else#2fior
bigl#1#4bigr#2or
Bigl#1#4Bigr#2or
biggl#1#4biggr#2or
Biggl#1#4Biggr#2else
left#1#4right#2fi
newcommanddel[2][-1]genericdel()#1#2
newcommandset[2][-1]genericdel#1#2
letcbrset
newcommandsbr[2][-1]genericdel[]#1#2
letintoodel
letintccsbr
newcommandintoc[2][-1]genericdel(]#1#2
newcommandintco[2][-1]genericdel[)#1#2
newcommandeval[2][-1]#1#2
newcommandenvert[2][-1]genericdel
letabsenvert
newcommandsVert[1][0]%
ifcase#1relax
rvertorbigr
newcommandenVert[2][-1]genericdel
letnormenVert
newcommandfullfunction[5]%
beginarray@r@r@c@l@
#1 colon & #2 & longrightarrow & #3 \
& #4 & longmapsto & #5
endarray
%%% end of the definitions
makeatother
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
The code has already been presented in https://tex.stackexchange.com/a/135985/4427 and provides a full replacement of commath, avoiding all its weaknesses. If you're tied to commath because you use its macros and features in other places, this can save you. Otherwise define abs with DeclarePairedDelimiter as suggested by Mico.
For instance, you can notice the reduced space between “where” and “|G|” in the commath version.

You should define anyway an operator name for “Tr”.
If you decide to go for this, save the part between
% begin definitions for a "better commath"
and
% end of the definitions
in a file called bettercommath.sty in the working directory and do usepackagebettercommath.
Compare the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
usepackagecommath
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument

with the output of
documentclass[11pt, a4paper]report
usepackageamsmath
usepackageenumitem
makeatletter
% begin definitions for a "better commath"
newcommanddifmathop!mathrmd
newcommandDifmathop!mathrmD
newcommandspx[1]%
ifrelaxdetokenize#1relax
expandafter@gobble
else
expandafter@firstofone
fi
^#1%
newcommandpd[3][]fracpartialspx#1#2partial#3spx#1
newcommandtpd[3][]tfracpartialspx#1#2partial#3spx#1
newcommanddpd[3][]dfracpartialspx#1#2partial#3spx#1
newcommandmd[6]fracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandtmd[6]tfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommanddmd[6]dfracpartialspx#2#1partial#3spx#4partial#5spx#6
newcommandod[3][]fracdifspx#1#2dif#3spx#1
newcommandtod[3][]tfracdifspx#1#2dif#3spx#1
newcommanddod[3][]dfracdifspx#1#2dif#3spx#1
newcommandgenericdel[4]%
ifcase#3relax
ifx#1.else#1fi#4ifx#2.else#2fior
bigl#1#4bigr#2or
Bigl#1#4Bigr#2or
biggl#1#4biggr#2or
Biggl#1#4Biggr#2else
left#1#4right#2fi
newcommanddel[2][-1]genericdel()#1#2
newcommandset[2][-1]genericdel#1#2
letcbrset
newcommandsbr[2][-1]genericdel[]#1#2
letintoodel
letintccsbr
newcommandintoc[2][-1]genericdel(]#1#2
newcommandintco[2][-1]genericdel[)#1#2
newcommandeval[2][-1]#1#2
newcommandenvert[2][-1]genericdel
letabsenvert
newcommandsVert[1][0]%
ifcase#1relax
rvertorbigr
newcommandenVert[2][-1]genericdel
letnormenVert
newcommandfullfunction[5]%
beginarray@r@r@c@l@
#1 colon & #2 & longrightarrow & #3 \
& #4 & longmapsto & #5
endarray
%%% end of the definitions
makeatother
DeclareMathOperatorTrTr
begindocument
Let $h$ be a linear mapping of $V_1$ into $V_2$. Let
[
h^0 = frac1abs G sum_tin G (rho_t^2)^-1 h rho_t^1
]
where $abs G$ is the order of $G$. Then
beginenumerate[label=(roman*)]
item If $rho^1$ and $rho^2$ are not isomorphic then we have $h^0=0$
item If $V_1 = V_2$ and $rho^1 = rho^2$, $h^0$ is a scalar multiple of the identity,
the scalar being $frac1n Tr(h)$ where $n = dim(V_1)$
endenumerate
enddocument
The code has already been presented in https://tex.stackexchange.com/a/135985/4427 and provides a full replacement of commath, avoiding all its weaknesses. If you're tied to commath because you use its macros and features in other places, this can save you. Otherwise define abs with DeclarePairedDelimiter as suggested by Mico.
For instance, you can notice the reduced space between “where” and “|G|” in the commath version.

You should define anyway an operator name for “Tr”.
If you decide to go for this, save the part between
% begin definitions for a "better commath"
and
% end of the definitions
in a file called bettercommath.sty in the working directory and do usepackagebettercommath.
answered 2 days ago
egregegreg
733k8919313254
733k8919313254
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%2f483944%2ffractional-alignment%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
I mean, can the |G| be pushed a little to the right? since the vertical "bars" and not aligned with the horizontal fractional line?
– Maths
2 days ago
1
You can always add space to it:
,abs G.– JouleV
2 days ago
1
Hmm, I don't think it deserves closure. This is a good question and my solution is only a workaround - it is not 100% centered. Maybe some TeXperts out there will provide a good answer.
– JouleV
2 days ago
1
@JouleV I agree, the question shouldn't be closed. It's definitely a bug (feature?) in
commath.– campa
2 days ago
1
See tex.stackexchange.com/a/135985/4427, if you really want to use
commathmacros.– egreg
2 days ago