A macro that draws a half-disk for use in mathmode

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











up vote
10
down vote

favorite
3












I'd like to define macros to be able to use each of the following six shapes as subscripts in math mode.



I'd try to draw them using tikz, but I don't know if I could use those as subscripts.



enter image description here










share|improve this question







New contributor




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















  • 1




    Maybe you find some here: ctan.org/pkg/wasysym or www.ctan.org/pkg/stix
    – Sigur
    Nov 20 at 14:44











  • Thanks! That package has the commands Leftcircle and Rightcircle, I'll try to figure out how to rotate those. Still missing the ones with just the arc, though.
    – Peter
    Nov 20 at 14:46







  • 1




    Check here also: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf
    – Sigur
    Nov 20 at 14:50










  • Also, if using unicode-math: mirrors.ctan.org/macros/latex/contrib/unicode-math/…
    – Davislor
    Nov 21 at 3:34






  • 1




    A few of those symbols are in Unicode, ◯ is U+25EF, ◠ is U+25E0 and ◡ is U+25E1. unicode-math and some other packages give these the aliases lgwhtcircle, topsemicircle and botsemicircle, respectively. There are several horizontal dashes. The other two symbols do not seem to be.
    – Davislor
    Nov 21 at 3:43















up vote
10
down vote

favorite
3












I'd like to define macros to be able to use each of the following six shapes as subscripts in math mode.



I'd try to draw them using tikz, but I don't know if I could use those as subscripts.



enter image description here










share|improve this question







New contributor




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















  • 1




    Maybe you find some here: ctan.org/pkg/wasysym or www.ctan.org/pkg/stix
    – Sigur
    Nov 20 at 14:44











  • Thanks! That package has the commands Leftcircle and Rightcircle, I'll try to figure out how to rotate those. Still missing the ones with just the arc, though.
    – Peter
    Nov 20 at 14:46







  • 1




    Check here also: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf
    – Sigur
    Nov 20 at 14:50










  • Also, if using unicode-math: mirrors.ctan.org/macros/latex/contrib/unicode-math/…
    – Davislor
    Nov 21 at 3:34






  • 1




    A few of those symbols are in Unicode, ◯ is U+25EF, ◠ is U+25E0 and ◡ is U+25E1. unicode-math and some other packages give these the aliases lgwhtcircle, topsemicircle and botsemicircle, respectively. There are several horizontal dashes. The other two symbols do not seem to be.
    – Davislor
    Nov 21 at 3:43













up vote
10
down vote

favorite
3









up vote
10
down vote

favorite
3






3





I'd like to define macros to be able to use each of the following six shapes as subscripts in math mode.



I'd try to draw them using tikz, but I don't know if I could use those as subscripts.



enter image description here










share|improve this question







New contributor




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











I'd like to define macros to be able to use each of the following six shapes as subscripts in math mode.



I'd try to draw them using tikz, but I don't know if I could use those as subscripts.



enter image description here







math-mode subscripts






share|improve this question







New contributor




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











share|improve this question







New contributor




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









share|improve this question




share|improve this question






New contributor




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









asked Nov 20 at 14:39









Peter

1535




1535




New contributor




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





New contributor





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






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







  • 1




    Maybe you find some here: ctan.org/pkg/wasysym or www.ctan.org/pkg/stix
    – Sigur
    Nov 20 at 14:44











  • Thanks! That package has the commands Leftcircle and Rightcircle, I'll try to figure out how to rotate those. Still missing the ones with just the arc, though.
    – Peter
    Nov 20 at 14:46







  • 1




    Check here also: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf
    – Sigur
    Nov 20 at 14:50










  • Also, if using unicode-math: mirrors.ctan.org/macros/latex/contrib/unicode-math/…
    – Davislor
    Nov 21 at 3:34






  • 1




    A few of those symbols are in Unicode, ◯ is U+25EF, ◠ is U+25E0 and ◡ is U+25E1. unicode-math and some other packages give these the aliases lgwhtcircle, topsemicircle and botsemicircle, respectively. There are several horizontal dashes. The other two symbols do not seem to be.
    – Davislor
    Nov 21 at 3:43













  • 1




    Maybe you find some here: ctan.org/pkg/wasysym or www.ctan.org/pkg/stix
    – Sigur
    Nov 20 at 14:44











  • Thanks! That package has the commands Leftcircle and Rightcircle, I'll try to figure out how to rotate those. Still missing the ones with just the arc, though.
    – Peter
    Nov 20 at 14:46







  • 1




    Check here also: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf
    – Sigur
    Nov 20 at 14:50










  • Also, if using unicode-math: mirrors.ctan.org/macros/latex/contrib/unicode-math/…
    – Davislor
    Nov 21 at 3:34






  • 1




    A few of those symbols are in Unicode, ◯ is U+25EF, ◠ is U+25E0 and ◡ is U+25E1. unicode-math and some other packages give these the aliases lgwhtcircle, topsemicircle and botsemicircle, respectively. There are several horizontal dashes. The other two symbols do not seem to be.
    – Davislor
    Nov 21 at 3:43








1




1




Maybe you find some here: ctan.org/pkg/wasysym or www.ctan.org/pkg/stix
– Sigur
Nov 20 at 14:44





Maybe you find some here: ctan.org/pkg/wasysym or www.ctan.org/pkg/stix
– Sigur
Nov 20 at 14:44













Thanks! That package has the commands Leftcircle and Rightcircle, I'll try to figure out how to rotate those. Still missing the ones with just the arc, though.
– Peter
Nov 20 at 14:46





Thanks! That package has the commands Leftcircle and Rightcircle, I'll try to figure out how to rotate those. Still missing the ones with just the arc, though.
– Peter
Nov 20 at 14:46





1




1




Check here also: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf
– Sigur
Nov 20 at 14:50




Check here also: mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf
– Sigur
Nov 20 at 14:50












Also, if using unicode-math: mirrors.ctan.org/macros/latex/contrib/unicode-math/…
– Davislor
Nov 21 at 3:34




Also, if using unicode-math: mirrors.ctan.org/macros/latex/contrib/unicode-math/…
– Davislor
Nov 21 at 3:34




1




1




A few of those symbols are in Unicode, ◯ is U+25EF, ◠ is U+25E0 and ◡ is U+25E1. unicode-math and some other packages give these the aliases lgwhtcircle, topsemicircle and botsemicircle, respectively. There are several horizontal dashes. The other two symbols do not seem to be.
– Davislor
Nov 21 at 3:43





A few of those symbols are in Unicode, ◯ is U+25EF, ◠ is U+25E0 and ◡ is U+25E1. unicode-math and some other packages give these the aliases lgwhtcircle, topsemicircle and botsemicircle, respectively. There are several horizontal dashes. The other two symbols do not seem to be.
– Davislor
Nov 21 at 3:43











3 Answers
3






active

oldest

votes

















up vote
13
down vote



accepted










Picture mode!



documentclassarticle
usepackageamsmath
usepackagepict2e

DeclareRobustCommandfullcircle%
mspace2mumathord
sbox0$scriptstyle O$%
setlengthunitlengthht0%
beginpicture(1,1)
put(0.5,0.5)arc0.5
endpicture
mspace2mu

DeclareRobustCommandupsemicircle%
mspace2mumathord
sbox0$scriptstyle O$%
setlengthunitlengthht0%
beginpicture(1,1)
put(0.5,0.5)arc[0,180]0.5
endpicture
mspace2mu

DeclareRobustCommanddownsemicircle%
mspace2mumathord
sbox0$scriptstyle O$%
setlengthunitlengthht0%
beginpicture(1,1)
put(0.5,0.5)arc[180,360]0.5
endpicture
mspace2mu

DeclareRobustCommandupsemicirclediam%
mspace2mumathord
sbox0$scriptstyle O$%
setlengthunitlengthht0%
beginpicture(1,1)
moveto(0.5,0.5)
circlearc0.50.50.50180
lineto(0.5,0.5)
strokepath
endpicture
mspace2mu

DeclareRobustCommanddownsemicirclediam%
mspace2mumathord
sbox0$scriptstyle O$%
setlengthunitlengthht0%
beginpicture(1,1)
moveto(0.5,0.5)
circlearc0.50.50.5180360
lineto(0.5,0.5)
strokepath
endpicture
mspace2mu

DeclareRobustCommanddiam%
mspace2mumathord
sbox0$scriptstyle O$%
setlengthunitlengthht0%
beginpicture(1,1)
Line(0,0.5)(1,0.5)
endpicture
mspace2mu


begindocument

$X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

enddocument


enter image description here



An enhanced version that can cope with the symbols at every level.



documentclassarticle
usepackageamsmath
usepackagepict2e

makeatletter
DeclareRobustCommandfullcirclepeter@symbolpeter@fullcircle
DeclareRobustCommandupsemicirclepeter@symbolpeter@upsemicircle
DeclareRobustCommanddownsemicirclepeter@symbolpeter@downsemicircle
DeclareRobustCommandupsemicirclediampeter@symbolpeter@upsemicirclediam
DeclareRobustCommanddownsemicirclediampeter@symbolpeter@downsemicirclediam
DeclareRobustCommanddiampeter@symbolpeter@diam

newcommandpeter@symbol[1]mathordmspace2mumathpalette#1relaxmspace2mu
newcommandpeter@unitlength[1]%
settoheightunitlength$m@th#1O$%
linethicknessfontdimen 8
ifx#1displaystyletextfontelse
ifx#1textstyletextfontelse
ifx#1scriptstylescriptfontelse
scriptscriptfontfififi 3
%


newcommandpeter@fullcircle[2]%
begingroup
peter@unitlength#1%
beginpicture(1,1)
circlearc[1]0.50.50.50360
strokepath
endpicture%
endgroup

newcommandpeter@upsemicircle[2]%
begingroup
peter@unitlength#1%
beginpicture(1,1)
circlearc[1]0.50.50.50180
strokepath
endpicture%
endgroup

newcommandpeter@downsemicircle[2]%
begingroup
peter@unitlength#1%
beginpicture(1,1)
circlearc[1]0.50.50.5180360
strokepath
endpicture%
endgroup

newcommandpeter@upsemicirclediam[2]%
begingroup
peter@unitlength#1%
beginpicture(1,1)
moveto(0.5,0.5)
circlearc0.50.50.50180
lineto(0.5,0.5)
strokepath
endpicture%
endgroup

newcommandpeter@downsemicirclediam[2]%
begingroup
peter@unitlength#1%
beginpicture(1,1)
moveto(0.5,0.5)
circlearc0.50.50.5180360
lineto(0.5,0.5)
strokepath
endpicture%
endgroup

newcommandpeter@diam[2]%
begingroup
peter@unitlength#1%
beginpicture(1,1)
Line(0,0.5)(1,0.5)
endpicture%
endgroup


begindocument

$Xfullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

$X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

$X_X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

enddocument


enter image description here






share|improve this answer





























    up vote
    7
    down vote













    TikZ in boxes! (Far inferior to picture mode unfortunately)



    documentclassarticle

    usepackagetikz

    makeatletter
    newcommandsetup@crazysubscripts[2]
    %
    expandafternewsaveboxcsname crazysubscripts@#1endcsname
    expandaftersboxcsname crazysubscripts@#1endcsname
    %
    kern.1ex
    begintikzpicture
    path[use as bounding box] circle[radius=.5ex];
    #2%
    endtikzpicture%
    kern.1ex
    %

    setup@crazysubscriptsfc% fullcircle
    %
    draw circle[radius=.5ex];%

    setup@crazysubscriptslo% lower open
    %
    draw (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex];%

    setup@crazysubscriptsuo% upper open
    %
    draw (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex];%

    setup@crazysubscriptslc% lower closed
    %
    draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex]
    --cycle;%

    setup@crazysubscriptsuc% upper closed
    %
    draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex]
    --cycle;%

    setup@crazysubscriptsb% boring line
    %
    draw (-.5ex,0) -- (.5ex,0);%

    newcommandcsubs[1]
    %
    @ifundefinedcrazysubscripts@#1
    GenericErrorUndefined crazysubscript `#1`%
    %
    resizebox.75ex!
    expandafteruseboxcsname crazysubscripts@#1endcsname%
    %

    makeatother

    begindocument
    $A_csubsfc_csubslo_csubslc$

    csubsfccsubslocsubsuocsubslccsubsuccsubsb
    enddocument


    enter image description here






    share|improve this answer






















    • Could you elaborate how this is inferior to picture mode?
      – Peter
      Nov 20 at 15:34










    • @Peter because the other one is picture mode!
      – Skillmon
      Nov 20 at 15:43






    • 2




      @Peter no honestly, it's just a joke.
      – Skillmon
      Nov 20 at 15:44

















    up vote
    3
    down vote













    Just a template.



    documentclass[preview,border=12pt,varwidth,12pt]standalone
    usepackagetikz

    defalextikz draw (0,0) circle (2pt);
    defbobbytikz draw (0,0) -- (3pt,0) -- (3pt,2pt) -- cycle;
    begindocument
    This is an equation $F_alex^bobby+1$.
    enddocument


    enter image description here






    share|improve this answer




















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



      );






      Peter is a new contributor. Be nice, and check out our Code of Conduct.









       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460959%2fa-macro-that-draws-a-half-disk-for-use-in-mathmode%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      13
      down vote



      accepted










      Picture mode!



      documentclassarticle
      usepackageamsmath
      usepackagepict2e

      DeclareRobustCommandfullcircle%
      mspace2mumathord
      sbox0$scriptstyle O$%
      setlengthunitlengthht0%
      beginpicture(1,1)
      put(0.5,0.5)arc0.5
      endpicture
      mspace2mu

      DeclareRobustCommandupsemicircle%
      mspace2mumathord
      sbox0$scriptstyle O$%
      setlengthunitlengthht0%
      beginpicture(1,1)
      put(0.5,0.5)arc[0,180]0.5
      endpicture
      mspace2mu

      DeclareRobustCommanddownsemicircle%
      mspace2mumathord
      sbox0$scriptstyle O$%
      setlengthunitlengthht0%
      beginpicture(1,1)
      put(0.5,0.5)arc[180,360]0.5
      endpicture
      mspace2mu

      DeclareRobustCommandupsemicirclediam%
      mspace2mumathord
      sbox0$scriptstyle O$%
      setlengthunitlengthht0%
      beginpicture(1,1)
      moveto(0.5,0.5)
      circlearc0.50.50.50180
      lineto(0.5,0.5)
      strokepath
      endpicture
      mspace2mu

      DeclareRobustCommanddownsemicirclediam%
      mspace2mumathord
      sbox0$scriptstyle O$%
      setlengthunitlengthht0%
      beginpicture(1,1)
      moveto(0.5,0.5)
      circlearc0.50.50.5180360
      lineto(0.5,0.5)
      strokepath
      endpicture
      mspace2mu

      DeclareRobustCommanddiam%
      mspace2mumathord
      sbox0$scriptstyle O$%
      setlengthunitlengthht0%
      beginpicture(1,1)
      Line(0,0.5)(1,0.5)
      endpicture
      mspace2mu


      begindocument

      $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

      enddocument


      enter image description here



      An enhanced version that can cope with the symbols at every level.



      documentclassarticle
      usepackageamsmath
      usepackagepict2e

      makeatletter
      DeclareRobustCommandfullcirclepeter@symbolpeter@fullcircle
      DeclareRobustCommandupsemicirclepeter@symbolpeter@upsemicircle
      DeclareRobustCommanddownsemicirclepeter@symbolpeter@downsemicircle
      DeclareRobustCommandupsemicirclediampeter@symbolpeter@upsemicirclediam
      DeclareRobustCommanddownsemicirclediampeter@symbolpeter@downsemicirclediam
      DeclareRobustCommanddiampeter@symbolpeter@diam

      newcommandpeter@symbol[1]mathordmspace2mumathpalette#1relaxmspace2mu
      newcommandpeter@unitlength[1]%
      settoheightunitlength$m@th#1O$%
      linethicknessfontdimen 8
      ifx#1displaystyletextfontelse
      ifx#1textstyletextfontelse
      ifx#1scriptstylescriptfontelse
      scriptscriptfontfififi 3
      %


      newcommandpeter@fullcircle[2]%
      begingroup
      peter@unitlength#1%
      beginpicture(1,1)
      circlearc[1]0.50.50.50360
      strokepath
      endpicture%
      endgroup

      newcommandpeter@upsemicircle[2]%
      begingroup
      peter@unitlength#1%
      beginpicture(1,1)
      circlearc[1]0.50.50.50180
      strokepath
      endpicture%
      endgroup

      newcommandpeter@downsemicircle[2]%
      begingroup
      peter@unitlength#1%
      beginpicture(1,1)
      circlearc[1]0.50.50.5180360
      strokepath
      endpicture%
      endgroup

      newcommandpeter@upsemicirclediam[2]%
      begingroup
      peter@unitlength#1%
      beginpicture(1,1)
      moveto(0.5,0.5)
      circlearc0.50.50.50180
      lineto(0.5,0.5)
      strokepath
      endpicture%
      endgroup

      newcommandpeter@downsemicirclediam[2]%
      begingroup
      peter@unitlength#1%
      beginpicture(1,1)
      moveto(0.5,0.5)
      circlearc0.50.50.5180360
      lineto(0.5,0.5)
      strokepath
      endpicture%
      endgroup

      newcommandpeter@diam[2]%
      begingroup
      peter@unitlength#1%
      beginpicture(1,1)
      Line(0,0.5)(1,0.5)
      endpicture%
      endgroup


      begindocument

      $Xfullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

      $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

      $X_X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

      enddocument


      enter image description here






      share|improve this answer


























        up vote
        13
        down vote



        accepted










        Picture mode!



        documentclassarticle
        usepackageamsmath
        usepackagepict2e

        DeclareRobustCommandfullcircle%
        mspace2mumathord
        sbox0$scriptstyle O$%
        setlengthunitlengthht0%
        beginpicture(1,1)
        put(0.5,0.5)arc0.5
        endpicture
        mspace2mu

        DeclareRobustCommandupsemicircle%
        mspace2mumathord
        sbox0$scriptstyle O$%
        setlengthunitlengthht0%
        beginpicture(1,1)
        put(0.5,0.5)arc[0,180]0.5
        endpicture
        mspace2mu

        DeclareRobustCommanddownsemicircle%
        mspace2mumathord
        sbox0$scriptstyle O$%
        setlengthunitlengthht0%
        beginpicture(1,1)
        put(0.5,0.5)arc[180,360]0.5
        endpicture
        mspace2mu

        DeclareRobustCommandupsemicirclediam%
        mspace2mumathord
        sbox0$scriptstyle O$%
        setlengthunitlengthht0%
        beginpicture(1,1)
        moveto(0.5,0.5)
        circlearc0.50.50.50180
        lineto(0.5,0.5)
        strokepath
        endpicture
        mspace2mu

        DeclareRobustCommanddownsemicirclediam%
        mspace2mumathord
        sbox0$scriptstyle O$%
        setlengthunitlengthht0%
        beginpicture(1,1)
        moveto(0.5,0.5)
        circlearc0.50.50.5180360
        lineto(0.5,0.5)
        strokepath
        endpicture
        mspace2mu

        DeclareRobustCommanddiam%
        mspace2mumathord
        sbox0$scriptstyle O$%
        setlengthunitlengthht0%
        beginpicture(1,1)
        Line(0,0.5)(1,0.5)
        endpicture
        mspace2mu


        begindocument

        $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

        enddocument


        enter image description here



        An enhanced version that can cope with the symbols at every level.



        documentclassarticle
        usepackageamsmath
        usepackagepict2e

        makeatletter
        DeclareRobustCommandfullcirclepeter@symbolpeter@fullcircle
        DeclareRobustCommandupsemicirclepeter@symbolpeter@upsemicircle
        DeclareRobustCommanddownsemicirclepeter@symbolpeter@downsemicircle
        DeclareRobustCommandupsemicirclediampeter@symbolpeter@upsemicirclediam
        DeclareRobustCommanddownsemicirclediampeter@symbolpeter@downsemicirclediam
        DeclareRobustCommanddiampeter@symbolpeter@diam

        newcommandpeter@symbol[1]mathordmspace2mumathpalette#1relaxmspace2mu
        newcommandpeter@unitlength[1]%
        settoheightunitlength$m@th#1O$%
        linethicknessfontdimen 8
        ifx#1displaystyletextfontelse
        ifx#1textstyletextfontelse
        ifx#1scriptstylescriptfontelse
        scriptscriptfontfififi 3
        %


        newcommandpeter@fullcircle[2]%
        begingroup
        peter@unitlength#1%
        beginpicture(1,1)
        circlearc[1]0.50.50.50360
        strokepath
        endpicture%
        endgroup

        newcommandpeter@upsemicircle[2]%
        begingroup
        peter@unitlength#1%
        beginpicture(1,1)
        circlearc[1]0.50.50.50180
        strokepath
        endpicture%
        endgroup

        newcommandpeter@downsemicircle[2]%
        begingroup
        peter@unitlength#1%
        beginpicture(1,1)
        circlearc[1]0.50.50.5180360
        strokepath
        endpicture%
        endgroup

        newcommandpeter@upsemicirclediam[2]%
        begingroup
        peter@unitlength#1%
        beginpicture(1,1)
        moveto(0.5,0.5)
        circlearc0.50.50.50180
        lineto(0.5,0.5)
        strokepath
        endpicture%
        endgroup

        newcommandpeter@downsemicirclediam[2]%
        begingroup
        peter@unitlength#1%
        beginpicture(1,1)
        moveto(0.5,0.5)
        circlearc0.50.50.5180360
        lineto(0.5,0.5)
        strokepath
        endpicture%
        endgroup

        newcommandpeter@diam[2]%
        begingroup
        peter@unitlength#1%
        beginpicture(1,1)
        Line(0,0.5)(1,0.5)
        endpicture%
        endgroup


        begindocument

        $Xfullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

        $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

        $X_X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

        enddocument


        enter image description here






        share|improve this answer
























          up vote
          13
          down vote



          accepted







          up vote
          13
          down vote



          accepted






          Picture mode!



          documentclassarticle
          usepackageamsmath
          usepackagepict2e

          DeclareRobustCommandfullcircle%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          put(0.5,0.5)arc0.5
          endpicture
          mspace2mu

          DeclareRobustCommandupsemicircle%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          put(0.5,0.5)arc[0,180]0.5
          endpicture
          mspace2mu

          DeclareRobustCommanddownsemicircle%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          put(0.5,0.5)arc[180,360]0.5
          endpicture
          mspace2mu

          DeclareRobustCommandupsemicirclediam%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.50180
          lineto(0.5,0.5)
          strokepath
          endpicture
          mspace2mu

          DeclareRobustCommanddownsemicirclediam%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.5180360
          lineto(0.5,0.5)
          strokepath
          endpicture
          mspace2mu

          DeclareRobustCommanddiam%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          Line(0,0.5)(1,0.5)
          endpicture
          mspace2mu


          begindocument

          $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          enddocument


          enter image description here



          An enhanced version that can cope with the symbols at every level.



          documentclassarticle
          usepackageamsmath
          usepackagepict2e

          makeatletter
          DeclareRobustCommandfullcirclepeter@symbolpeter@fullcircle
          DeclareRobustCommandupsemicirclepeter@symbolpeter@upsemicircle
          DeclareRobustCommanddownsemicirclepeter@symbolpeter@downsemicircle
          DeclareRobustCommandupsemicirclediampeter@symbolpeter@upsemicirclediam
          DeclareRobustCommanddownsemicirclediampeter@symbolpeter@downsemicirclediam
          DeclareRobustCommanddiampeter@symbolpeter@diam

          newcommandpeter@symbol[1]mathordmspace2mumathpalette#1relaxmspace2mu
          newcommandpeter@unitlength[1]%
          settoheightunitlength$m@th#1O$%
          linethicknessfontdimen 8
          ifx#1displaystyletextfontelse
          ifx#1textstyletextfontelse
          ifx#1scriptstylescriptfontelse
          scriptscriptfontfififi 3
          %


          newcommandpeter@fullcircle[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          circlearc[1]0.50.50.50360
          strokepath
          endpicture%
          endgroup

          newcommandpeter@upsemicircle[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          circlearc[1]0.50.50.50180
          strokepath
          endpicture%
          endgroup

          newcommandpeter@downsemicircle[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          circlearc[1]0.50.50.5180360
          strokepath
          endpicture%
          endgroup

          newcommandpeter@upsemicirclediam[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.50180
          lineto(0.5,0.5)
          strokepath
          endpicture%
          endgroup

          newcommandpeter@downsemicirclediam[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.5180360
          lineto(0.5,0.5)
          strokepath
          endpicture%
          endgroup

          newcommandpeter@diam[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          Line(0,0.5)(1,0.5)
          endpicture%
          endgroup


          begindocument

          $Xfullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          $X_X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          enddocument


          enter image description here






          share|improve this answer














          Picture mode!



          documentclassarticle
          usepackageamsmath
          usepackagepict2e

          DeclareRobustCommandfullcircle%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          put(0.5,0.5)arc0.5
          endpicture
          mspace2mu

          DeclareRobustCommandupsemicircle%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          put(0.5,0.5)arc[0,180]0.5
          endpicture
          mspace2mu

          DeclareRobustCommanddownsemicircle%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          put(0.5,0.5)arc[180,360]0.5
          endpicture
          mspace2mu

          DeclareRobustCommandupsemicirclediam%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.50180
          lineto(0.5,0.5)
          strokepath
          endpicture
          mspace2mu

          DeclareRobustCommanddownsemicirclediam%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.5180360
          lineto(0.5,0.5)
          strokepath
          endpicture
          mspace2mu

          DeclareRobustCommanddiam%
          mspace2mumathord
          sbox0$scriptstyle O$%
          setlengthunitlengthht0%
          beginpicture(1,1)
          Line(0,0.5)(1,0.5)
          endpicture
          mspace2mu


          begindocument

          $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          enddocument


          enter image description here



          An enhanced version that can cope with the symbols at every level.



          documentclassarticle
          usepackageamsmath
          usepackagepict2e

          makeatletter
          DeclareRobustCommandfullcirclepeter@symbolpeter@fullcircle
          DeclareRobustCommandupsemicirclepeter@symbolpeter@upsemicircle
          DeclareRobustCommanddownsemicirclepeter@symbolpeter@downsemicircle
          DeclareRobustCommandupsemicirclediampeter@symbolpeter@upsemicirclediam
          DeclareRobustCommanddownsemicirclediampeter@symbolpeter@downsemicirclediam
          DeclareRobustCommanddiampeter@symbolpeter@diam

          newcommandpeter@symbol[1]mathordmspace2mumathpalette#1relaxmspace2mu
          newcommandpeter@unitlength[1]%
          settoheightunitlength$m@th#1O$%
          linethicknessfontdimen 8
          ifx#1displaystyletextfontelse
          ifx#1textstyletextfontelse
          ifx#1scriptstylescriptfontelse
          scriptscriptfontfififi 3
          %


          newcommandpeter@fullcircle[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          circlearc[1]0.50.50.50360
          strokepath
          endpicture%
          endgroup

          newcommandpeter@upsemicircle[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          circlearc[1]0.50.50.50180
          strokepath
          endpicture%
          endgroup

          newcommandpeter@downsemicircle[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          circlearc[1]0.50.50.5180360
          strokepath
          endpicture%
          endgroup

          newcommandpeter@upsemicirclediam[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.50180
          lineto(0.5,0.5)
          strokepath
          endpicture%
          endgroup

          newcommandpeter@downsemicirclediam[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          moveto(0.5,0.5)
          circlearc0.50.50.5180360
          lineto(0.5,0.5)
          strokepath
          endpicture%
          endgroup

          newcommandpeter@diam[2]%
          begingroup
          peter@unitlength#1%
          beginpicture(1,1)
          Line(0,0.5)(1,0.5)
          endpicture%
          endgroup


          begindocument

          $Xfullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          $X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          $X_X_fullcircleupsemicircledownsemicircleupsemicirclediamdownsemicirclediamdiam$

          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 21 at 10:20

























          answered Nov 20 at 15:06









          egreg

          699k8518613133




          699k8518613133




















              up vote
              7
              down vote













              TikZ in boxes! (Far inferior to picture mode unfortunately)



              documentclassarticle

              usepackagetikz

              makeatletter
              newcommandsetup@crazysubscripts[2]
              %
              expandafternewsaveboxcsname crazysubscripts@#1endcsname
              expandaftersboxcsname crazysubscripts@#1endcsname
              %
              kern.1ex
              begintikzpicture
              path[use as bounding box] circle[radius=.5ex];
              #2%
              endtikzpicture%
              kern.1ex
              %

              setup@crazysubscriptsfc% fullcircle
              %
              draw circle[radius=.5ex];%

              setup@crazysubscriptslo% lower open
              %
              draw (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex];%

              setup@crazysubscriptsuo% upper open
              %
              draw (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex];%

              setup@crazysubscriptslc% lower closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsuc% upper closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsb% boring line
              %
              draw (-.5ex,0) -- (.5ex,0);%

              newcommandcsubs[1]
              %
              @ifundefinedcrazysubscripts@#1
              GenericErrorUndefined crazysubscript `#1`%
              %
              resizebox.75ex!
              expandafteruseboxcsname crazysubscripts@#1endcsname%
              %

              makeatother

              begindocument
              $A_csubsfc_csubslo_csubslc$

              csubsfccsubslocsubsuocsubslccsubsuccsubsb
              enddocument


              enter image description here






              share|improve this answer






















              • Could you elaborate how this is inferior to picture mode?
                – Peter
                Nov 20 at 15:34










              • @Peter because the other one is picture mode!
                – Skillmon
                Nov 20 at 15:43






              • 2




                @Peter no honestly, it's just a joke.
                – Skillmon
                Nov 20 at 15:44














              up vote
              7
              down vote













              TikZ in boxes! (Far inferior to picture mode unfortunately)



              documentclassarticle

              usepackagetikz

              makeatletter
              newcommandsetup@crazysubscripts[2]
              %
              expandafternewsaveboxcsname crazysubscripts@#1endcsname
              expandaftersboxcsname crazysubscripts@#1endcsname
              %
              kern.1ex
              begintikzpicture
              path[use as bounding box] circle[radius=.5ex];
              #2%
              endtikzpicture%
              kern.1ex
              %

              setup@crazysubscriptsfc% fullcircle
              %
              draw circle[radius=.5ex];%

              setup@crazysubscriptslo% lower open
              %
              draw (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex];%

              setup@crazysubscriptsuo% upper open
              %
              draw (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex];%

              setup@crazysubscriptslc% lower closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsuc% upper closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsb% boring line
              %
              draw (-.5ex,0) -- (.5ex,0);%

              newcommandcsubs[1]
              %
              @ifundefinedcrazysubscripts@#1
              GenericErrorUndefined crazysubscript `#1`%
              %
              resizebox.75ex!
              expandafteruseboxcsname crazysubscripts@#1endcsname%
              %

              makeatother

              begindocument
              $A_csubsfc_csubslo_csubslc$

              csubsfccsubslocsubsuocsubslccsubsuccsubsb
              enddocument


              enter image description here






              share|improve this answer






















              • Could you elaborate how this is inferior to picture mode?
                – Peter
                Nov 20 at 15:34










              • @Peter because the other one is picture mode!
                – Skillmon
                Nov 20 at 15:43






              • 2




                @Peter no honestly, it's just a joke.
                – Skillmon
                Nov 20 at 15:44












              up vote
              7
              down vote










              up vote
              7
              down vote









              TikZ in boxes! (Far inferior to picture mode unfortunately)



              documentclassarticle

              usepackagetikz

              makeatletter
              newcommandsetup@crazysubscripts[2]
              %
              expandafternewsaveboxcsname crazysubscripts@#1endcsname
              expandaftersboxcsname crazysubscripts@#1endcsname
              %
              kern.1ex
              begintikzpicture
              path[use as bounding box] circle[radius=.5ex];
              #2%
              endtikzpicture%
              kern.1ex
              %

              setup@crazysubscriptsfc% fullcircle
              %
              draw circle[radius=.5ex];%

              setup@crazysubscriptslo% lower open
              %
              draw (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex];%

              setup@crazysubscriptsuo% upper open
              %
              draw (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex];%

              setup@crazysubscriptslc% lower closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsuc% upper closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsb% boring line
              %
              draw (-.5ex,0) -- (.5ex,0);%

              newcommandcsubs[1]
              %
              @ifundefinedcrazysubscripts@#1
              GenericErrorUndefined crazysubscript `#1`%
              %
              resizebox.75ex!
              expandafteruseboxcsname crazysubscripts@#1endcsname%
              %

              makeatother

              begindocument
              $A_csubsfc_csubslo_csubslc$

              csubsfccsubslocsubsuocsubslccsubsuccsubsb
              enddocument


              enter image description here






              share|improve this answer














              TikZ in boxes! (Far inferior to picture mode unfortunately)



              documentclassarticle

              usepackagetikz

              makeatletter
              newcommandsetup@crazysubscripts[2]
              %
              expandafternewsaveboxcsname crazysubscripts@#1endcsname
              expandaftersboxcsname crazysubscripts@#1endcsname
              %
              kern.1ex
              begintikzpicture
              path[use as bounding box] circle[radius=.5ex];
              #2%
              endtikzpicture%
              kern.1ex
              %

              setup@crazysubscriptsfc% fullcircle
              %
              draw circle[radius=.5ex];%

              setup@crazysubscriptslo% lower open
              %
              draw (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex];%

              setup@crazysubscriptsuo% upper open
              %
              draw (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex];%

              setup@crazysubscriptslc% lower closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=-180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsuc% upper closed
              %
              draw (-.5ex,0) -- (.5ex,0) arc[start angle=0, end angle=180, radius=.5ex]
              --cycle;%

              setup@crazysubscriptsb% boring line
              %
              draw (-.5ex,0) -- (.5ex,0);%

              newcommandcsubs[1]
              %
              @ifundefinedcrazysubscripts@#1
              GenericErrorUndefined crazysubscript `#1`%
              %
              resizebox.75ex!
              expandafteruseboxcsname crazysubscripts@#1endcsname%
              %

              makeatother

              begindocument
              $A_csubsfc_csubslo_csubslc$

              csubsfccsubslocsubsuocsubslccsubsuccsubsb
              enddocument


              enter image description here







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Nov 20 at 15:16

























              answered Nov 20 at 15:10









              Skillmon

              20.5k11840




              20.5k11840











              • Could you elaborate how this is inferior to picture mode?
                – Peter
                Nov 20 at 15:34










              • @Peter because the other one is picture mode!
                – Skillmon
                Nov 20 at 15:43






              • 2




                @Peter no honestly, it's just a joke.
                – Skillmon
                Nov 20 at 15:44
















              • Could you elaborate how this is inferior to picture mode?
                – Peter
                Nov 20 at 15:34










              • @Peter because the other one is picture mode!
                – Skillmon
                Nov 20 at 15:43






              • 2




                @Peter no honestly, it's just a joke.
                – Skillmon
                Nov 20 at 15:44















              Could you elaborate how this is inferior to picture mode?
              – Peter
              Nov 20 at 15:34




              Could you elaborate how this is inferior to picture mode?
              – Peter
              Nov 20 at 15:34












              @Peter because the other one is picture mode!
              – Skillmon
              Nov 20 at 15:43




              @Peter because the other one is picture mode!
              – Skillmon
              Nov 20 at 15:43




              2




              2




              @Peter no honestly, it's just a joke.
              – Skillmon
              Nov 20 at 15:44




              @Peter no honestly, it's just a joke.
              – Skillmon
              Nov 20 at 15:44










              up vote
              3
              down vote













              Just a template.



              documentclass[preview,border=12pt,varwidth,12pt]standalone
              usepackagetikz

              defalextikz draw (0,0) circle (2pt);
              defbobbytikz draw (0,0) -- (3pt,0) -- (3pt,2pt) -- cycle;
              begindocument
              This is an equation $F_alex^bobby+1$.
              enddocument


              enter image description here






              share|improve this answer
























                up vote
                3
                down vote













                Just a template.



                documentclass[preview,border=12pt,varwidth,12pt]standalone
                usepackagetikz

                defalextikz draw (0,0) circle (2pt);
                defbobbytikz draw (0,0) -- (3pt,0) -- (3pt,2pt) -- cycle;
                begindocument
                This is an equation $F_alex^bobby+1$.
                enddocument


                enter image description here






                share|improve this answer






















                  up vote
                  3
                  down vote










                  up vote
                  3
                  down vote









                  Just a template.



                  documentclass[preview,border=12pt,varwidth,12pt]standalone
                  usepackagetikz

                  defalextikz draw (0,0) circle (2pt);
                  defbobbytikz draw (0,0) -- (3pt,0) -- (3pt,2pt) -- cycle;
                  begindocument
                  This is an equation $F_alex^bobby+1$.
                  enddocument


                  enter image description here






                  share|improve this answer












                  Just a template.



                  documentclass[preview,border=12pt,varwidth,12pt]standalone
                  usepackagetikz

                  defalextikz draw (0,0) circle (2pt);
                  defbobbytikz draw (0,0) -- (3pt,0) -- (3pt,2pt) -- cycle;
                  begindocument
                  This is an equation $F_alex^bobby+1$.
                  enddocument


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 20 at 14:48









                  Artificial Stupidity

                  4,8191832




                  4,8191832




















                      Peter is a new contributor. Be nice, and check out our Code of Conduct.









                       

                      draft saved


                      draft discarded


















                      Peter is a new contributor. Be nice, and check out our Code of Conduct.












                      Peter is a new contributor. Be nice, and check out our Code of Conduct.











                      Peter is a new contributor. Be nice, and check out our Code of Conduct.













                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f460959%2fa-macro-that-draws-a-half-disk-for-use-in-mathmode%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

                      How to check contact read email or not when send email to Individual?

                      Displaying single band from multi-band raster using QGIS

                      How many registers does an x86_64 CPU actually have?