How can I fix the label locations on my tikzcd diagram?Location of Labels with Crossing Arrows in Commuative...

What kind of environment would favor hermaphroditism in a sentient species over regular, old sexes?

Cannot remove door knob -- totally inaccessible!

Omit property variable when using object destructuring

Why would you put your input amplifier in front of your filtering for and ECG signal?

How to handle professionally if colleagues has referred his relative and asking to take easy while taking interview

When did Britain learn about American independence?

What is this rubber on gear cables

Why is Drogon so much better in battle than Rhaegal and Viserion?

Why does string strummed with finger sound different from the one strummed with pick?

Have there been any examples of re-usable rockets in the past?

FIFO data structure in pure C

Usage of the relative pronoun "dont"

Why are there five extra turns in tournament Magic?

How could it be that 80% of townspeople were farmers during the Edo period in Japan?

Why is so much ransomware breakable?

multiline equation inside a matrix that is a part of multiline equation

Resistor Selection to retain same brightness in LED PWM circuit

Is it standard for US-based universities to consider the ethnicity of an applicant during PhD admissions?

What color to choose as "danger" if the main color of my app is red

Why use a retrograde orbit?

Why is vowel phonology represented in a trapezoid instead of a square?

Who is frowning in the sentence "Daisy looked at Tom frowning"?

Does a non-singular matrix have a large minor with disjoint rows and columns and full rank?

Would it be fair to use 1d30 (instead of rolling 2d20 and taking the higher die) for advantage rolls?



How can I fix the label locations on my tikzcd diagram?


Location of Labels with Crossing Arrows in Commuative Diagrams with tikzcdproblem making a commutative diagram in tikz using positioning libraryWhy do I get an extra white page before my TikZ picture?Adjusting the width of a displaymath environmentHow to label an arrow in a commutative diagramHow to draw a square and its diagonals with arrows?Tikz-cd arrow labels are not on the same heightArrow type Rightarrow in tikz-cd displayed not correctlyCommutative diagram with curve connecting between nodesRotating label of arrow along the arrowHow to modify a tikz-cd diagram by changing the placement and length of arrows













5















I am having trouble with the label locations on my commutative diagram.



Here is my code:



documentclass{article}

usepackage{tikz-cd}

begin{document}

begin{tikzcd}[ampersand replacement = &]
0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & N-1 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & N arrow[l, "Nlambda", bend left]
end{tikzcd}

begin{tikzcd}[ampersand replacement = &]
0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
end{tikzcd}

end{document}


which produces



enter image description here



I would like the arrow labels to appear "centered" on the arrows, as they are in the second diagram, but with the node labels from the first diagram. How can I fix this?



Note: I have already looked at the question here and know that I could probably manually correct the spacing on every single label, but that seems way more tedious than should be necessary given that I'm pretty sure the labels should be centered on the arrows by default.










share|improve this question



























    5















    I am having trouble with the label locations on my commutative diagram.



    Here is my code:



    documentclass{article}

    usepackage{tikz-cd}

    begin{document}

    begin{tikzcd}[ampersand replacement = &]
    0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & N-1 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & N arrow[l, "Nlambda", bend left]
    end{tikzcd}

    begin{tikzcd}[ampersand replacement = &]
    0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
    end{tikzcd}

    end{document}


    which produces



    enter image description here



    I would like the arrow labels to appear "centered" on the arrows, as they are in the second diagram, but with the node labels from the first diagram. How can I fix this?



    Note: I have already looked at the question here and know that I could probably manually correct the spacing on every single label, but that seems way more tedious than should be necessary given that I'm pretty sure the labels should be centered on the arrows by default.










    share|improve this question

























      5












      5








      5


      1






      I am having trouble with the label locations on my commutative diagram.



      Here is my code:



      documentclass{article}

      usepackage{tikz-cd}

      begin{document}

      begin{tikzcd}[ampersand replacement = &]
      0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & N-1 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & N arrow[l, "Nlambda", bend left]
      end{tikzcd}

      begin{tikzcd}[ampersand replacement = &]
      0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
      end{tikzcd}

      end{document}


      which produces



      enter image description here



      I would like the arrow labels to appear "centered" on the arrows, as they are in the second diagram, but with the node labels from the first diagram. How can I fix this?



      Note: I have already looked at the question here and know that I could probably manually correct the spacing on every single label, but that seems way more tedious than should be necessary given that I'm pretty sure the labels should be centered on the arrows by default.










      share|improve this question














      I am having trouble with the label locations on my commutative diagram.



      Here is my code:



      documentclass{article}

      usepackage{tikz-cd}

      begin{document}

      begin{tikzcd}[ampersand replacement = &]
      0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & N-1 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & N arrow[l, "Nlambda", bend left]
      end{tikzcd}

      begin{tikzcd}[ampersand replacement = &]
      0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
      end{tikzcd}

      end{document}


      which produces



      enter image description here



      I would like the arrow labels to appear "centered" on the arrows, as they are in the second diagram, but with the node labels from the first diagram. How can I fix this?



      Note: I have already looked at the question here and know that I could probably manually correct the spacing on every single label, but that seems way more tedious than should be necessary given that I'm pretty sure the labels should be centered on the arrows by default.







      tikz-pgf tikz-cd






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 6 hours ago









      Abe SchulteAbe Schulte

      419214




      419214






















          3 Answers
          3






          active

          oldest

          votes


















          4














          What happens here? auto gets screwed up.



          Why does it happen? See below.



          Can one fix it? Yes, at least in an ad hoc way.



          documentclass{article}
          usepackage{tikz-cd}
          tikzcdset{ad hoc fix/.style={r'/.style={r,/tikz/above},l'/.style={l,/tikz/below},
          every label/.append style={/tikz/auto=false}}}

          begin{document}
          begin{tikzcd}[ampersand replacement=&,ad hoc fix]
          0 arrow[r', "Nlambda", bend left] &
          1 arrow[r', "(N - 1)lambda", bend left] arrow[l', "lambda", bend left] &
          2 arrow[r', "(N - 2)lambda", bend left] arrow[l', "2lambda", bend left] &
          cdots arrow[r', "2lambda", bend left] arrow[l', "3lambda", bend left] &
          N-1 arrow[r', "lambda", bend left] arrow[l', "(N-1)lambda", bend left] &
          N arrow[l', "Nlambda", bend left]
          end{tikzcd}

          begin{tikzcd}[ampersand replacement = &]
          0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
          end{tikzcd}
          end{document}


          enter image description here



          The reason why this happens is that the arrows have different vertical positions of start and end points. This can be seen from



          documentclass{article}

          usepackage{tikz-cd}

          begin{document}

          begin{tikzcd}[ampersand replacement = &,every label/.append style={sloped}]
          0 arrow[r, "Nlambda", bend left] &
          1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] &
          2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] &
          cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] &
          N-1 arrow[r,"lambda", bend left] arrow[l, "(N-1)lambda", bend left] &
          N arrow[l, "Nlambda", bend left]
          end{tikzcd}

          end{document}


          enter image description here






          share|improve this answer

































            4














            Misplacement of arrow labels you can be reduce by increasing the bend angles. With this you slightly change the position of the start and end of the arrows for longer nodes' names. For example:



            documentclass{article}
            usepackage{tikz-cd}

            begin{document}
            begin{tikzcd}[sep=large,
            every arrow/.style={draw,->,bend left=45}, % for shorter diagram code
            ]
            0 ar[r, "Nlambda"]
            & 1 ar[r, "(N - 1)lambda"]
            ar[l, "lambda"]
            & 2 ar[r, "(N - 2)lambda"]
            ar[l, "2lambda"]
            & cdots ar[r, "2lambda"]
            ar[l, "3lambda"]
            & N-1 ar[r, "lambda"]
            ar[l, "(N-1)lambda"]
            & N ar[l, "Nlambda"]
            end{tikzcd}
            end{document}


            enter image description here






            share|improve this answer


























            • The output is not produced when running your code.

              – marmot
              3 hours ago











            • hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

              – Zarko
              3 hours ago











            • @Åke, thank you very much !

              – Zarko
              3 hours ago











            • No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

              – marmot
              3 hours ago











            • ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

              – Zarko
              3 hours ago





















            1














            Looks like a good application for tikz's chain library :



            documentclass{article}
            usepackage{tikz}
            usetikzlibrary{automata,chains,positioning}
            begin{document}

            begin{tikzpicture}[
            auto,
            start chain = going right,
            state/.append style = {
            on chain,
            draw=none,
            },
            ]
            node (s0)[state] {$0$};
            node (s1)[state] {$1$};
            node (s2)[state] {$2$};

            draw[->] (s0) edge[bend left] node {$Nlambda$} (s1)
            (s1) edge[bend left] node {$lambda$} (s0)
            (s1) edge[bend left] node {$(N-1)lambda$} (s2)
            (s2) edge[bend left] node {$2lambda$} (s1)
            ;

            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer








            New contributor



            Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              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%2f491008%2fhow-can-i-fix-the-label-locations-on-my-tikzcd-diagram%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









              4














              What happens here? auto gets screwed up.



              Why does it happen? See below.



              Can one fix it? Yes, at least in an ad hoc way.



              documentclass{article}
              usepackage{tikz-cd}
              tikzcdset{ad hoc fix/.style={r'/.style={r,/tikz/above},l'/.style={l,/tikz/below},
              every label/.append style={/tikz/auto=false}}}

              begin{document}
              begin{tikzcd}[ampersand replacement=&,ad hoc fix]
              0 arrow[r', "Nlambda", bend left] &
              1 arrow[r', "(N - 1)lambda", bend left] arrow[l', "lambda", bend left] &
              2 arrow[r', "(N - 2)lambda", bend left] arrow[l', "2lambda", bend left] &
              cdots arrow[r', "2lambda", bend left] arrow[l', "3lambda", bend left] &
              N-1 arrow[r', "lambda", bend left] arrow[l', "(N-1)lambda", bend left] &
              N arrow[l', "Nlambda", bend left]
              end{tikzcd}

              begin{tikzcd}[ampersand replacement = &]
              0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
              end{tikzcd}
              end{document}


              enter image description here



              The reason why this happens is that the arrows have different vertical positions of start and end points. This can be seen from



              documentclass{article}

              usepackage{tikz-cd}

              begin{document}

              begin{tikzcd}[ampersand replacement = &,every label/.append style={sloped}]
              0 arrow[r, "Nlambda", bend left] &
              1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] &
              2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] &
              cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] &
              N-1 arrow[r,"lambda", bend left] arrow[l, "(N-1)lambda", bend left] &
              N arrow[l, "Nlambda", bend left]
              end{tikzcd}

              end{document}


              enter image description here






              share|improve this answer






























                4














                What happens here? auto gets screwed up.



                Why does it happen? See below.



                Can one fix it? Yes, at least in an ad hoc way.



                documentclass{article}
                usepackage{tikz-cd}
                tikzcdset{ad hoc fix/.style={r'/.style={r,/tikz/above},l'/.style={l,/tikz/below},
                every label/.append style={/tikz/auto=false}}}

                begin{document}
                begin{tikzcd}[ampersand replacement=&,ad hoc fix]
                0 arrow[r', "Nlambda", bend left] &
                1 arrow[r', "(N - 1)lambda", bend left] arrow[l', "lambda", bend left] &
                2 arrow[r', "(N - 2)lambda", bend left] arrow[l', "2lambda", bend left] &
                cdots arrow[r', "2lambda", bend left] arrow[l', "3lambda", bend left] &
                N-1 arrow[r', "lambda", bend left] arrow[l', "(N-1)lambda", bend left] &
                N arrow[l', "Nlambda", bend left]
                end{tikzcd}

                begin{tikzcd}[ampersand replacement = &]
                0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
                end{tikzcd}
                end{document}


                enter image description here



                The reason why this happens is that the arrows have different vertical positions of start and end points. This can be seen from



                documentclass{article}

                usepackage{tikz-cd}

                begin{document}

                begin{tikzcd}[ampersand replacement = &,every label/.append style={sloped}]
                0 arrow[r, "Nlambda", bend left] &
                1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] &
                2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] &
                cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] &
                N-1 arrow[r,"lambda", bend left] arrow[l, "(N-1)lambda", bend left] &
                N arrow[l, "Nlambda", bend left]
                end{tikzcd}

                end{document}


                enter image description here






                share|improve this answer




























                  4












                  4








                  4







                  What happens here? auto gets screwed up.



                  Why does it happen? See below.



                  Can one fix it? Yes, at least in an ad hoc way.



                  documentclass{article}
                  usepackage{tikz-cd}
                  tikzcdset{ad hoc fix/.style={r'/.style={r,/tikz/above},l'/.style={l,/tikz/below},
                  every label/.append style={/tikz/auto=false}}}

                  begin{document}
                  begin{tikzcd}[ampersand replacement=&,ad hoc fix]
                  0 arrow[r', "Nlambda", bend left] &
                  1 arrow[r', "(N - 1)lambda", bend left] arrow[l', "lambda", bend left] &
                  2 arrow[r', "(N - 2)lambda", bend left] arrow[l', "2lambda", bend left] &
                  cdots arrow[r', "2lambda", bend left] arrow[l', "3lambda", bend left] &
                  N-1 arrow[r', "lambda", bend left] arrow[l', "(N-1)lambda", bend left] &
                  N arrow[l', "Nlambda", bend left]
                  end{tikzcd}

                  begin{tikzcd}[ampersand replacement = &]
                  0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
                  end{tikzcd}
                  end{document}


                  enter image description here



                  The reason why this happens is that the arrows have different vertical positions of start and end points. This can be seen from



                  documentclass{article}

                  usepackage{tikz-cd}

                  begin{document}

                  begin{tikzcd}[ampersand replacement = &,every label/.append style={sloped}]
                  0 arrow[r, "Nlambda", bend left] &
                  1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] &
                  2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] &
                  cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] &
                  N-1 arrow[r,"lambda", bend left] arrow[l, "(N-1)lambda", bend left] &
                  N arrow[l, "Nlambda", bend left]
                  end{tikzcd}

                  end{document}


                  enter image description here






                  share|improve this answer















                  What happens here? auto gets screwed up.



                  Why does it happen? See below.



                  Can one fix it? Yes, at least in an ad hoc way.



                  documentclass{article}
                  usepackage{tikz-cd}
                  tikzcdset{ad hoc fix/.style={r'/.style={r,/tikz/above},l'/.style={l,/tikz/below},
                  every label/.append style={/tikz/auto=false}}}

                  begin{document}
                  begin{tikzcd}[ampersand replacement=&,ad hoc fix]
                  0 arrow[r', "Nlambda", bend left] &
                  1 arrow[r', "(N - 1)lambda", bend left] arrow[l', "lambda", bend left] &
                  2 arrow[r', "(N - 2)lambda", bend left] arrow[l', "2lambda", bend left] &
                  cdots arrow[r', "2lambda", bend left] arrow[l', "3lambda", bend left] &
                  N-1 arrow[r', "lambda", bend left] arrow[l', "(N-1)lambda", bend left] &
                  N arrow[l', "Nlambda", bend left]
                  end{tikzcd}

                  begin{tikzcd}[ampersand replacement = &]
                  0 arrow[r, "Nlambda", bend left] & 1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] & 2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] & 3 arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] & 4 arrow[r, "lambda", bend left] arrow[l, "(N-1)lambda", bend left] & 5 arrow[l, "Nlambda", bend left]
                  end{tikzcd}
                  end{document}


                  enter image description here



                  The reason why this happens is that the arrows have different vertical positions of start and end points. This can be seen from



                  documentclass{article}

                  usepackage{tikz-cd}

                  begin{document}

                  begin{tikzcd}[ampersand replacement = &,every label/.append style={sloped}]
                  0 arrow[r, "Nlambda", bend left] &
                  1 arrow[r, "(N - 1)lambda", bend left] arrow[l, "lambda", bend left] &
                  2 arrow[r, "(N - 2)lambda", bend left] arrow[l, "2lambda", bend left] &
                  cdots arrow[r, "2lambda", bend left] arrow[l, "3lambda", bend left] &
                  N-1 arrow[r,"lambda", bend left] arrow[l, "(N-1)lambda", bend left] &
                  N arrow[l, "Nlambda", bend left]
                  end{tikzcd}

                  end{document}


                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 3 hours ago

























                  answered 4 hours ago









                  marmotmarmot

                  127k6162308




                  127k6162308























                      4














                      Misplacement of arrow labels you can be reduce by increasing the bend angles. With this you slightly change the position of the start and end of the arrows for longer nodes' names. For example:



                      documentclass{article}
                      usepackage{tikz-cd}

                      begin{document}
                      begin{tikzcd}[sep=large,
                      every arrow/.style={draw,->,bend left=45}, % for shorter diagram code
                      ]
                      0 ar[r, "Nlambda"]
                      & 1 ar[r, "(N - 1)lambda"]
                      ar[l, "lambda"]
                      & 2 ar[r, "(N - 2)lambda"]
                      ar[l, "2lambda"]
                      & cdots ar[r, "2lambda"]
                      ar[l, "3lambda"]
                      & N-1 ar[r, "lambda"]
                      ar[l, "(N-1)lambda"]
                      & N ar[l, "Nlambda"]
                      end{tikzcd}
                      end{document}


                      enter image description here






                      share|improve this answer


























                      • The output is not produced when running your code.

                        – marmot
                        3 hours ago











                      • hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

                        – Zarko
                        3 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        3 hours ago











                      • No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

                        – marmot
                        3 hours ago











                      • ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

                        – Zarko
                        3 hours ago


















                      4














                      Misplacement of arrow labels you can be reduce by increasing the bend angles. With this you slightly change the position of the start and end of the arrows for longer nodes' names. For example:



                      documentclass{article}
                      usepackage{tikz-cd}

                      begin{document}
                      begin{tikzcd}[sep=large,
                      every arrow/.style={draw,->,bend left=45}, % for shorter diagram code
                      ]
                      0 ar[r, "Nlambda"]
                      & 1 ar[r, "(N - 1)lambda"]
                      ar[l, "lambda"]
                      & 2 ar[r, "(N - 2)lambda"]
                      ar[l, "2lambda"]
                      & cdots ar[r, "2lambda"]
                      ar[l, "3lambda"]
                      & N-1 ar[r, "lambda"]
                      ar[l, "(N-1)lambda"]
                      & N ar[l, "Nlambda"]
                      end{tikzcd}
                      end{document}


                      enter image description here






                      share|improve this answer


























                      • The output is not produced when running your code.

                        – marmot
                        3 hours ago











                      • hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

                        – Zarko
                        3 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        3 hours ago











                      • No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

                        – marmot
                        3 hours ago











                      • ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

                        – Zarko
                        3 hours ago
















                      4












                      4








                      4







                      Misplacement of arrow labels you can be reduce by increasing the bend angles. With this you slightly change the position of the start and end of the arrows for longer nodes' names. For example:



                      documentclass{article}
                      usepackage{tikz-cd}

                      begin{document}
                      begin{tikzcd}[sep=large,
                      every arrow/.style={draw,->,bend left=45}, % for shorter diagram code
                      ]
                      0 ar[r, "Nlambda"]
                      & 1 ar[r, "(N - 1)lambda"]
                      ar[l, "lambda"]
                      & 2 ar[r, "(N - 2)lambda"]
                      ar[l, "2lambda"]
                      & cdots ar[r, "2lambda"]
                      ar[l, "3lambda"]
                      & N-1 ar[r, "lambda"]
                      ar[l, "(N-1)lambda"]
                      & N ar[l, "Nlambda"]
                      end{tikzcd}
                      end{document}


                      enter image description here






                      share|improve this answer















                      Misplacement of arrow labels you can be reduce by increasing the bend angles. With this you slightly change the position of the start and end of the arrows for longer nodes' names. For example:



                      documentclass{article}
                      usepackage{tikz-cd}

                      begin{document}
                      begin{tikzcd}[sep=large,
                      every arrow/.style={draw,->,bend left=45}, % for shorter diagram code
                      ]
                      0 ar[r, "Nlambda"]
                      & 1 ar[r, "(N - 1)lambda"]
                      ar[l, "lambda"]
                      & 2 ar[r, "(N - 2)lambda"]
                      ar[l, "2lambda"]
                      & cdots ar[r, "2lambda"]
                      ar[l, "3lambda"]
                      & N-1 ar[r, "lambda"]
                      ar[l, "(N-1)lambda"]
                      & N ar[l, "Nlambda"]
                      end{tikzcd}
                      end{document}


                      enter image description here







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 3 hours ago

























                      answered 4 hours ago









                      ZarkoZarko

                      134k872178




                      134k872178













                      • The output is not produced when running your code.

                        – marmot
                        3 hours ago











                      • hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

                        – Zarko
                        3 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        3 hours ago











                      • No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

                        – marmot
                        3 hours ago











                      • ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

                        – Zarko
                        3 hours ago





















                      • The output is not produced when running your code.

                        – marmot
                        3 hours ago











                      • hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

                        – Zarko
                        3 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        3 hours ago











                      • No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

                        – marmot
                        3 hours ago











                      • ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

                        – Zarko
                        3 hours ago



















                      The output is not produced when running your code.

                      – marmot
                      3 hours ago





                      The output is not produced when running your code.

                      – marmot
                      3 hours ago













                      hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

                      – Zarko
                      3 hours ago





                      hm, I check the code again and obtain the same result as i show in answer. I use recent MikTeX (updated yesterday) on w10 machine.

                      – Zarko
                      3 hours ago













                      @Åke, thank you very much !

                      – Zarko
                      3 hours ago





                      @Åke, thank you very much !

                      – Zarko
                      3 hours ago













                      No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

                      – marmot
                      3 hours ago





                      No. For instance, you have N-1-2 in your code. Are you saying MikTeX converts this to N-1?

                      – marmot
                      3 hours ago













                      ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

                      – Zarko
                      3 hours ago







                      ups, @marmoth you are right. Thank you very much to pointed to this. I didn't notice this, I just looked position of arrows labels. i will correct this asap. this left from some previous test ...

                      – Zarko
                      3 hours ago













                      1














                      Looks like a good application for tikz's chain library :



                      documentclass{article}
                      usepackage{tikz}
                      usetikzlibrary{automata,chains,positioning}
                      begin{document}

                      begin{tikzpicture}[
                      auto,
                      start chain = going right,
                      state/.append style = {
                      on chain,
                      draw=none,
                      },
                      ]
                      node (s0)[state] {$0$};
                      node (s1)[state] {$1$};
                      node (s2)[state] {$2$};

                      draw[->] (s0) edge[bend left] node {$Nlambda$} (s1)
                      (s1) edge[bend left] node {$lambda$} (s0)
                      (s1) edge[bend left] node {$(N-1)lambda$} (s2)
                      (s2) edge[bend left] node {$2lambda$} (s1)
                      ;

                      end{tikzpicture}
                      end{document}


                      enter image description here






                      share|improve this answer








                      New contributor



                      Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.
























                        1














                        Looks like a good application for tikz's chain library :



                        documentclass{article}
                        usepackage{tikz}
                        usetikzlibrary{automata,chains,positioning}
                        begin{document}

                        begin{tikzpicture}[
                        auto,
                        start chain = going right,
                        state/.append style = {
                        on chain,
                        draw=none,
                        },
                        ]
                        node (s0)[state] {$0$};
                        node (s1)[state] {$1$};
                        node (s2)[state] {$2$};

                        draw[->] (s0) edge[bend left] node {$Nlambda$} (s1)
                        (s1) edge[bend left] node {$lambda$} (s0)
                        (s1) edge[bend left] node {$(N-1)lambda$} (s2)
                        (s2) edge[bend left] node {$2lambda$} (s1)
                        ;

                        end{tikzpicture}
                        end{document}


                        enter image description here






                        share|improve this answer








                        New contributor



                        Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.






















                          1












                          1








                          1







                          Looks like a good application for tikz's chain library :



                          documentclass{article}
                          usepackage{tikz}
                          usetikzlibrary{automata,chains,positioning}
                          begin{document}

                          begin{tikzpicture}[
                          auto,
                          start chain = going right,
                          state/.append style = {
                          on chain,
                          draw=none,
                          },
                          ]
                          node (s0)[state] {$0$};
                          node (s1)[state] {$1$};
                          node (s2)[state] {$2$};

                          draw[->] (s0) edge[bend left] node {$Nlambda$} (s1)
                          (s1) edge[bend left] node {$lambda$} (s0)
                          (s1) edge[bend left] node {$(N-1)lambda$} (s2)
                          (s2) edge[bend left] node {$2lambda$} (s1)
                          ;

                          end{tikzpicture}
                          end{document}


                          enter image description here






                          share|improve this answer








                          New contributor



                          Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          Looks like a good application for tikz's chain library :



                          documentclass{article}
                          usepackage{tikz}
                          usetikzlibrary{automata,chains,positioning}
                          begin{document}

                          begin{tikzpicture}[
                          auto,
                          start chain = going right,
                          state/.append style = {
                          on chain,
                          draw=none,
                          },
                          ]
                          node (s0)[state] {$0$};
                          node (s1)[state] {$1$};
                          node (s2)[state] {$2$};

                          draw[->] (s0) edge[bend left] node {$Nlambda$} (s1)
                          (s1) edge[bend left] node {$lambda$} (s0)
                          (s1) edge[bend left] node {$(N-1)lambda$} (s2)
                          (s2) edge[bend left] node {$2lambda$} (s1)
                          ;

                          end{tikzpicture}
                          end{document}


                          enter image description here







                          share|improve this answer








                          New contributor



                          Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share|improve this answer



                          share|improve this answer






                          New contributor



                          Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          answered 3 hours ago









                          ÅkeÅke

                          274




                          274




                          New contributor



                          Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.




                          New contributor




                          Åke is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.
































                              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%2f491008%2fhow-can-i-fix-the-label-locations-on-my-tikzcd-diagram%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

                              Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

                              The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

                              Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...