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;








4















For example with the code below:



beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix


you will get a result looking like this:



enter image description here



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?










share|improve this question
























  • 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

















4















For example with the code below:



beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix


you will get a result looking like this:



enter image description here



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?










share|improve this question
























  • 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













4












4








4








For example with the code below:



beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix


you will get a result looking like this:



enter image description here



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?










share|improve this question
















For example with the code below:



beginbmatrix
mathbfP^-_k & mathbfC_k\
mathbfC_k & mathbfS_k
endbmatrix


you will get a result looking like this:



enter image description here



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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










3 Answers
3






active

oldest

votes


















5














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:



enter image description here



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





share|improve this answer

























  • 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


















4














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


Screenshot



Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu).






share|improve this answer

























  • 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


















0














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.



enter image description here



documentclassarticle
usepackage[margin=2cm]geometry
usepackagemathtools
usepackagespalign

begindocument

[ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
enddocument





share|improve this answer

























    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
    );



    );













    draft saved

    draft discarded


















    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









    5














    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:



    enter image description here



    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





    share|improve this answer

























    • 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















    5














    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:



    enter image description here



    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





    share|improve this answer

























    • 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













    5












    5








    5







    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:



    enter image description here



    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





    share|improve this answer















    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:



    enter image description here



    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






    share|improve this answer














    share|improve this answer



    share|improve this answer








    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

















    • 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













    4














    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


    Screenshot



    Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu).






    share|improve this answer

























    • 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















    4














    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


    Screenshot



    Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu).






    share|improve this answer

























    • 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













    4












    4








    4







    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


    Screenshot



    Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu).






    share|improve this answer















    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


    Screenshot



    Note: the second method uses manual adjustment for the horizontal position of the minus exponent (see the mkern -3mu).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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

















    • 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











    0














    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.



    enter image description here



    documentclassarticle
    usepackage[margin=2cm]geometry
    usepackagemathtools
    usepackagespalign

    begindocument

    [ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
    enddocument





    share|improve this answer



























      0














      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.



      enter image description here



      documentclassarticle
      usepackage[margin=2cm]geometry
      usepackagemathtools
      usepackagespalign

      begindocument

      [ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
      enddocument





      share|improve this answer

























        0












        0








        0







        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.



        enter image description here



        documentclassarticle
        usepackage[margin=2cm]geometry
        usepackagemathtools
        usepackagespalign

        begindocument

        [ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
        enddocument





        share|improve this answer













        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.



        enter image description here



        documentclassarticle
        usepackage[margin=2cm]geometry
        usepackagemathtools
        usepackagespalign

        begindocument

        [ spaligndelims[] spalignmat[l]mkern2mumathbfP^-_k mkern-2mumathbfC_k; mathbfC_k mathbfS_k ]
        enddocument






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 7 hours ago









        SebastianoSebastiano

        12.9k4 gold badges25 silver badges70 bronze badges




        12.9k4 gold badges25 silver badges70 bronze badges



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company