bend text between ellipsoids










7















I want to have some text aligned to the center of the top or bottom of an ellipse. I've tried



documentclass[border=0.5]standalone
usepackage[utf8]inputenc
usepackage[T1]fontenc
usepackagemathtools,amsmath
usepackagetikz
usepackagepgfplots
pgfplotssetcompat=1.15

usetikzlibrarydecorations.text
begindocument
begintikzpicture
draw (0,0) ellipse [x radius=3, y radius = 2];
draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text=This text should be between the eppelipses in the bottom half] arc [start angle=-160, end angle=-10, x radius=3.5, y radius = 3];
draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text= This text should be centered and in the top half] arc [start angle=160, end angle=10, x radius=3.5, y radius = 4];
node at (0,0) center text;
endtikzpicture
enddocument


I get



enter image description here










share|improve this question




























    7















    I want to have some text aligned to the center of the top or bottom of an ellipse. I've tried



    documentclass[border=0.5]standalone
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usepackagemathtools,amsmath
    usepackagetikz
    usepackagepgfplots
    pgfplotssetcompat=1.15

    usetikzlibrarydecorations.text
    begindocument
    begintikzpicture
    draw (0,0) ellipse [x radius=3, y radius = 2];
    draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
    draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text=This text should be between the eppelipses in the bottom half] arc [start angle=-160, end angle=-10, x radius=3.5, y radius = 3];
    draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text= This text should be centered and in the top half] arc [start angle=160, end angle=10, x radius=3.5, y radius = 4];
    node at (0,0) center text;
    endtikzpicture
    enddocument


    I get



    enter image description here










    share|improve this question


























      7












      7








      7








      I want to have some text aligned to the center of the top or bottom of an ellipse. I've tried



      documentclass[border=0.5]standalone
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackagemathtools,amsmath
      usepackagetikz
      usepackagepgfplots
      pgfplotssetcompat=1.15

      usetikzlibrarydecorations.text
      begindocument
      begintikzpicture
      draw (0,0) ellipse [x radius=3, y radius = 2];
      draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
      draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text=This text should be between the eppelipses in the bottom half] arc [start angle=-160, end angle=-10, x radius=3.5, y radius = 3];
      draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text= This text should be centered and in the top half] arc [start angle=160, end angle=10, x radius=3.5, y radius = 4];
      node at (0,0) center text;
      endtikzpicture
      enddocument


      I get



      enter image description here










      share|improve this question
















      I want to have some text aligned to the center of the top or bottom of an ellipse. I've tried



      documentclass[border=0.5]standalone
      usepackage[utf8]inputenc
      usepackage[T1]fontenc
      usepackagemathtools,amsmath
      usepackagetikz
      usepackagepgfplots
      pgfplotssetcompat=1.15

      usetikzlibrarydecorations.text
      begindocument
      begintikzpicture
      draw (0,0) ellipse [x radius=3, y radius = 2];
      draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
      draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text=This text should be between the eppelipses in the bottom half] arc [start angle=-160, end angle=-10, x radius=3.5, y radius = 3];
      draw(0,0) ++(-3.5,0) [decorate,decoration=text along path, text= This text should be centered and in the top half] arc [start angle=160, end angle=10, x radius=3.5, y radius = 4];
      node at (0,0) center text;
      endtikzpicture
      enddocument


      I get



      enter image description here







      tikz-pgf alignment






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 28 '18 at 13:45









      AndréC

      10.5k11548




      10.5k11548










      asked Aug 28 '18 at 12:46









      Thorbjørn E. K. ChristensenThorbjørn E. K. Christensen

      1,107422




      1,107422




















          1 Answer
          1






          active

          oldest

          votes


















          8














          I guess you need to run the arc over the full length and also account for the height of the text. EDIT: Added text align=center, another big thanks to Max!



          documentclass[border=0.5]standalone
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagemathtools,amsmath
          usepackagetikz

          usetikzlibrarydecorations.text
          begindocument
          begintikzpicture
          draw (0,0) ellipse [x radius=3, y radius = 2];
          draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
          pgfmathsetmacromyx(3.5cm+height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm+height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text=This text should be between the ellipses in the bottom half]
          (-myx,0) arc [start angle=-180, end angle=00, x radius=myx, y radius = myy];
          pgfmathsetmacromyx(3.5cm-height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm-height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text= This text
          should be centered and in the top half]
          (180:myx and myy) arc [start angle=180,
          end angle=0, x radius=myx, y radius = myy];
          node at (0,0) center text;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer

























          • I forgot to adjust the y radius, will do that in a bit.

            – marmot
            Aug 28 '18 at 13:04











          • The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:05











          • @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

            – marmot
            Aug 28 '18 at 13:29











          • No worries ;-) I'm not in a hurry

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:30






          • 2





            @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

            – Max
            Aug 28 '18 at 14:49











          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%2f448133%2fbend-text-between-ellipsoids%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









          8














          I guess you need to run the arc over the full length and also account for the height of the text. EDIT: Added text align=center, another big thanks to Max!



          documentclass[border=0.5]standalone
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagemathtools,amsmath
          usepackagetikz

          usetikzlibrarydecorations.text
          begindocument
          begintikzpicture
          draw (0,0) ellipse [x radius=3, y radius = 2];
          draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
          pgfmathsetmacromyx(3.5cm+height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm+height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text=This text should be between the ellipses in the bottom half]
          (-myx,0) arc [start angle=-180, end angle=00, x radius=myx, y radius = myy];
          pgfmathsetmacromyx(3.5cm-height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm-height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text= This text
          should be centered and in the top half]
          (180:myx and myy) arc [start angle=180,
          end angle=0, x radius=myx, y radius = myy];
          node at (0,0) center text;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer

























          • I forgot to adjust the y radius, will do that in a bit.

            – marmot
            Aug 28 '18 at 13:04











          • The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:05











          • @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

            – marmot
            Aug 28 '18 at 13:29











          • No worries ;-) I'm not in a hurry

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:30






          • 2





            @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

            – Max
            Aug 28 '18 at 14:49
















          8














          I guess you need to run the arc over the full length and also account for the height of the text. EDIT: Added text align=center, another big thanks to Max!



          documentclass[border=0.5]standalone
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagemathtools,amsmath
          usepackagetikz

          usetikzlibrarydecorations.text
          begindocument
          begintikzpicture
          draw (0,0) ellipse [x radius=3, y radius = 2];
          draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
          pgfmathsetmacromyx(3.5cm+height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm+height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text=This text should be between the ellipses in the bottom half]
          (-myx,0) arc [start angle=-180, end angle=00, x radius=myx, y radius = myy];
          pgfmathsetmacromyx(3.5cm-height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm-height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text= This text
          should be centered and in the top half]
          (180:myx and myy) arc [start angle=180,
          end angle=0, x radius=myx, y radius = myy];
          node at (0,0) center text;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer

























          • I forgot to adjust the y radius, will do that in a bit.

            – marmot
            Aug 28 '18 at 13:04











          • The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:05











          • @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

            – marmot
            Aug 28 '18 at 13:29











          • No worries ;-) I'm not in a hurry

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:30






          • 2





            @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

            – Max
            Aug 28 '18 at 14:49














          8












          8








          8







          I guess you need to run the arc over the full length and also account for the height of the text. EDIT: Added text align=center, another big thanks to Max!



          documentclass[border=0.5]standalone
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagemathtools,amsmath
          usepackagetikz

          usetikzlibrarydecorations.text
          begindocument
          begintikzpicture
          draw (0,0) ellipse [x radius=3, y radius = 2];
          draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
          pgfmathsetmacromyx(3.5cm+height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm+height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text=This text should be between the ellipses in the bottom half]
          (-myx,0) arc [start angle=-180, end angle=00, x radius=myx, y radius = myy];
          pgfmathsetmacromyx(3.5cm-height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm-height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text= This text
          should be centered and in the top half]
          (180:myx and myy) arc [start angle=180,
          end angle=0, x radius=myx, y radius = myy];
          node at (0,0) center text;
          endtikzpicture
          enddocument


          enter image description here






          share|improve this answer















          I guess you need to run the arc over the full length and also account for the height of the text. EDIT: Added text align=center, another big thanks to Max!



          documentclass[border=0.5]standalone
          usepackage[utf8]inputenc
          usepackage[T1]fontenc
          usepackagemathtools,amsmath
          usepackagetikz

          usetikzlibrarydecorations.text
          begindocument
          begintikzpicture
          draw (0,0) ellipse [x radius=3, y radius = 2];
          draw (0,0) ellipse [red,x radius=4, y radius = 2.66];
          pgfmathsetmacromyx(3.5cm+height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm+height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text=This text should be between the ellipses in the bottom half]
          (-myx,0) arc [start angle=-180, end angle=00, x radius=myx, y radius = myy];
          pgfmathsetmacromyx(3.5cm-height("T")*0.5pt)*1pt/1cm
          pgfmathsetmacromyy(2.33cm-height("T")*0.5pt)*1pt/1cm
          draw [decorate,decoration=text along path,text align=center,
          text= This text
          should be centered and in the top half]
          (180:myx and myy) arc [start angle=180,
          end angle=0, x radius=myx, y radius = myy];
          node at (0,0) center text;
          endtikzpicture
          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 28 '18 at 17:07

























          answered Aug 28 '18 at 13:02









          marmotmarmot

          111k5140264




          111k5140264












          • I forgot to adjust the y radius, will do that in a bit.

            – marmot
            Aug 28 '18 at 13:04











          • The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:05











          • @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

            – marmot
            Aug 28 '18 at 13:29











          • No worries ;-) I'm not in a hurry

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:30






          • 2





            @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

            – Max
            Aug 28 '18 at 14:49


















          • I forgot to adjust the y radius, will do that in a bit.

            – marmot
            Aug 28 '18 at 13:04











          • The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:05











          • @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

            – marmot
            Aug 28 '18 at 13:29











          • No worries ;-) I'm not in a hurry

            – Thorbjørn E. K. Christensen
            Aug 28 '18 at 13:30






          • 2





            @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

            – Max
            Aug 28 '18 at 14:49

















          I forgot to adjust the y radius, will do that in a bit.

          – marmot
          Aug 28 '18 at 13:04





          I forgot to adjust the y radius, will do that in a bit.

          – marmot
          Aug 28 '18 at 13:04













          The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

          – Thorbjørn E. K. Christensen
          Aug 28 '18 at 13:05





          The thing is that I want to center both to the shell, but also such that the center of the text is on the highest/lowest point on the eppelipse

          – Thorbjørn E. K. Christensen
          Aug 28 '18 at 13:05













          @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

          – marmot
          Aug 28 '18 at 13:29





          @ThorbjørnE.K.Christensen Sorry, need to run now. Either someone else takes over or I'll do in a few hours.

          – marmot
          Aug 28 '18 at 13:29













          No worries ;-) I'm not in a hurry

          – Thorbjørn E. K. Christensen
          Aug 28 '18 at 13:30





          No worries ;-) I'm not in a hurry

          – Thorbjørn E. K. Christensen
          Aug 28 '18 at 13:30




          2




          2





          @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

          – Max
          Aug 28 '18 at 14:49






          @ThorbjørnE.K.Christensen You can add text align=center to the decoration options. Also see section 48.6 of the pgf manual, there are a lot of cool options.

          – Max
          Aug 28 '18 at 14:49


















          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%2f448133%2fbend-text-between-ellipsoids%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

          𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

          Edmonton

          Crossroads (UK TV series)