bmatrix: how to align elements' subscripts?Smaller matrices (or other math elements) in displayed mathequation labels inside a nested align and aligned environmentHow to Correct Entries in a Matrix Going Beyond Delimiters Using fourierncLeft aligning equations without align characterHow to align two equation arrays when combined with lateral bracesVertical space in bmatrixAlign multiple numbered aligned blocksHow can I align math in table across regular and multirow cells?Aligned within align: Why are they right-aligned?Problems with align* environment
Can humans ever directly see a few photons at a time? Can a human see a single photon?
Can the negators "jamais, rien, personne, plus, ni, aucun" be used in a single sentence?
How dangerous are set-size assumptions?
What is the origin of Scooby-Doo's name?
What are the penalties for overstaying in USA?
Swapping rooks in a 4x4 board
What is the legal status of travelling with methadone in your carry-on?
Going to get married soon, should I do it on Dec 31 or Jan 1?
Sci fi short story, robot city that nags people about health
Intuition for capacitors in series
How much will studying magic in an academy cost?
Why do all the teams that I have worked with always finish a sprint without completion of all the stories?
Is it possible writing coservation of relativistic energy in this naive way?
What does "play with your toy’s toys" mean?
Underbar nabla symbol doesn't work
Why do some professors with PhDs leave their professorships to teach high school?
How would a drone work in centrifugal force generated "gravity"?
How can I politely work my way around not liking coffee or beer when it comes to professional networking?
Should I prioritize my 401(k) over my student loans?
Would it be a copyright violation if I made a character’s full name refer to a song?
Iterate MapThread with matrices
Can ADFS connect to other SSO services?
Has there been any indication at all that further negotiation between the UK and EU is possible?
Trainee keeps missing deadlines for independent learning
bmatrix: how to align elements' subscripts?
Smaller matrices (or other math elements) in displayed mathequation labels inside a nested align and aligned environmentHow to Correct Entries in a Matrix Going Beyond Delimiters Using fourierncLeft aligning equations without align characterHow to align two equation arrays when combined with lateral bracesVertical space in bmatrixAlign multiple numbered aligned blocksHow can I align math in table across regular and multirow cells?Aligned within align: Why are they right-aligned?Problems with align* environment
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
For example with the code below:
beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
you will get a result looking like this:
It is apparent that those subscripts k in the matrix are not aligned both horizontally and vertically
How to properly align those subscripts in bmatrix environment?
Or are there any other matrix environments could cope with this well?
equations align matrices subscripts
add a comment |
For example with the code below:
beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
you will get a result looking like this:
It is apparent that those subscripts k in the matrix are not aligned both horizontally and vertically
How to properly align those subscripts in bmatrix environment?
Or are there any other matrix environments could cope with this well?
equations align matrices subscripts
For the vertical alignment of the subscripts, add^
to the entries that have no superscript. About the horizontal alignment, I'm not seeing it's necessary, as all the terms have different widths..
– egreg
Jun 6 at 13:47
add a comment |
For example with the code below:
beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
you will get a result looking like this:
It is apparent that those subscripts k in the matrix are not aligned both horizontally and vertically
How to properly align those subscripts in bmatrix environment?
Or are there any other matrix environments could cope with this well?
equations align matrices subscripts
For example with the code below:
beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
you will get a result looking like this:
It is apparent that those subscripts k in the matrix are not aligned both horizontally and vertically
How to properly align those subscripts in bmatrix environment?
Or are there any other matrix environments could cope with this well?
equations align matrices subscripts
equations align matrices subscripts
edited Jun 6 at 13:08
Nathan Explosion
asked Jun 6 at 12:34
Nathan ExplosionNathan Explosion
1641 silver badge7 bronze badges
1641 silver badge7 bronze badges
For the vertical alignment of the subscripts, add^
to the entries that have no superscript. About the horizontal alignment, I'm not seeing it's necessary, as all the terms have different widths..
– egreg
Jun 6 at 13:47
add a comment |
For the vertical alignment of the subscripts, add^
to the entries that have no superscript. About the horizontal alignment, I'm not seeing it's necessary, as all the terms have different widths..
– egreg
Jun 6 at 13:47
For the vertical alignment of the subscripts, add
^
to the entries that have no superscript. About the horizontal alignment, I'm not seeing it's necessary, as all the terms have different widths..– egreg
Jun 6 at 13:47
For the vertical alignment of the subscripts, add
^
to the entries that have no superscript. About the horizontal alignment, I'm not seeing it's necessary, as all the terms have different widths..– egreg
Jun 6 at 13:47
add a comment |
3 Answers
3
active
oldest
votes
To align the 4 terms on their subscripts, I suggest you combine a bmatrix*[r]
environment (provided by the mathtools
package) with a mathrlap-
instruction (also provided by the mathtools
package).
Update: to perform vertical alignment of the k
subscripts in the first row, I suggest you provide add a vphantom-
superscript term to mathbfC_k
term in the upper-right cell.
The result of the adjustments is shown in the lower matrix:
documentclassarticle
usepackagemathtools % for bmatrix* env. and mathrlap macro
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC_k \
mathbfC_k & mathbfS_k
endbmatrix
]
[
beginbmatrix*[r]
mathbfP^mathrlap-_k & mathbfC^vphantom-_k \
mathbfC_k & mathbfS_k
endbmatrix*
]
enddocument
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
add a comment |
Here are two possibilities:
documentclassarticle
usepackageamsmath
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC^vphantom-_k\
mathbfC_k & mathbfS_k
endbmatrix
beginbmatrix
mathbfP_kllap$^-mkern -3mu$ & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
]
enddocument
Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu
).
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
|
show 2 more comments
In this context I have finded an alternative using spalign
package. The correct vertical alignment between the two column vectors of the matrix containing the subscripts k
is guaranteed by mkern2mu
and mkern-2mu
.
documentclassarticle
usepackage[margin=2cm]geometry
usepackagemathtools
usepackagespalign
begindocument
[ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
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%2f494462%2fbmatrix-how-to-align-elements-subscripts%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
To align the 4 terms on their subscripts, I suggest you combine a bmatrix*[r]
environment (provided by the mathtools
package) with a mathrlap-
instruction (also provided by the mathtools
package).
Update: to perform vertical alignment of the k
subscripts in the first row, I suggest you provide add a vphantom-
superscript term to mathbfC_k
term in the upper-right cell.
The result of the adjustments is shown in the lower matrix:
documentclassarticle
usepackagemathtools % for bmatrix* env. and mathrlap macro
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC_k \
mathbfC_k & mathbfS_k
endbmatrix
]
[
beginbmatrix*[r]
mathbfP^mathrlap-_k & mathbfC^vphantom-_k \
mathbfC_k & mathbfS_k
endbmatrix*
]
enddocument
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
add a comment |
To align the 4 terms on their subscripts, I suggest you combine a bmatrix*[r]
environment (provided by the mathtools
package) with a mathrlap-
instruction (also provided by the mathtools
package).
Update: to perform vertical alignment of the k
subscripts in the first row, I suggest you provide add a vphantom-
superscript term to mathbfC_k
term in the upper-right cell.
The result of the adjustments is shown in the lower matrix:
documentclassarticle
usepackagemathtools % for bmatrix* env. and mathrlap macro
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC_k \
mathbfC_k & mathbfS_k
endbmatrix
]
[
beginbmatrix*[r]
mathbfP^mathrlap-_k & mathbfC^vphantom-_k \
mathbfC_k & mathbfS_k
endbmatrix*
]
enddocument
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
add a comment |
To align the 4 terms on their subscripts, I suggest you combine a bmatrix*[r]
environment (provided by the mathtools
package) with a mathrlap-
instruction (also provided by the mathtools
package).
Update: to perform vertical alignment of the k
subscripts in the first row, I suggest you provide add a vphantom-
superscript term to mathbfC_k
term in the upper-right cell.
The result of the adjustments is shown in the lower matrix:
documentclassarticle
usepackagemathtools % for bmatrix* env. and mathrlap macro
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC_k \
mathbfC_k & mathbfS_k
endbmatrix
]
[
beginbmatrix*[r]
mathbfP^mathrlap-_k & mathbfC^vphantom-_k \
mathbfC_k & mathbfS_k
endbmatrix*
]
enddocument
To align the 4 terms on their subscripts, I suggest you combine a bmatrix*[r]
environment (provided by the mathtools
package) with a mathrlap-
instruction (also provided by the mathtools
package).
Update: to perform vertical alignment of the k
subscripts in the first row, I suggest you provide add a vphantom-
superscript term to mathbfC_k
term in the upper-right cell.
The result of the adjustments is shown in the lower matrix:
documentclassarticle
usepackagemathtools % for bmatrix* env. and mathrlap macro
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC_k \
mathbfC_k & mathbfS_k
endbmatrix
]
[
beginbmatrix*[r]
mathbfP^mathrlap-_k & mathbfC^vphantom-_k \
mathbfC_k & mathbfS_k
endbmatrix*
]
enddocument
edited Jun 6 at 13:15
answered Jun 6 at 13:06
MicoMico
294k32 gold badges407 silver badges798 bronze badges
294k32 gold badges407 silver badges798 bronze badges
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
add a comment |
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
Thank you, but it seems that they only align in vertical direction?
– Nathan Explosion
Jun 6 at 13:09
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
@NathanExplosion - Please see my updated answer.
– Mico
Jun 6 at 13:15
add a comment |
Here are two possibilities:
documentclassarticle
usepackageamsmath
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC^vphantom-_k\
mathbfC_k & mathbfS_k
endbmatrix
beginbmatrix
mathbfP_kllap$^-mkern -3mu$ & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
]
enddocument
Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu
).
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
|
show 2 more comments
Here are two possibilities:
documentclassarticle
usepackageamsmath
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC^vphantom-_k\
mathbfC_k & mathbfS_k
endbmatrix
beginbmatrix
mathbfP_kllap$^-mkern -3mu$ & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
]
enddocument
Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu
).
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
|
show 2 more comments
Here are two possibilities:
documentclassarticle
usepackageamsmath
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC^vphantom-_k\
mathbfC_k & mathbfS_k
endbmatrix
beginbmatrix
mathbfP_kllap$^-mkern -3mu$ & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
]
enddocument
Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu
).
Here are two possibilities:
documentclassarticle
usepackageamsmath
begindocument
[
beginbmatrix
mathbfP^-_k & mathbfC^vphantom-_k\
mathbfC_k & mathbfS_k
endbmatrix
beginbmatrix
mathbfP_kllap$^-mkern -3mu$ & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix
]
enddocument
Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu
).
edited Jun 6 at 14:09
answered Jun 6 at 12:48
frougonfrougon
3,6301 gold badge9 silver badges18 bronze badges
3,6301 gold badge9 silver badges18 bronze badges
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
|
show 2 more comments
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
Two flaws in the update: The minus isn't at the same vertical position, and in the second column, the subscripts aren't at the same horizontal position.
– barbara beeton
Jun 6 at 13:58
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton I've fixed the first matrix, thanks. Concerning your remark on the minus sign, the two matrices are independent solutions, so I don't understand really the problem: I consider that it is an editorial choice to make: either you keep the minus superscript in its normal place and adjust the (1,2) matrix element to behave as if it had an invisible similar superscript (first solution), or you write the (1,1) element as if it had no superscript and manually add the minus in superscript position in a way that doesn't push the subscript downward (second solution).
– frougon
Jun 6 at 14:15
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@barbarabeeton: My answer only adresses alignment of the subscripts on a horizontal line because it was written before the OP modified its question to add “both horizontally and vertically.” (and I consider it a bit extreme to ask for alignment of subscripts on a vertical line: if you align the k's, then something else is necessarily going to be “wrong”: either the spacing between C or S and k, or the alignment of S and C on a vertical line)
– frougon
Jun 6 at 14:18
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon@barbarabeeton yes, I've edited the question, sorry for the confusion.
– Nathan Explosion
Jun 7 at 7:23
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
@frougon My congratulations for the first gold medal.
– Sebastiano
8 hours ago
|
show 2 more comments
In this context I have finded an alternative using spalign
package. The correct vertical alignment between the two column vectors of the matrix containing the subscripts k
is guaranteed by mkern2mu
and mkern-2mu
.
documentclassarticle
usepackage[margin=2cm]geometry
usepackagemathtools
usepackagespalign
begindocument
[ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
enddocument
add a comment |
In this context I have finded an alternative using spalign
package. The correct vertical alignment between the two column vectors of the matrix containing the subscripts k
is guaranteed by mkern2mu
and mkern-2mu
.
documentclassarticle
usepackage[margin=2cm]geometry
usepackagemathtools
usepackagespalign
begindocument
[ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
enddocument
add a comment |
In this context I have finded an alternative using spalign
package. The correct vertical alignment between the two column vectors of the matrix containing the subscripts k
is guaranteed by mkern2mu
and mkern-2mu
.
documentclassarticle
usepackage[margin=2cm]geometry
usepackagemathtools
usepackagespalign
begindocument
[ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
enddocument
In this context I have finded an alternative using spalign
package. The correct vertical alignment between the two column vectors of the matrix containing the subscripts k
is guaranteed by mkern2mu
and mkern-2mu
.
documentclassarticle
usepackage[margin=2cm]geometry
usepackagemathtools
usepackagespalign
begindocument
[ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
enddocument
answered 7 hours ago
SebastianoSebastiano
12.9k4 gold badges25 silver badges70 bronze badges
12.9k4 gold badges25 silver badges70 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f494462%2fbmatrix-how-to-align-elements-subscripts%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
For the vertical alignment of the subscripts, add
^
to the entries that have no superscript. About the horizontal alignment, I'm not seeing it's necessary, as all the terms have different widths..– egreg
Jun 6 at 13:47