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

            Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

            Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

            Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020