node position in tikz-cd












3















I'd like to get the appended below commutative diagram by using tikz-cd. The source has been made in TeX, and the positioning of the nodes at the bottom row i.e. coker ker f and ker coker f have been obtained by the macro hidewidth. But how can I get a similar result of hidewidth in tikzcd?



The code in tikz-cd, without the alignment I'd like to get, is the following:



begin{center}
begin{tikzcd}
ker f arrow[r,"varepsilon"] & A arrow[r,"f"] arrow[d] & Barrow[r,"pi"] & coker f \
& cokerker farrow[r,dotted,"bar f"] & kercoker farrow[u]
end{tikzcd}
end{center}


Thank you! enter image description here










share|improve this question

























  • Do you want the down arrow pointing exactly to f or should be centered with Coker Ker f?

    – Sigur
    Feb 1 at 20:33











  • I want coker ker f to be anchored on the right and ker coker f on the left, respectively

    – Lorenzo
    Feb 1 at 20:35











  • Have you made the diagram in tikz-cd, without the proper alignment of those nodes? If so, can you post the code?

    – Torbjørn T.
    Feb 1 at 20:39
















3















I'd like to get the appended below commutative diagram by using tikz-cd. The source has been made in TeX, and the positioning of the nodes at the bottom row i.e. coker ker f and ker coker f have been obtained by the macro hidewidth. But how can I get a similar result of hidewidth in tikzcd?



The code in tikz-cd, without the alignment I'd like to get, is the following:



begin{center}
begin{tikzcd}
ker f arrow[r,"varepsilon"] & A arrow[r,"f"] arrow[d] & Barrow[r,"pi"] & coker f \
& cokerker farrow[r,dotted,"bar f"] & kercoker farrow[u]
end{tikzcd}
end{center}


Thank you! enter image description here










share|improve this question

























  • Do you want the down arrow pointing exactly to f or should be centered with Coker Ker f?

    – Sigur
    Feb 1 at 20:33











  • I want coker ker f to be anchored on the right and ker coker f on the left, respectively

    – Lorenzo
    Feb 1 at 20:35











  • Have you made the diagram in tikz-cd, without the proper alignment of those nodes? If so, can you post the code?

    – Torbjørn T.
    Feb 1 at 20:39














3












3








3








I'd like to get the appended below commutative diagram by using tikz-cd. The source has been made in TeX, and the positioning of the nodes at the bottom row i.e. coker ker f and ker coker f have been obtained by the macro hidewidth. But how can I get a similar result of hidewidth in tikzcd?



The code in tikz-cd, without the alignment I'd like to get, is the following:



begin{center}
begin{tikzcd}
ker f arrow[r,"varepsilon"] & A arrow[r,"f"] arrow[d] & Barrow[r,"pi"] & coker f \
& cokerker farrow[r,dotted,"bar f"] & kercoker farrow[u]
end{tikzcd}
end{center}


Thank you! enter image description here










share|improve this question
















I'd like to get the appended below commutative diagram by using tikz-cd. The source has been made in TeX, and the positioning of the nodes at the bottom row i.e. coker ker f and ker coker f have been obtained by the macro hidewidth. But how can I get a similar result of hidewidth in tikzcd?



The code in tikz-cd, without the alignment I'd like to get, is the following:



begin{center}
begin{tikzcd}
ker f arrow[r,"varepsilon"] & A arrow[r,"f"] arrow[d] & Barrow[r,"pi"] & coker f \
& cokerker farrow[r,dotted,"bar f"] & kercoker farrow[u]
end{tikzcd}
end{center}


Thank you! enter image description here







tikz-cd commutative-diagrams






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 1 at 20:42







Lorenzo

















asked Feb 1 at 20:31









LorenzoLorenzo

719515




719515













  • Do you want the down arrow pointing exactly to f or should be centered with Coker Ker f?

    – Sigur
    Feb 1 at 20:33











  • I want coker ker f to be anchored on the right and ker coker f on the left, respectively

    – Lorenzo
    Feb 1 at 20:35











  • Have you made the diagram in tikz-cd, without the proper alignment of those nodes? If so, can you post the code?

    – Torbjørn T.
    Feb 1 at 20:39



















  • Do you want the down arrow pointing exactly to f or should be centered with Coker Ker f?

    – Sigur
    Feb 1 at 20:33











  • I want coker ker f to be anchored on the right and ker coker f on the left, respectively

    – Lorenzo
    Feb 1 at 20:35











  • Have you made the diagram in tikz-cd, without the proper alignment of those nodes? If so, can you post the code?

    – Torbjørn T.
    Feb 1 at 20:39

















Do you want the down arrow pointing exactly to f or should be centered with Coker Ker f?

– Sigur
Feb 1 at 20:33





Do you want the down arrow pointing exactly to f or should be centered with Coker Ker f?

– Sigur
Feb 1 at 20:33













I want coker ker f to be anchored on the right and ker coker f on the left, respectively

– Lorenzo
Feb 1 at 20:35





I want coker ker f to be anchored on the right and ker coker f on the left, respectively

– Lorenzo
Feb 1 at 20:35













Have you made the diagram in tikz-cd, without the proper alignment of those nodes? If so, can you post the code?

– Torbjørn T.
Feb 1 at 20:39





Have you made the diagram in tikz-cd, without the proper alignment of those nodes? If so, can you post the code?

– Torbjørn T.
Feb 1 at 20:39










4 Answers
4






active

oldest

votes


















2














Maybe not a perfect solution, but it is starting point.



enter image description here



documentclass{report}
usepackage{amsthm,amsmath,amssymb,amsfonts}
usepackage{tikz-cd}

begin{document}
[
begin{tikzcd}
operatorname{Ker} f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & operatorname{Coker} f \
& llap{$operatorname{Coker} operatorname{Ker}{}$}f arrow[r] & mathrm{K} rlap{$operatorname{er}operatorname{Coker} f $}arrow[u]
end{tikzcd}
]
end{document}





share|improve this answer































    2














    A variant based on mathllap and mathrlap from mathtools; and a simple makebox:



    documentclass{report}
    usepackage{mathtools,amssymb}
    usepackage{tikz-cd}
    usepackage{calc}
    DeclareMathOperator{Ker}{Ker}
    DeclareMathOperator{Coker}{Coker}

    begin{document}

    [
    begin{tikzcd}
    Ker f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & Coker f \
    & mathllap{Coker Ker{}} f arrow[r] & makebox[widthof{$B$}][l] {$mathrlap{KerCoker f}$}arrow[u]
    end{tikzcd}
    ]

    end{document}


    enter image description here






    share|improve this answer

































      2














      A pure tikz-cd solution, without hacking with makebox, mathllap, llap or similar.



      You can use the option:



      /tikz/column 2/.append style={nodes={anchor=base east}}


      to right align the nodes of the second column and:



      /tikz/column 3/.append style={nodes={anchor=base west}}


      to left align the nodes of the second column.



      Then you can use the option to path to indicate the path you need, for example to path={-- (tikztostart |- tikztotarget.north)}] means "go to the point which has the x coordinate of the starting point and the y coordinate of the endpoint, north anchor.



      For the arrow from the bottom left node to B, I used <- to invert the direction of the arrow in order to start it from B and being able to use to path.



      I've also used &[-5em] to reduce the space between the first and the second column and between the third and the last.



      documentclass{report}
      usepackage{amsthm,amsmath,amssymb,amsfonts}
      usepackage{tikz-cd}

      begin{document}
      [
      begin{tikzcd}[%
      /tikz/column 2/.append style={nodes={anchor=base east}},
      /tikz/column 3/.append style={nodes={anchor=base west}}
      ]
      operatorname{Ker} f arrow[r] &[-5em] A arrow[r]arrow[d, start anchor=south,to path={-- (tikztostart |- tikztotarget.north)}] & B arrow[r]arrow[d, <-,to path={-- (tikztostart |- tikztotarget.north)}] &[-5em] operatorname{Coker} f \
      & operatorname{Coker} operatorname{Ker} f arrow[r] & operatorname{Ker} operatorname{Coker} f
      end{tikzcd}
      ]
      end{document}


      enter image description here






      share|improve this answer































        1














        To be honest I'd prefer the top one. Anyway, this case can be solved by simply assign a fixed width to the long objects, here 1em, making them stick to the left and to the right respectively.



        documentclass{article}
        usepackage{amsmath}
        usepackage{tikz-cd}

        DeclareMathOperator{coker}{coker}

        begin{document}

        [% not center
        begin{tikzcd}
        ker f arrow[r,"varepsilon"] &
        A arrow[r,"f"] arrow[d] &
        Barrow[r,"pi"] & coker f
        \
        &
        cokerker f arrow[r,dashed,"bar f"] &
        kercoker f arrow[u]
        end{tikzcd}
        ]

        [% not center
        begin{tikzcd}
        ker f arrow[r,"varepsilon"] &
        A arrow[r,"f"] arrow[d] &
        Barrow[r,"pi"] & coker f
        \
        &
        makebox[1em][r]{$cokerker f$} arrow[r,dashed,"bar f"] &
        makebox[1em][l]{$kercoker f$} arrow[u]
        end{tikzcd}
        ]

        end{document}


        enter image description here



        Why not center? Because with [...] the display will not be separated by the text above it (no blank line before [).



        If you prefer “Ker” and “Coker” with the capital letter, use DeclareMathOperator as shown for defining Ker and Coker.






        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%2f472946%2fnode-position-in-tikz-cd%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Maybe not a perfect solution, but it is starting point.



          enter image description here



          documentclass{report}
          usepackage{amsthm,amsmath,amssymb,amsfonts}
          usepackage{tikz-cd}

          begin{document}
          [
          begin{tikzcd}
          operatorname{Ker} f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & operatorname{Coker} f \
          & llap{$operatorname{Coker} operatorname{Ker}{}$}f arrow[r] & mathrm{K} rlap{$operatorname{er}operatorname{Coker} f $}arrow[u]
          end{tikzcd}
          ]
          end{document}





          share|improve this answer




























            2














            Maybe not a perfect solution, but it is starting point.



            enter image description here



            documentclass{report}
            usepackage{amsthm,amsmath,amssymb,amsfonts}
            usepackage{tikz-cd}

            begin{document}
            [
            begin{tikzcd}
            operatorname{Ker} f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & operatorname{Coker} f \
            & llap{$operatorname{Coker} operatorname{Ker}{}$}f arrow[r] & mathrm{K} rlap{$operatorname{er}operatorname{Coker} f $}arrow[u]
            end{tikzcd}
            ]
            end{document}





            share|improve this answer


























              2












              2








              2







              Maybe not a perfect solution, but it is starting point.



              enter image description here



              documentclass{report}
              usepackage{amsthm,amsmath,amssymb,amsfonts}
              usepackage{tikz-cd}

              begin{document}
              [
              begin{tikzcd}
              operatorname{Ker} f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & operatorname{Coker} f \
              & llap{$operatorname{Coker} operatorname{Ker}{}$}f arrow[r] & mathrm{K} rlap{$operatorname{er}operatorname{Coker} f $}arrow[u]
              end{tikzcd}
              ]
              end{document}





              share|improve this answer













              Maybe not a perfect solution, but it is starting point.



              enter image description here



              documentclass{report}
              usepackage{amsthm,amsmath,amssymb,amsfonts}
              usepackage{tikz-cd}

              begin{document}
              [
              begin{tikzcd}
              operatorname{Ker} f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & operatorname{Coker} f \
              & llap{$operatorname{Coker} operatorname{Ker}{}$}f arrow[r] & mathrm{K} rlap{$operatorname{er}operatorname{Coker} f $}arrow[u]
              end{tikzcd}
              ]
              end{document}






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 1 at 20:41









              SigurSigur

              24.7k356139




              24.7k356139























                  2














                  A variant based on mathllap and mathrlap from mathtools; and a simple makebox:



                  documentclass{report}
                  usepackage{mathtools,amssymb}
                  usepackage{tikz-cd}
                  usepackage{calc}
                  DeclareMathOperator{Ker}{Ker}
                  DeclareMathOperator{Coker}{Coker}

                  begin{document}

                  [
                  begin{tikzcd}
                  Ker f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & Coker f \
                  & mathllap{Coker Ker{}} f arrow[r] & makebox[widthof{$B$}][l] {$mathrlap{KerCoker f}$}arrow[u]
                  end{tikzcd}
                  ]

                  end{document}


                  enter image description here






                  share|improve this answer






























                    2














                    A variant based on mathllap and mathrlap from mathtools; and a simple makebox:



                    documentclass{report}
                    usepackage{mathtools,amssymb}
                    usepackage{tikz-cd}
                    usepackage{calc}
                    DeclareMathOperator{Ker}{Ker}
                    DeclareMathOperator{Coker}{Coker}

                    begin{document}

                    [
                    begin{tikzcd}
                    Ker f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & Coker f \
                    & mathllap{Coker Ker{}} f arrow[r] & makebox[widthof{$B$}][l] {$mathrlap{KerCoker f}$}arrow[u]
                    end{tikzcd}
                    ]

                    end{document}


                    enter image description here






                    share|improve this answer




























                      2












                      2








                      2







                      A variant based on mathllap and mathrlap from mathtools; and a simple makebox:



                      documentclass{report}
                      usepackage{mathtools,amssymb}
                      usepackage{tikz-cd}
                      usepackage{calc}
                      DeclareMathOperator{Ker}{Ker}
                      DeclareMathOperator{Coker}{Coker}

                      begin{document}

                      [
                      begin{tikzcd}
                      Ker f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & Coker f \
                      & mathllap{Coker Ker{}} f arrow[r] & makebox[widthof{$B$}][l] {$mathrlap{KerCoker f}$}arrow[u]
                      end{tikzcd}
                      ]

                      end{document}


                      enter image description here






                      share|improve this answer















                      A variant based on mathllap and mathrlap from mathtools; and a simple makebox:



                      documentclass{report}
                      usepackage{mathtools,amssymb}
                      usepackage{tikz-cd}
                      usepackage{calc}
                      DeclareMathOperator{Ker}{Ker}
                      DeclareMathOperator{Coker}{Coker}

                      begin{document}

                      [
                      begin{tikzcd}
                      Ker f arrow[r] & A arrow[r]arrow[d] & B arrow[r] & Coker f \
                      & mathllap{Coker Ker{}} f arrow[r] & makebox[widthof{$B$}][l] {$mathrlap{KerCoker f}$}arrow[u]
                      end{tikzcd}
                      ]

                      end{document}


                      enter image description here







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Feb 1 at 22:11

























                      answered Feb 1 at 21:58









                      BernardBernard

                      169k773198




                      169k773198























                          2














                          A pure tikz-cd solution, without hacking with makebox, mathllap, llap or similar.



                          You can use the option:



                          /tikz/column 2/.append style={nodes={anchor=base east}}


                          to right align the nodes of the second column and:



                          /tikz/column 3/.append style={nodes={anchor=base west}}


                          to left align the nodes of the second column.



                          Then you can use the option to path to indicate the path you need, for example to path={-- (tikztostart |- tikztotarget.north)}] means "go to the point which has the x coordinate of the starting point and the y coordinate of the endpoint, north anchor.



                          For the arrow from the bottom left node to B, I used <- to invert the direction of the arrow in order to start it from B and being able to use to path.



                          I've also used &[-5em] to reduce the space between the first and the second column and between the third and the last.



                          documentclass{report}
                          usepackage{amsthm,amsmath,amssymb,amsfonts}
                          usepackage{tikz-cd}

                          begin{document}
                          [
                          begin{tikzcd}[%
                          /tikz/column 2/.append style={nodes={anchor=base east}},
                          /tikz/column 3/.append style={nodes={anchor=base west}}
                          ]
                          operatorname{Ker} f arrow[r] &[-5em] A arrow[r]arrow[d, start anchor=south,to path={-- (tikztostart |- tikztotarget.north)}] & B arrow[r]arrow[d, <-,to path={-- (tikztostart |- tikztotarget.north)}] &[-5em] operatorname{Coker} f \
                          & operatorname{Coker} operatorname{Ker} f arrow[r] & operatorname{Ker} operatorname{Coker} f
                          end{tikzcd}
                          ]
                          end{document}


                          enter image description here






                          share|improve this answer




























                            2














                            A pure tikz-cd solution, without hacking with makebox, mathllap, llap or similar.



                            You can use the option:



                            /tikz/column 2/.append style={nodes={anchor=base east}}


                            to right align the nodes of the second column and:



                            /tikz/column 3/.append style={nodes={anchor=base west}}


                            to left align the nodes of the second column.



                            Then you can use the option to path to indicate the path you need, for example to path={-- (tikztostart |- tikztotarget.north)}] means "go to the point which has the x coordinate of the starting point and the y coordinate of the endpoint, north anchor.



                            For the arrow from the bottom left node to B, I used <- to invert the direction of the arrow in order to start it from B and being able to use to path.



                            I've also used &[-5em] to reduce the space between the first and the second column and between the third and the last.



                            documentclass{report}
                            usepackage{amsthm,amsmath,amssymb,amsfonts}
                            usepackage{tikz-cd}

                            begin{document}
                            [
                            begin{tikzcd}[%
                            /tikz/column 2/.append style={nodes={anchor=base east}},
                            /tikz/column 3/.append style={nodes={anchor=base west}}
                            ]
                            operatorname{Ker} f arrow[r] &[-5em] A arrow[r]arrow[d, start anchor=south,to path={-- (tikztostart |- tikztotarget.north)}] & B arrow[r]arrow[d, <-,to path={-- (tikztostart |- tikztotarget.north)}] &[-5em] operatorname{Coker} f \
                            & operatorname{Coker} operatorname{Ker} f arrow[r] & operatorname{Ker} operatorname{Coker} f
                            end{tikzcd}
                            ]
                            end{document}


                            enter image description here






                            share|improve this answer


























                              2












                              2








                              2







                              A pure tikz-cd solution, without hacking with makebox, mathllap, llap or similar.



                              You can use the option:



                              /tikz/column 2/.append style={nodes={anchor=base east}}


                              to right align the nodes of the second column and:



                              /tikz/column 3/.append style={nodes={anchor=base west}}


                              to left align the nodes of the second column.



                              Then you can use the option to path to indicate the path you need, for example to path={-- (tikztostart |- tikztotarget.north)}] means "go to the point which has the x coordinate of the starting point and the y coordinate of the endpoint, north anchor.



                              For the arrow from the bottom left node to B, I used <- to invert the direction of the arrow in order to start it from B and being able to use to path.



                              I've also used &[-5em] to reduce the space between the first and the second column and between the third and the last.



                              documentclass{report}
                              usepackage{amsthm,amsmath,amssymb,amsfonts}
                              usepackage{tikz-cd}

                              begin{document}
                              [
                              begin{tikzcd}[%
                              /tikz/column 2/.append style={nodes={anchor=base east}},
                              /tikz/column 3/.append style={nodes={anchor=base west}}
                              ]
                              operatorname{Ker} f arrow[r] &[-5em] A arrow[r]arrow[d, start anchor=south,to path={-- (tikztostart |- tikztotarget.north)}] & B arrow[r]arrow[d, <-,to path={-- (tikztostart |- tikztotarget.north)}] &[-5em] operatorname{Coker} f \
                              & operatorname{Coker} operatorname{Ker} f arrow[r] & operatorname{Ker} operatorname{Coker} f
                              end{tikzcd}
                              ]
                              end{document}


                              enter image description here






                              share|improve this answer













                              A pure tikz-cd solution, without hacking with makebox, mathllap, llap or similar.



                              You can use the option:



                              /tikz/column 2/.append style={nodes={anchor=base east}}


                              to right align the nodes of the second column and:



                              /tikz/column 3/.append style={nodes={anchor=base west}}


                              to left align the nodes of the second column.



                              Then you can use the option to path to indicate the path you need, for example to path={-- (tikztostart |- tikztotarget.north)}] means "go to the point which has the x coordinate of the starting point and the y coordinate of the endpoint, north anchor.



                              For the arrow from the bottom left node to B, I used <- to invert the direction of the arrow in order to start it from B and being able to use to path.



                              I've also used &[-5em] to reduce the space between the first and the second column and between the third and the last.



                              documentclass{report}
                              usepackage{amsthm,amsmath,amssymb,amsfonts}
                              usepackage{tikz-cd}

                              begin{document}
                              [
                              begin{tikzcd}[%
                              /tikz/column 2/.append style={nodes={anchor=base east}},
                              /tikz/column 3/.append style={nodes={anchor=base west}}
                              ]
                              operatorname{Ker} f arrow[r] &[-5em] A arrow[r]arrow[d, start anchor=south,to path={-- (tikztostart |- tikztotarget.north)}] & B arrow[r]arrow[d, <-,to path={-- (tikztostart |- tikztotarget.north)}] &[-5em] operatorname{Coker} f \
                              & operatorname{Coker} operatorname{Ker} f arrow[r] & operatorname{Ker} operatorname{Coker} f
                              end{tikzcd}
                              ]
                              end{document}


                              enter image description here







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Feb 2 at 7:09









                              CarLaTeXCarLaTeX

                              31.3k449130




                              31.3k449130























                                  1














                                  To be honest I'd prefer the top one. Anyway, this case can be solved by simply assign a fixed width to the long objects, here 1em, making them stick to the left and to the right respectively.



                                  documentclass{article}
                                  usepackage{amsmath}
                                  usepackage{tikz-cd}

                                  DeclareMathOperator{coker}{coker}

                                  begin{document}

                                  [% not center
                                  begin{tikzcd}
                                  ker f arrow[r,"varepsilon"] &
                                  A arrow[r,"f"] arrow[d] &
                                  Barrow[r,"pi"] & coker f
                                  \
                                  &
                                  cokerker f arrow[r,dashed,"bar f"] &
                                  kercoker f arrow[u]
                                  end{tikzcd}
                                  ]

                                  [% not center
                                  begin{tikzcd}
                                  ker f arrow[r,"varepsilon"] &
                                  A arrow[r,"f"] arrow[d] &
                                  Barrow[r,"pi"] & coker f
                                  \
                                  &
                                  makebox[1em][r]{$cokerker f$} arrow[r,dashed,"bar f"] &
                                  makebox[1em][l]{$kercoker f$} arrow[u]
                                  end{tikzcd}
                                  ]

                                  end{document}


                                  enter image description here



                                  Why not center? Because with [...] the display will not be separated by the text above it (no blank line before [).



                                  If you prefer “Ker” and “Coker” with the capital letter, use DeclareMathOperator as shown for defining Ker and Coker.






                                  share|improve this answer




























                                    1














                                    To be honest I'd prefer the top one. Anyway, this case can be solved by simply assign a fixed width to the long objects, here 1em, making them stick to the left and to the right respectively.



                                    documentclass{article}
                                    usepackage{amsmath}
                                    usepackage{tikz-cd}

                                    DeclareMathOperator{coker}{coker}

                                    begin{document}

                                    [% not center
                                    begin{tikzcd}
                                    ker f arrow[r,"varepsilon"] &
                                    A arrow[r,"f"] arrow[d] &
                                    Barrow[r,"pi"] & coker f
                                    \
                                    &
                                    cokerker f arrow[r,dashed,"bar f"] &
                                    kercoker f arrow[u]
                                    end{tikzcd}
                                    ]

                                    [% not center
                                    begin{tikzcd}
                                    ker f arrow[r,"varepsilon"] &
                                    A arrow[r,"f"] arrow[d] &
                                    Barrow[r,"pi"] & coker f
                                    \
                                    &
                                    makebox[1em][r]{$cokerker f$} arrow[r,dashed,"bar f"] &
                                    makebox[1em][l]{$kercoker f$} arrow[u]
                                    end{tikzcd}
                                    ]

                                    end{document}


                                    enter image description here



                                    Why not center? Because with [...] the display will not be separated by the text above it (no blank line before [).



                                    If you prefer “Ker” and “Coker” with the capital letter, use DeclareMathOperator as shown for defining Ker and Coker.






                                    share|improve this answer


























                                      1












                                      1








                                      1







                                      To be honest I'd prefer the top one. Anyway, this case can be solved by simply assign a fixed width to the long objects, here 1em, making them stick to the left and to the right respectively.



                                      documentclass{article}
                                      usepackage{amsmath}
                                      usepackage{tikz-cd}

                                      DeclareMathOperator{coker}{coker}

                                      begin{document}

                                      [% not center
                                      begin{tikzcd}
                                      ker f arrow[r,"varepsilon"] &
                                      A arrow[r,"f"] arrow[d] &
                                      Barrow[r,"pi"] & coker f
                                      \
                                      &
                                      cokerker f arrow[r,dashed,"bar f"] &
                                      kercoker f arrow[u]
                                      end{tikzcd}
                                      ]

                                      [% not center
                                      begin{tikzcd}
                                      ker f arrow[r,"varepsilon"] &
                                      A arrow[r,"f"] arrow[d] &
                                      Barrow[r,"pi"] & coker f
                                      \
                                      &
                                      makebox[1em][r]{$cokerker f$} arrow[r,dashed,"bar f"] &
                                      makebox[1em][l]{$kercoker f$} arrow[u]
                                      end{tikzcd}
                                      ]

                                      end{document}


                                      enter image description here



                                      Why not center? Because with [...] the display will not be separated by the text above it (no blank line before [).



                                      If you prefer “Ker” and “Coker” with the capital letter, use DeclareMathOperator as shown for defining Ker and Coker.






                                      share|improve this answer













                                      To be honest I'd prefer the top one. Anyway, this case can be solved by simply assign a fixed width to the long objects, here 1em, making them stick to the left and to the right respectively.



                                      documentclass{article}
                                      usepackage{amsmath}
                                      usepackage{tikz-cd}

                                      DeclareMathOperator{coker}{coker}

                                      begin{document}

                                      [% not center
                                      begin{tikzcd}
                                      ker f arrow[r,"varepsilon"] &
                                      A arrow[r,"f"] arrow[d] &
                                      Barrow[r,"pi"] & coker f
                                      \
                                      &
                                      cokerker f arrow[r,dashed,"bar f"] &
                                      kercoker f arrow[u]
                                      end{tikzcd}
                                      ]

                                      [% not center
                                      begin{tikzcd}
                                      ker f arrow[r,"varepsilon"] &
                                      A arrow[r,"f"] arrow[d] &
                                      Barrow[r,"pi"] & coker f
                                      \
                                      &
                                      makebox[1em][r]{$cokerker f$} arrow[r,dashed,"bar f"] &
                                      makebox[1em][l]{$kercoker f$} arrow[u]
                                      end{tikzcd}
                                      ]

                                      end{document}


                                      enter image description here



                                      Why not center? Because with [...] the display will not be separated by the text above it (no blank line before [).



                                      If you prefer “Ker” and “Coker” with the capital letter, use DeclareMathOperator as shown for defining Ker and Coker.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Feb 1 at 23:15









                                      egregegreg

                                      718k8719053202




                                      718k8719053202






























                                          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%2f472946%2fnode-position-in-tikz-cd%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

                                          How to change which sound is reproduced for terminal bell?

                                          Can I use Tabulator js library in my java Spring + Thymeleaf project?

                                          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents