Make curvearrowright longer











up vote
4
down vote

favorite












When I use the arc symbol in LaTeX, I use this piece of code (adding to the preamble):



usepackage{scalerel}
usepackage{stackengine}
stackMath
newsaveboxtmpbox
newcommandreallywidefrown[1]{
ThisStyle{
sboxtmpbox{$SavedStyle#1$}
stackon[0pt]{usebox{tmpbox}}{
stretchto{
scaleto{
scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
{rule[-textheight/2]{1ex}{textheight}}
}{textheight}
}{0.8ex}
}
}
}


(Source: Steven B. Segletes' answer)



It outputs a very good arc symbol:



documentclass{article}
usepackage{scalerel}
usepackage{stackengine}
stackMath
newsaveboxtmpbox
newcommandreallywidefrown[1]{
ThisStyle{
sboxtmpbox{$SavedStyle#1$}
stackon[0pt]{usebox{tmpbox}}{
stretchto{
scaleto{
scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
{rule[-textheight/2]{1ex}{textheight}}
}{textheight}
}{0.8ex}
}
}
}
begin{document}
$reallywidefrown{AB}$qquad$reallywidefrown{ABC}$
end{document}


enter image description here





Now I am typing a document which is about trigonometry, and the trigonometric arc symbol should look like this



enter image description here



(I use Windows Paint. Sorry for bad quality, but I can't find a better way to illustrate the symbol)



I went to Detexify to get the command curvearrowright in the amssymb package. However, it looks too short:



documentclass{article}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
$overset{curvearrowright}{AB}$qquad$overset{curvearrowright}{ABC}$
end{document}


enter image description here



Is there any way to define a command like reallywidecurvearrowright{} (or shorter like trigarc{} 😃) so that the length of the symbol suits the length of the letters below it, like what Segletes' reallywidefrown{} does?



Actually the task would be much easier to me if I understand what Segletes wrote, but unfortunately I understand nothing ☹️ So I will thank you very much if you show me a brief explaination of the reallywidefrown{} definition.



Any help will be highly appreciated!










share|improve this question




























    up vote
    4
    down vote

    favorite












    When I use the arc symbol in LaTeX, I use this piece of code (adding to the preamble):



    usepackage{scalerel}
    usepackage{stackengine}
    stackMath
    newsaveboxtmpbox
    newcommandreallywidefrown[1]{
    ThisStyle{
    sboxtmpbox{$SavedStyle#1$}
    stackon[0pt]{usebox{tmpbox}}{
    stretchto{
    scaleto{
    scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
    {rule[-textheight/2]{1ex}{textheight}}
    }{textheight}
    }{0.8ex}
    }
    }
    }


    (Source: Steven B. Segletes' answer)



    It outputs a very good arc symbol:



    documentclass{article}
    usepackage{scalerel}
    usepackage{stackengine}
    stackMath
    newsaveboxtmpbox
    newcommandreallywidefrown[1]{
    ThisStyle{
    sboxtmpbox{$SavedStyle#1$}
    stackon[0pt]{usebox{tmpbox}}{
    stretchto{
    scaleto{
    scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
    {rule[-textheight/2]{1ex}{textheight}}
    }{textheight}
    }{0.8ex}
    }
    }
    }
    begin{document}
    $reallywidefrown{AB}$qquad$reallywidefrown{ABC}$
    end{document}


    enter image description here





    Now I am typing a document which is about trigonometry, and the trigonometric arc symbol should look like this



    enter image description here



    (I use Windows Paint. Sorry for bad quality, but I can't find a better way to illustrate the symbol)



    I went to Detexify to get the command curvearrowright in the amssymb package. However, it looks too short:



    documentclass{article}
    usepackage{amsmath}
    usepackage{amssymb}
    begin{document}
    $overset{curvearrowright}{AB}$qquad$overset{curvearrowright}{ABC}$
    end{document}


    enter image description here



    Is there any way to define a command like reallywidecurvearrowright{} (or shorter like trigarc{} 😃) so that the length of the symbol suits the length of the letters below it, like what Segletes' reallywidefrown{} does?



    Actually the task would be much easier to me if I understand what Segletes wrote, but unfortunately I understand nothing ☹️ So I will thank you very much if you show me a brief explaination of the reallywidefrown{} definition.



    Any help will be highly appreciated!










    share|improve this question


























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      When I use the arc symbol in LaTeX, I use this piece of code (adding to the preamble):



      usepackage{scalerel}
      usepackage{stackengine}
      stackMath
      newsaveboxtmpbox
      newcommandreallywidefrown[1]{
      ThisStyle{
      sboxtmpbox{$SavedStyle#1$}
      stackon[0pt]{usebox{tmpbox}}{
      stretchto{
      scaleto{
      scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
      {rule[-textheight/2]{1ex}{textheight}}
      }{textheight}
      }{0.8ex}
      }
      }
      }


      (Source: Steven B. Segletes' answer)



      It outputs a very good arc symbol:



      documentclass{article}
      usepackage{scalerel}
      usepackage{stackengine}
      stackMath
      newsaveboxtmpbox
      newcommandreallywidefrown[1]{
      ThisStyle{
      sboxtmpbox{$SavedStyle#1$}
      stackon[0pt]{usebox{tmpbox}}{
      stretchto{
      scaleto{
      scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
      {rule[-textheight/2]{1ex}{textheight}}
      }{textheight}
      }{0.8ex}
      }
      }
      }
      begin{document}
      $reallywidefrown{AB}$qquad$reallywidefrown{ABC}$
      end{document}


      enter image description here





      Now I am typing a document which is about trigonometry, and the trigonometric arc symbol should look like this



      enter image description here



      (I use Windows Paint. Sorry for bad quality, but I can't find a better way to illustrate the symbol)



      I went to Detexify to get the command curvearrowright in the amssymb package. However, it looks too short:



      documentclass{article}
      usepackage{amsmath}
      usepackage{amssymb}
      begin{document}
      $overset{curvearrowright}{AB}$qquad$overset{curvearrowright}{ABC}$
      end{document}


      enter image description here



      Is there any way to define a command like reallywidecurvearrowright{} (or shorter like trigarc{} 😃) so that the length of the symbol suits the length of the letters below it, like what Segletes' reallywidefrown{} does?



      Actually the task would be much easier to me if I understand what Segletes wrote, but unfortunately I understand nothing ☹️ So I will thank you very much if you show me a brief explaination of the reallywidefrown{} definition.



      Any help will be highly appreciated!










      share|improve this question















      When I use the arc symbol in LaTeX, I use this piece of code (adding to the preamble):



      usepackage{scalerel}
      usepackage{stackengine}
      stackMath
      newsaveboxtmpbox
      newcommandreallywidefrown[1]{
      ThisStyle{
      sboxtmpbox{$SavedStyle#1$}
      stackon[0pt]{usebox{tmpbox}}{
      stretchto{
      scaleto{
      scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
      {rule[-textheight/2]{1ex}{textheight}}
      }{textheight}
      }{0.8ex}
      }
      }
      }


      (Source: Steven B. Segletes' answer)



      It outputs a very good arc symbol:



      documentclass{article}
      usepackage{scalerel}
      usepackage{stackengine}
      stackMath
      newsaveboxtmpbox
      newcommandreallywidefrown[1]{
      ThisStyle{
      sboxtmpbox{$SavedStyle#1$}
      stackon[0pt]{usebox{tmpbox}}{
      stretchto{
      scaleto{
      scalerel*[wdtmpbox]{mkern-.8mufrownmkern-.8mu}
      {rule[-textheight/2]{1ex}{textheight}}
      }{textheight}
      }{0.8ex}
      }
      }
      }
      begin{document}
      $reallywidefrown{AB}$qquad$reallywidefrown{ABC}$
      end{document}


      enter image description here





      Now I am typing a document which is about trigonometry, and the trigonometric arc symbol should look like this



      enter image description here



      (I use Windows Paint. Sorry for bad quality, but I can't find a better way to illustrate the symbol)



      I went to Detexify to get the command curvearrowright in the amssymb package. However, it looks too short:



      documentclass{article}
      usepackage{amsmath}
      usepackage{amssymb}
      begin{document}
      $overset{curvearrowright}{AB}$qquad$overset{curvearrowright}{ABC}$
      end{document}


      enter image description here



      Is there any way to define a command like reallywidecurvearrowright{} (or shorter like trigarc{} 😃) so that the length of the symbol suits the length of the letters below it, like what Segletes' reallywidefrown{} does?



      Actually the task would be much easier to me if I understand what Segletes wrote, but unfortunately I understand nothing ☹️ So I will thank you very much if you show me a brief explaination of the reallywidefrown{} definition.



      Any help will be highly appreciated!







      math-mode symbols amsmath amssymb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 27 at 13:50

























      asked Nov 27 at 8:31









      Dũng Vũ

      1,627423




      1,627423






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          You could use the tikzmark toy for this:



          enter image description here



          documentclass{article}

          usepackage{tikz}
          usetikzlibrary{tikzmark}

          newcounter{carrowover}
          newcommand{carrowover}[2][2ex]{stepcounter{carrowover}tikzset{tikzmark
          prefix=thecarrowover}tikzmark{start}#2tikzmark{stop}tikz[remember
          picture, overlay]{draw[->]([shift={(.5ex,#1)}]pic cs:start) to[bend
          left] ([shift={(-.5ex,#1)}]pic cs:stop);}}

          begin{document}
          ( carrowover{ABC} )

          ( carrowover[1.5ex]{abc} )
          end{document}


          Note you need to compile twice to get the correct placement. I have provide an optional argument to carrowover that specifies the vertical position of the arrow (relative to the baseline).



          tikzmark works by saving positions and that can be used in a subsequent tikz picture. To specify unique names for these positions I have introduced a counter and used the tikzmark prefix option to adjust the labels each time.






          share|improve this answer























          • Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
            – Dũng Vũ
            Nov 28 at 5:46










          • Thank you. I think stretching the curvearrowright symbol would give poor results.
            – Andrew Swann
            Nov 28 at 12:34













          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: 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%2f461961%2fmake-curvearrowright-longer%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          You could use the tikzmark toy for this:



          enter image description here



          documentclass{article}

          usepackage{tikz}
          usetikzlibrary{tikzmark}

          newcounter{carrowover}
          newcommand{carrowover}[2][2ex]{stepcounter{carrowover}tikzset{tikzmark
          prefix=thecarrowover}tikzmark{start}#2tikzmark{stop}tikz[remember
          picture, overlay]{draw[->]([shift={(.5ex,#1)}]pic cs:start) to[bend
          left] ([shift={(-.5ex,#1)}]pic cs:stop);}}

          begin{document}
          ( carrowover{ABC} )

          ( carrowover[1.5ex]{abc} )
          end{document}


          Note you need to compile twice to get the correct placement. I have provide an optional argument to carrowover that specifies the vertical position of the arrow (relative to the baseline).



          tikzmark works by saving positions and that can be used in a subsequent tikz picture. To specify unique names for these positions I have introduced a counter and used the tikzmark prefix option to adjust the labels each time.






          share|improve this answer























          • Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
            – Dũng Vũ
            Nov 28 at 5:46










          • Thank you. I think stretching the curvearrowright symbol would give poor results.
            – Andrew Swann
            Nov 28 at 12:34

















          up vote
          3
          down vote



          accepted










          You could use the tikzmark toy for this:



          enter image description here



          documentclass{article}

          usepackage{tikz}
          usetikzlibrary{tikzmark}

          newcounter{carrowover}
          newcommand{carrowover}[2][2ex]{stepcounter{carrowover}tikzset{tikzmark
          prefix=thecarrowover}tikzmark{start}#2tikzmark{stop}tikz[remember
          picture, overlay]{draw[->]([shift={(.5ex,#1)}]pic cs:start) to[bend
          left] ([shift={(-.5ex,#1)}]pic cs:stop);}}

          begin{document}
          ( carrowover{ABC} )

          ( carrowover[1.5ex]{abc} )
          end{document}


          Note you need to compile twice to get the correct placement. I have provide an optional argument to carrowover that specifies the vertical position of the arrow (relative to the baseline).



          tikzmark works by saving positions and that can be used in a subsequent tikz picture. To specify unique names for these positions I have introduced a counter and used the tikzmark prefix option to adjust the labels each time.






          share|improve this answer























          • Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
            – Dũng Vũ
            Nov 28 at 5:46










          • Thank you. I think stretching the curvearrowright symbol would give poor results.
            – Andrew Swann
            Nov 28 at 12:34















          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          You could use the tikzmark toy for this:



          enter image description here



          documentclass{article}

          usepackage{tikz}
          usetikzlibrary{tikzmark}

          newcounter{carrowover}
          newcommand{carrowover}[2][2ex]{stepcounter{carrowover}tikzset{tikzmark
          prefix=thecarrowover}tikzmark{start}#2tikzmark{stop}tikz[remember
          picture, overlay]{draw[->]([shift={(.5ex,#1)}]pic cs:start) to[bend
          left] ([shift={(-.5ex,#1)}]pic cs:stop);}}

          begin{document}
          ( carrowover{ABC} )

          ( carrowover[1.5ex]{abc} )
          end{document}


          Note you need to compile twice to get the correct placement. I have provide an optional argument to carrowover that specifies the vertical position of the arrow (relative to the baseline).



          tikzmark works by saving positions and that can be used in a subsequent tikz picture. To specify unique names for these positions I have introduced a counter and used the tikzmark prefix option to adjust the labels each time.






          share|improve this answer














          You could use the tikzmark toy for this:



          enter image description here



          documentclass{article}

          usepackage{tikz}
          usetikzlibrary{tikzmark}

          newcounter{carrowover}
          newcommand{carrowover}[2][2ex]{stepcounter{carrowover}tikzset{tikzmark
          prefix=thecarrowover}tikzmark{start}#2tikzmark{stop}tikz[remember
          picture, overlay]{draw[->]([shift={(.5ex,#1)}]pic cs:start) to[bend
          left] ([shift={(-.5ex,#1)}]pic cs:stop);}}

          begin{document}
          ( carrowover{ABC} )

          ( carrowover[1.5ex]{abc} )
          end{document}


          Note you need to compile twice to get the correct placement. I have provide an optional argument to carrowover that specifies the vertical position of the arrow (relative to the baseline).



          tikzmark works by saving positions and that can be used in a subsequent tikz picture. To specify unique names for these positions I have introduced a counter and used the tikzmark prefix option to adjust the labels each time.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 27 at 16:33

























          answered Nov 27 at 16:26









          Andrew Swann

          76.2k9127324




          76.2k9127324












          • Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
            – Dũng Vũ
            Nov 28 at 5:46










          • Thank you. I think stretching the curvearrowright symbol would give poor results.
            – Andrew Swann
            Nov 28 at 12:34




















          • Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
            – Dũng Vũ
            Nov 28 at 5:46










          • Thank you. I think stretching the curvearrowright symbol would give poor results.
            – Andrew Swann
            Nov 28 at 12:34


















          Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
          – Dũng Vũ
          Nov 28 at 5:46




          Amazing! Thank you very much! Although this way doesn't follow the approach I said in the question, but it is wonderful.
          – Dũng Vũ
          Nov 28 at 5:46












          Thank you. I think stretching the curvearrowright symbol would give poor results.
          – Andrew Swann
          Nov 28 at 12:34






          Thank you. I think stretching the curvearrowright symbol would give poor results.
          – Andrew Swann
          Nov 28 at 12:34




















          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f461961%2fmake-curvearrowright-longer%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

          ComboBox Display Member on multiple fields

          Is it possible to collect Nectar points via Trainline?