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

bash: Counting characters within multiple files

Do high-wing aircraft represent more difficult engineering challenges than low-wing aircraft?

Is there an academic word that means "to split hairs over"?

Why can't I share a one use code with anyone else?

How does this piece of code determine array size without using sizeof( )?

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

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

Holding rent money for my friend which amounts to over $10k?

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

Why did nobody know who the Lord of this region was?

Is it standard to have the first week's pay indefinitely withheld?

Enqueue Queueable class multiple times

refer string as a field API name

How come Arya Stark didn't burn in Game of Thrones Season 8 Episode 5

Why do galaxies collide?

What dog breeds survive the apocalypse for generations?

Why do academics prefer Mac/Linux?

Roman Numerals Equation 2

What are the effects of eating many berries from the Goodberry spell per day?

Promotion comes with unexpected 24/7/365 on-call

Resistor Selection to retain same brightness in LED PWM circuit

Why does the U.S military use mercenaries?

Cannot remove door knob -- totally inaccessible!

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:



documentclassarticle

usepackagetikz-cd

begindocument

begintikzcd[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]
endtikzcd

begintikzcd[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]
endtikzcd

enddocument


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:



    documentclassarticle

    usepackagetikz-cd

    begindocument

    begintikzcd[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]
    endtikzcd

    begintikzcd[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]
    endtikzcd

    enddocument


    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:



      documentclassarticle

      usepackagetikz-cd

      begindocument

      begintikzcd[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]
      endtikzcd

      begintikzcd[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]
      endtikzcd

      enddocument


      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:



      documentclassarticle

      usepackagetikz-cd

      begindocument

      begintikzcd[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]
      endtikzcd

      begintikzcd[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]
      endtikzcd

      enddocument


      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


















          3














          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.



          documentclassarticle
          usepackagetikz-cd
          tikzcdsetad hoc fix/.style=r'/.style=r,/tikz/above,l'/.style=l,/tikz/below,
          every label/.append style=/tikz/auto=false

          begindocument
          begintikzcd[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]
          endtikzcd

          begintikzcd[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]
          endtikzcd
          enddocument


          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



          documentclassarticle

          usepackagetikz-cd

          begindocument

          begintikzcd[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]
          endtikzcd

          enddocument


          enter image description here






          share|improve this answer
































            3














            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:



            documentclassarticle
            usepackagetikz-cd

            begindocument
            begintikzcd[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"]
            endtikzcd
            enddocument


            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
              2 hours ago











            • @Åke, thank you very much !

              – Zarko
              2 hours ago











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

              – marmot
              2 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
              2 hours ago



















            1














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



            documentclassarticle
            usepackagetikz
            usetikzlibraryautomata,chains,positioning
            begindocument

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

            endtikzpicture
            enddocument


            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









              3














              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.



              documentclassarticle
              usepackagetikz-cd
              tikzcdsetad hoc fix/.style=r'/.style=r,/tikz/above,l'/.style=l,/tikz/below,
              every label/.append style=/tikz/auto=false

              begindocument
              begintikzcd[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]
              endtikzcd

              begintikzcd[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]
              endtikzcd
              enddocument


              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



              documentclassarticle

              usepackagetikz-cd

              begindocument

              begintikzcd[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]
              endtikzcd

              enddocument


              enter image description here






              share|improve this answer





























                3














                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.



                documentclassarticle
                usepackagetikz-cd
                tikzcdsetad hoc fix/.style=r'/.style=r,/tikz/above,l'/.style=l,/tikz/below,
                every label/.append style=/tikz/auto=false

                begindocument
                begintikzcd[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]
                endtikzcd

                begintikzcd[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]
                endtikzcd
                enddocument


                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



                documentclassarticle

                usepackagetikz-cd

                begindocument

                begintikzcd[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]
                endtikzcd

                enddocument


                enter image description here






                share|improve this answer



























                  3












                  3








                  3







                  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.



                  documentclassarticle
                  usepackagetikz-cd
                  tikzcdsetad hoc fix/.style=r'/.style=r,/tikz/above,l'/.style=l,/tikz/below,
                  every label/.append style=/tikz/auto=false

                  begindocument
                  begintikzcd[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]
                  endtikzcd

                  begintikzcd[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]
                  endtikzcd
                  enddocument


                  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



                  documentclassarticle

                  usepackagetikz-cd

                  begindocument

                  begintikzcd[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]
                  endtikzcd

                  enddocument


                  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.



                  documentclassarticle
                  usepackagetikz-cd
                  tikzcdsetad hoc fix/.style=r'/.style=r,/tikz/above,l'/.style=l,/tikz/below,
                  every label/.append style=/tikz/auto=false

                  begindocument
                  begintikzcd[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]
                  endtikzcd

                  begintikzcd[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]
                  endtikzcd
                  enddocument


                  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



                  documentclassarticle

                  usepackagetikz-cd

                  begindocument

                  begintikzcd[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]
                  endtikzcd

                  enddocument


                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 3 hours ago

























                  answered 3 hours ago









                  marmotmarmot

                  127k6162308




                  127k6162308





















                      3














                      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:



                      documentclassarticle
                      usepackagetikz-cd

                      begindocument
                      begintikzcd[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"]
                      endtikzcd
                      enddocument


                      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
                        2 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        2 hours ago











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

                        – marmot
                        2 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
                        2 hours ago
















                      3














                      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:



                      documentclassarticle
                      usepackagetikz-cd

                      begindocument
                      begintikzcd[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"]
                      endtikzcd
                      enddocument


                      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
                        2 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        2 hours ago











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

                        – marmot
                        2 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
                        2 hours ago














                      3












                      3








                      3







                      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:



                      documentclassarticle
                      usepackagetikz-cd

                      begindocument
                      begintikzcd[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"]
                      endtikzcd
                      enddocument


                      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:



                      documentclassarticle
                      usepackagetikz-cd

                      begindocument
                      begintikzcd[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"]
                      endtikzcd
                      enddocument


                      enter image description here







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 2 hours ago

























                      answered 3 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
                        2 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        2 hours ago











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

                        – marmot
                        2 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
                        2 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
                        2 hours ago











                      • @Åke, thank you very much !

                        – Zarko
                        2 hours ago











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

                        – marmot
                        2 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
                        2 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
                      2 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
                      2 hours ago













                      @Åke, thank you very much !

                      – Zarko
                      2 hours ago





                      @Åke, thank you very much !

                      – Zarko
                      2 hours ago













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

                      – marmot
                      2 hours ago





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

                      – marmot
                      2 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
                      2 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
                      2 hours ago












                      1














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



                      documentclassarticle
                      usepackagetikz
                      usetikzlibraryautomata,chains,positioning
                      begindocument

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

                      endtikzpicture
                      enddocument


                      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 :



                        documentclassarticle
                        usepackagetikz
                        usetikzlibraryautomata,chains,positioning
                        begindocument

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

                        endtikzpicture
                        enddocument


                        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 :



                          documentclassarticle
                          usepackagetikz
                          usetikzlibraryautomata,chains,positioning
                          begindocument

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

                          endtikzpicture
                          enddocument


                          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 :



                          documentclassarticle
                          usepackagetikz
                          usetikzlibraryautomata,chains,positioning
                          begindocument

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

                          endtikzpicture
                          enddocument


                          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 2 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