Tikzmark, Arrows (Exponents and Bases)

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite












I would like to improve this program. For example, make the arrows more like semi-circles and bring down the words base and exponent. Any suggestions how I can do this from this start/minimal example?



 documentclassarticle
usepackageamsmath % loaded automatically by beamer
usepackagetikz
usetikzlibrarypositioning
tikzset>=stealth

newcommandtikzmark[3]tikz[overlay,remember picture,baseline] node
[anchor=base,#1](#2) #3;

begindocument

beginequation*
tikzmark[blue]base$b^,,tikzmark[red]exponenta$
endequation*
begintikzpicture[overlay, remember picture,node distance =.2cm]
node[blue] (basedescr) [below right=of base]base;
draw[,->,thick] (basedescr.west) to [in=315,out=225] (base.south);
node[red] (exponentdescr) [above right=of exponent] exponent;
draw[->,thick] (exponentdescr.west) to [in=65,out=135] (exponent.north);
endtikzpicture
enddocument


enter image description here










share|improve this question



























    up vote
    5
    down vote

    favorite












    I would like to improve this program. For example, make the arrows more like semi-circles and bring down the words base and exponent. Any suggestions how I can do this from this start/minimal example?



     documentclassarticle
    usepackageamsmath % loaded automatically by beamer
    usepackagetikz
    usetikzlibrarypositioning
    tikzset>=stealth

    newcommandtikzmark[3]tikz[overlay,remember picture,baseline] node
    [anchor=base,#1](#2) #3;

    begindocument

    beginequation*
    tikzmark[blue]base$b^,,tikzmark[red]exponenta$
    endequation*
    begintikzpicture[overlay, remember picture,node distance =.2cm]
    node[blue] (basedescr) [below right=of base]base;
    draw[,->,thick] (basedescr.west) to [in=315,out=225] (base.south);
    node[red] (exponentdescr) [above right=of exponent] exponent;
    draw[->,thick] (exponentdescr.west) to [in=65,out=135] (exponent.north);
    endtikzpicture
    enddocument


    enter image description here










    share|improve this question

























      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      I would like to improve this program. For example, make the arrows more like semi-circles and bring down the words base and exponent. Any suggestions how I can do this from this start/minimal example?



       documentclassarticle
      usepackageamsmath % loaded automatically by beamer
      usepackagetikz
      usetikzlibrarypositioning
      tikzset>=stealth

      newcommandtikzmark[3]tikz[overlay,remember picture,baseline] node
      [anchor=base,#1](#2) #3;

      begindocument

      beginequation*
      tikzmark[blue]base$b^,,tikzmark[red]exponenta$
      endequation*
      begintikzpicture[overlay, remember picture,node distance =.2cm]
      node[blue] (basedescr) [below right=of base]base;
      draw[,->,thick] (basedescr.west) to [in=315,out=225] (base.south);
      node[red] (exponentdescr) [above right=of exponent] exponent;
      draw[->,thick] (exponentdescr.west) to [in=65,out=135] (exponent.north);
      endtikzpicture
      enddocument


      enter image description here










      share|improve this question















      I would like to improve this program. For example, make the arrows more like semi-circles and bring down the words base and exponent. Any suggestions how I can do this from this start/minimal example?



       documentclassarticle
      usepackageamsmath % loaded automatically by beamer
      usepackagetikz
      usetikzlibrarypositioning
      tikzset>=stealth

      newcommandtikzmark[3]tikz[overlay,remember picture,baseline] node
      [anchor=base,#1](#2) #3;

      begindocument

      beginequation*
      tikzmark[blue]base$b^,,tikzmark[red]exponenta$
      endequation*
      begintikzpicture[overlay, remember picture,node distance =.2cm]
      node[blue] (basedescr) [below right=of base]base;
      draw[,->,thick] (basedescr.west) to [in=315,out=225] (base.south);
      node[red] (exponentdescr) [above right=of exponent] exponent;
      draw[->,thick] (exponentdescr.west) to [in=65,out=135] (exponent.north);
      endtikzpicture
      enddocument


      enter image description here







      tikz-pgf tikz-arrows






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 9 at 17:15









      marmot

      56.8k462124




      56.8k462124










      asked Sep 9 at 17:12









      MathScholar

      453




      453




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          5
          down vote













          In your example, you were nesting tikzpictures since you were putting a tikzpicture in the node of another tikzpicture. This is usually not a good idea. Then I replaced tikzmark, which actually is a well-defined command in the tikzmark package, by a slightly modified version of Torbjørn T.'s tikznode command. As for the arcs, they can be easily drawn with the arc syntax, and personally I like bent arrow heads better.



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here



          EDIT: Answers to your questions.



          1. You have tikzmark[blue]base$b^,,tikzmark[red]exponenta$. This expands to tikz[...]node[...]...tikz[...]node[...]...;;, which is a TikZ picture inside a TikZ picture, aka nested tikzpicture.

          2. If you use the below right key, say, you can pass to it two distances separated by and, e.g. below right=2pt and 2mm of base will move the thing only 2pt down but 2mm right. If you want it the basedescr node further up, you may either use negative dimensions, or something like right=2mm of base,yshift=-6pt.

          Here is the updated code. There are good chances that you will get a much better answers using LoopSpace's great tikzmark library. which has new commands that are superior to the (nevertheless very nice and useful) tikznode command by Torbjørn T..



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,inner sep=0pt]
          node[blue] (basedescr) [below right=2pt and 2mm of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=2pt and 2mm of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer






















          • Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
            – MathScholar
            Sep 9 at 19:54











          • @MathScholar I addressed your questions in an update of the answer.
            – marmot
            Sep 9 at 20:19

















          up vote
          5
          down vote













          I've just added a version of Torbjørn's tikznode (which is itself a version of the original tikzmark) to the tikzmark library. It needs some testing before being sent to CTAN so I'm taking this opportunity to test it. In the meantime, it is available from github. With it, marmot's solution becomes:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/450135/86
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending,tikzmark

          begindocument

          beginequation*
          tikzmarknode[blue]baseb^tikzmarknode[red]exponenta
          endequation*

          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=.5cm of base]base;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=.5cm of exponent] exponent;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture

          enddocument


          (I added a little bit of space between the items and their explanations and shortened the arrows as well.)



          tikzmark in maths






          share|improve this answer




















          • @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
            – Loop Space
            Sep 9 at 20:26










          • @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
            – Loop Space
            Sep 9 at 20:48










          • Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
            – marmot
            Sep 9 at 20:54










          • @marmot And I just voted for it.
            – Loop Space
            Sep 9 at 20:57










          • Max may have found an issue, or I did something wrong.
            – marmot
            2 days ago










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f450135%2ftikzmark-arrows-exponents-and-bases%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          5
          down vote













          In your example, you were nesting tikzpictures since you were putting a tikzpicture in the node of another tikzpicture. This is usually not a good idea. Then I replaced tikzmark, which actually is a well-defined command in the tikzmark package, by a slightly modified version of Torbjørn T.'s tikznode command. As for the arcs, they can be easily drawn with the arc syntax, and personally I like bent arrow heads better.



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here



          EDIT: Answers to your questions.



          1. You have tikzmark[blue]base$b^,,tikzmark[red]exponenta$. This expands to tikz[...]node[...]...tikz[...]node[...]...;;, which is a TikZ picture inside a TikZ picture, aka nested tikzpicture.

          2. If you use the below right key, say, you can pass to it two distances separated by and, e.g. below right=2pt and 2mm of base will move the thing only 2pt down but 2mm right. If you want it the basedescr node further up, you may either use negative dimensions, or something like right=2mm of base,yshift=-6pt.

          Here is the updated code. There are good chances that you will get a much better answers using LoopSpace's great tikzmark library. which has new commands that are superior to the (nevertheless very nice and useful) tikznode command by Torbjørn T..



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,inner sep=0pt]
          node[blue] (basedescr) [below right=2pt and 2mm of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=2pt and 2mm of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer






















          • Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
            – MathScholar
            Sep 9 at 19:54











          • @MathScholar I addressed your questions in an update of the answer.
            – marmot
            Sep 9 at 20:19














          up vote
          5
          down vote













          In your example, you were nesting tikzpictures since you were putting a tikzpicture in the node of another tikzpicture. This is usually not a good idea. Then I replaced tikzmark, which actually is a well-defined command in the tikzmark package, by a slightly modified version of Torbjørn T.'s tikznode command. As for the arcs, they can be easily drawn with the arc syntax, and personally I like bent arrow heads better.



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here



          EDIT: Answers to your questions.



          1. You have tikzmark[blue]base$b^,,tikzmark[red]exponenta$. This expands to tikz[...]node[...]...tikz[...]node[...]...;;, which is a TikZ picture inside a TikZ picture, aka nested tikzpicture.

          2. If you use the below right key, say, you can pass to it two distances separated by and, e.g. below right=2pt and 2mm of base will move the thing only 2pt down but 2mm right. If you want it the basedescr node further up, you may either use negative dimensions, or something like right=2mm of base,yshift=-6pt.

          Here is the updated code. There are good chances that you will get a much better answers using LoopSpace's great tikzmark library. which has new commands that are superior to the (nevertheless very nice and useful) tikznode command by Torbjørn T..



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,inner sep=0pt]
          node[blue] (basedescr) [below right=2pt and 2mm of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=2pt and 2mm of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer






















          • Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
            – MathScholar
            Sep 9 at 19:54











          • @MathScholar I addressed your questions in an update of the answer.
            – marmot
            Sep 9 at 20:19












          up vote
          5
          down vote










          up vote
          5
          down vote









          In your example, you were nesting tikzpictures since you were putting a tikzpicture in the node of another tikzpicture. This is usually not a good idea. Then I replaced tikzmark, which actually is a well-defined command in the tikzmark package, by a slightly modified version of Torbjørn T.'s tikznode command. As for the arcs, they can be easily drawn with the arc syntax, and personally I like bent arrow heads better.



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here



          EDIT: Answers to your questions.



          1. You have tikzmark[blue]base$b^,,tikzmark[red]exponenta$. This expands to tikz[...]node[...]...tikz[...]node[...]...;;, which is a TikZ picture inside a TikZ picture, aka nested tikzpicture.

          2. If you use the below right key, say, you can pass to it two distances separated by and, e.g. below right=2pt and 2mm of base will move the thing only 2pt down but 2mm right. If you want it the basedescr node further up, you may either use negative dimensions, or something like right=2mm of base,yshift=-6pt.

          Here is the updated code. There are good chances that you will get a much better answers using LoopSpace's great tikzmark library. which has new commands that are superior to the (nevertheless very nice and useful) tikznode command by Torbjørn T..



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,inner sep=0pt]
          node[blue] (basedescr) [below right=2pt and 2mm of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=2pt and 2mm of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer














          In your example, you were nesting tikzpictures since you were putting a tikzpicture in the node of another tikzpicture. This is usually not a good idea. Then I replaced tikzmark, which actually is a well-defined command in the tikzmark package, by a slightly modified version of Torbjørn T.'s tikznode command. As for the arcs, they can be easily drawn with the arc syntax, and personally I like bent arrow heads better.



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here



          EDIT: Answers to your questions.



          1. You have tikzmark[blue]base$b^,,tikzmark[red]exponenta$. This expands to tikz[...]node[...]...tikz[...]node[...]...;;, which is a TikZ picture inside a TikZ picture, aka nested tikzpicture.

          2. If you use the below right key, say, you can pass to it two distances separated by and, e.g. below right=2pt and 2mm of base will move the thing only 2pt down but 2mm right. If you want it the basedescr node further up, you may either use negative dimensions, or something like right=2mm of base,yshift=-6pt.

          Here is the updated code. There are good chances that you will get a much better answers using LoopSpace's great tikzmark library. which has new commands that are superior to the (nevertheless very nice and useful) tikznode command by Torbjørn T..



          documentclassarticle
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending
          newcommandtikznode[3]relax
          ifmmode%
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) $#3$;
          else
          tikz[remember picture,baseline=(#2.base),inner sep=0pt]node[#1] (#2) #3;%
          fi
          begindocument

          beginequation*
          tikznode[blue]baseb^tikznode[red]exponenta
          endequation*
          begintikzpicture[overlay, remember picture,inner sep=0pt]
          node[blue] (basedescr) [below right=2pt and 2mm of base]base;
          draw[-Stealth[bend],thick] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=2pt and 2mm of exponent] exponent;
          draw[-Stealth[bend],thick] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Sep 9 at 20:18

























          answered Sep 9 at 17:35









          marmot

          56.8k462124




          56.8k462124











          • Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
            – MathScholar
            Sep 9 at 19:54











          • @MathScholar I addressed your questions in an update of the answer.
            – marmot
            Sep 9 at 20:19
















          • Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
            – MathScholar
            Sep 9 at 19:54











          • @MathScholar I addressed your questions in an update of the answer.
            – marmot
            Sep 9 at 20:19















          Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
          – MathScholar
          Sep 9 at 19:54





          Hello, how can I bring the word 'exponent' down and the word 'base' up. If I can achieve that then I can finish the rest. Not sure how I nested a tikzpicture node within a node?
          – MathScholar
          Sep 9 at 19:54













          @MathScholar I addressed your questions in an update of the answer.
          – marmot
          Sep 9 at 20:19




          @MathScholar I addressed your questions in an update of the answer.
          – marmot
          Sep 9 at 20:19










          up vote
          5
          down vote













          I've just added a version of Torbjørn's tikznode (which is itself a version of the original tikzmark) to the tikzmark library. It needs some testing before being sent to CTAN so I'm taking this opportunity to test it. In the meantime, it is available from github. With it, marmot's solution becomes:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/450135/86
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending,tikzmark

          begindocument

          beginequation*
          tikzmarknode[blue]baseb^tikzmarknode[red]exponenta
          endequation*

          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=.5cm of base]base;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=.5cm of exponent] exponent;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture

          enddocument


          (I added a little bit of space between the items and their explanations and shortened the arrows as well.)



          tikzmark in maths






          share|improve this answer




















          • @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
            – Loop Space
            Sep 9 at 20:26










          • @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
            – Loop Space
            Sep 9 at 20:48










          • Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
            – marmot
            Sep 9 at 20:54










          • @marmot And I just voted for it.
            – Loop Space
            Sep 9 at 20:57










          • Max may have found an issue, or I did something wrong.
            – marmot
            2 days ago














          up vote
          5
          down vote













          I've just added a version of Torbjørn's tikznode (which is itself a version of the original tikzmark) to the tikzmark library. It needs some testing before being sent to CTAN so I'm taking this opportunity to test it. In the meantime, it is available from github. With it, marmot's solution becomes:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/450135/86
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending,tikzmark

          begindocument

          beginequation*
          tikzmarknode[blue]baseb^tikzmarknode[red]exponenta
          endequation*

          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=.5cm of base]base;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=.5cm of exponent] exponent;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture

          enddocument


          (I added a little bit of space between the items and their explanations and shortened the arrows as well.)



          tikzmark in maths






          share|improve this answer




















          • @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
            – Loop Space
            Sep 9 at 20:26










          • @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
            – Loop Space
            Sep 9 at 20:48










          • Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
            – marmot
            Sep 9 at 20:54










          • @marmot And I just voted for it.
            – Loop Space
            Sep 9 at 20:57










          • Max may have found an issue, or I did something wrong.
            – marmot
            2 days ago












          up vote
          5
          down vote










          up vote
          5
          down vote









          I've just added a version of Torbjørn's tikznode (which is itself a version of the original tikzmark) to the tikzmark library. It needs some testing before being sent to CTAN so I'm taking this opportunity to test it. In the meantime, it is available from github. With it, marmot's solution becomes:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/450135/86
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending,tikzmark

          begindocument

          beginequation*
          tikzmarknode[blue]baseb^tikzmarknode[red]exponenta
          endequation*

          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=.5cm of base]base;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=.5cm of exponent] exponent;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture

          enddocument


          (I added a little bit of space between the items and their explanations and shortened the arrows as well.)



          tikzmark in maths






          share|improve this answer












          I've just added a version of Torbjørn's tikznode (which is itself a version of the original tikzmark) to the tikzmark library. It needs some testing before being sent to CTAN so I'm taking this opportunity to test it. In the meantime, it is available from github. With it, marmot's solution becomes:



          documentclassarticle
          %urlhttps://tex.stackexchange.com/q/450135/86
          usepackageamsmath
          usepackagetikz
          usetikzlibrarypositioning,calc,arrows.meta,bending,tikzmark

          begindocument

          beginequation*
          tikzmarknode[blue]baseb^tikzmarknode[red]exponenta
          endequation*

          begintikzpicture[overlay, remember picture,node distance =.2cm,inner sep=0pt]
          node[blue] (basedescr) [below right=.5cm of base]base;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(basedescr.west)-(base.south)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in
          (basedescr.west) arc(n1-45:n1-135:n2) ;
          node[red] (exponentdescr) [above right=.5cm of exponent] exponent;
          draw[-Stealth[bend],thick,shorten >=2pt] let p1=($(exponentdescr.west)-(exponent.north)$),
          n1=ifthenelse(x1>0,atan2(y1,x1),atan2(y1,x1)-180),
          n2=veclen(x1,y1)/sqrt(2)
          in (exponentdescr.west) arc(n1+45:n1+135:n2);
          endtikzpicture

          enddocument


          (I added a little bit of space between the items and their explanations and shortened the arrows as well.)



          tikzmark in maths







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Sep 9 at 20:19









          Loop Space

          110k28290593




          110k28290593











          • @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
            – Loop Space
            Sep 9 at 20:26










          • @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
            – Loop Space
            Sep 9 at 20:48










          • Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
            – marmot
            Sep 9 at 20:54










          • @marmot And I just voted for it.
            – Loop Space
            Sep 9 at 20:57










          • Max may have found an issue, or I did something wrong.
            – marmot
            2 days ago
















          • @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
            – Loop Space
            Sep 9 at 20:26










          • @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
            – Loop Space
            Sep 9 at 20:48










          • Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
            – marmot
            Sep 9 at 20:54










          • @marmot And I just voted for it.
            – Loop Space
            Sep 9 at 20:57










          • Max may have found an issue, or I did something wrong.
            – marmot
            2 days ago















          @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
          – Loop Space
          Sep 9 at 20:26




          @marmot Thanks. It could do with a bit of testing before sending to CTAN so if you know of any other tests please send them my way.
          – Loop Space
          Sep 9 at 20:26












          @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
          – Loop Space
          Sep 9 at 20:48




          @marmot Not overly sure what's being asked for in that one. And re Torbjørn's answer, I did look at the linked questions from his question but he also links many other answers so I need a bit of time to work through to see which ones are from your answers.
          – Loop Space
          Sep 9 at 20:48












          Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
          – marmot
          Sep 9 at 20:54




          Yes, I know that the search tools on this site are not great. I just posted a fun answer here to try out your great library. It works great. I'm gonna use it a lot when it is official. (My most common use is in beamer presentations, where I attach callouts to symbols that I want to explain. So I guess I will test it with beamer and the aobs library in the near future.)
          – marmot
          Sep 9 at 20:54












          @marmot And I just voted for it.
          – Loop Space
          Sep 9 at 20:57




          @marmot And I just voted for it.
          – Loop Space
          Sep 9 at 20:57












          Max may have found an issue, or I did something wrong.
          – marmot
          2 days ago




          Max may have found an issue, or I did something wrong.
          – marmot
          2 days ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f450135%2ftikzmark-arrows-exponents-and-bases%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          One-line joke