draw border around edge of symbol











up vote
4
down vote

favorite












Is it possible to draw a (coloured) border around the edge of a LaTeX symbol?

For instance, I would like to draw a black border around the edge of
a bigstar. So, something like this
enter image description here



Below a very short MWE



documentclass[tikz,border=10pt]{standalone}
usepackage{tikz}
usepackage{amssymb}

begin{document}
begin{tikzpicture}[scale = 0.5]
node [yellow] at (0,0,0) {$bigstar$};
end{tikzpicture}
end{document}


I searched for solutions, but I only get squared frames around basically anything, but not what I'm after. Any idea? Cheers










share|improve this question


























    up vote
    4
    down vote

    favorite












    Is it possible to draw a (coloured) border around the edge of a LaTeX symbol?

    For instance, I would like to draw a black border around the edge of
    a bigstar. So, something like this
    enter image description here



    Below a very short MWE



    documentclass[tikz,border=10pt]{standalone}
    usepackage{tikz}
    usepackage{amssymb}

    begin{document}
    begin{tikzpicture}[scale = 0.5]
    node [yellow] at (0,0,0) {$bigstar$};
    end{tikzpicture}
    end{document}


    I searched for solutions, but I only get squared frames around basically anything, but not what I'm after. Any idea? Cheers










    share|improve this question
























      up vote
      4
      down vote

      favorite









      up vote
      4
      down vote

      favorite











      Is it possible to draw a (coloured) border around the edge of a LaTeX symbol?

      For instance, I would like to draw a black border around the edge of
      a bigstar. So, something like this
      enter image description here



      Below a very short MWE



      documentclass[tikz,border=10pt]{standalone}
      usepackage{tikz}
      usepackage{amssymb}

      begin{document}
      begin{tikzpicture}[scale = 0.5]
      node [yellow] at (0,0,0) {$bigstar$};
      end{tikzpicture}
      end{document}


      I searched for solutions, but I only get squared frames around basically anything, but not what I'm after. Any idea? Cheers










      share|improve this question













      Is it possible to draw a (coloured) border around the edge of a LaTeX symbol?

      For instance, I would like to draw a black border around the edge of
      a bigstar. So, something like this
      enter image description here



      Below a very short MWE



      documentclass[tikz,border=10pt]{standalone}
      usepackage{tikz}
      usepackage{amssymb}

      begin{document}
      begin{tikzpicture}[scale = 0.5]
      node [yellow] at (0,0,0) {$bigstar$};
      end{tikzpicture}
      end{document}


      I searched for solutions, but I only get squared frames around basically anything, but not what I'm after. Any idea? Cheers







      tikz-pgf draw






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 2 hours ago









      andrea

      1057




      1057






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          4
          down vote













          Basic



          documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
          usepackage{contour}
          usepackage{xcolor,amssymb}


          contourlength{0.5pt} % thickness
          contournumber{10} % number of replication

          begin{document}
          huge
          contour{orange}{$bigstar$}
          end{document}


          enter image description here



          Miscellaneous



          The following example is not impossible but it takes much time and energy with PSTricks, let alone TikZ.



          documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
          usepackage{contour}
          usepackage{xcolor,amsmath}
          usepackage{CJK}

          contourlength{0.2pt} % thickness
          contournumber{10} % number of replication

          begin{document}
          huge
          begin{CJK}{UTF8}{min}
          begin{center}
          contour{orange}{気持ちは}
          end{center}
          [
          contour{red}{$sqrt{x^2}$},
          contour{green}{$not=$},
          contour{blue}{$x$}
          ]
          begin{center}
          contour{cyan}{言い表しにくいです}
          end{center}
          end{CJK}
          end{document}


          enter image description here






          share|improve this answer






























            up vote
            2
            down vote













            I guess the most simple-minded approach would be to draw the node in black and a bit larger underneath. Notice that you need to add transform shape for the scale=0.5 to affect the node.



            documentclass[tikz,border=10pt]{standalone}
            usepackage{tikz}
            usepackage{amssymb}

            begin{document}
            begin{tikzpicture}[scale = 0.5,transform shape]
            node [black,scale=1.2] at (0,0,0) {$bigstar$};
            node [yellow] at (0,0,0) {$bigstar$};
            end{tikzpicture}
            end{document}


            enter image description here



            contour, as suggested in this answer does basically the same. However, TikZ also has star symbols built in. Why not use those?



            documentclass[tikz,border=10pt]{standalone}
            usepackage{tikz}
            usetikzlibrary{shapes.geometric}

            begin{document}
            begin{tikzpicture}
            node [star,draw,fill=yellow,minimum size=5mm,star point ratio=2]{};
            end{tikzpicture}
            end{document}


            enter image description here



            The crucial advantage is that you have all sorts of parameters that you can adjust to obtain the star you really want (a so-called super-star ;-), see the pgfmanual on p. 701.



            enter image description here






            share|improve this answer























            • +1. I also wrote the same code., except that I used red instead of black :)
              – nidhin
              2 hours ago










            • @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
              – marmot
              2 hours ago






            • 1




              hehe. Then let us consider it even. :)
              – nidhin
              2 hours ago











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "85"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: 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%2f464360%2fdraw-border-around-edge-of-symbol%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote













            Basic



            documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
            usepackage{contour}
            usepackage{xcolor,amssymb}


            contourlength{0.5pt} % thickness
            contournumber{10} % number of replication

            begin{document}
            huge
            contour{orange}{$bigstar$}
            end{document}


            enter image description here



            Miscellaneous



            The following example is not impossible but it takes much time and energy with PSTricks, let alone TikZ.



            documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
            usepackage{contour}
            usepackage{xcolor,amsmath}
            usepackage{CJK}

            contourlength{0.2pt} % thickness
            contournumber{10} % number of replication

            begin{document}
            huge
            begin{CJK}{UTF8}{min}
            begin{center}
            contour{orange}{気持ちは}
            end{center}
            [
            contour{red}{$sqrt{x^2}$},
            contour{green}{$not=$},
            contour{blue}{$x$}
            ]
            begin{center}
            contour{cyan}{言い表しにくいです}
            end{center}
            end{CJK}
            end{document}


            enter image description here






            share|improve this answer



























              up vote
              4
              down vote













              Basic



              documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
              usepackage{contour}
              usepackage{xcolor,amssymb}


              contourlength{0.5pt} % thickness
              contournumber{10} % number of replication

              begin{document}
              huge
              contour{orange}{$bigstar$}
              end{document}


              enter image description here



              Miscellaneous



              The following example is not impossible but it takes much time and energy with PSTricks, let alone TikZ.



              documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
              usepackage{contour}
              usepackage{xcolor,amsmath}
              usepackage{CJK}

              contourlength{0.2pt} % thickness
              contournumber{10} % number of replication

              begin{document}
              huge
              begin{CJK}{UTF8}{min}
              begin{center}
              contour{orange}{気持ちは}
              end{center}
              [
              contour{red}{$sqrt{x^2}$},
              contour{green}{$not=$},
              contour{blue}{$x$}
              ]
              begin{center}
              contour{cyan}{言い表しにくいです}
              end{center}
              end{CJK}
              end{document}


              enter image description here






              share|improve this answer

























                up vote
                4
                down vote










                up vote
                4
                down vote









                Basic



                documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
                usepackage{contour}
                usepackage{xcolor,amssymb}


                contourlength{0.5pt} % thickness
                contournumber{10} % number of replication

                begin{document}
                huge
                contour{orange}{$bigstar$}
                end{document}


                enter image description here



                Miscellaneous



                The following example is not impossible but it takes much time and energy with PSTricks, let alone TikZ.



                documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
                usepackage{contour}
                usepackage{xcolor,amsmath}
                usepackage{CJK}

                contourlength{0.2pt} % thickness
                contournumber{10} % number of replication

                begin{document}
                huge
                begin{CJK}{UTF8}{min}
                begin{center}
                contour{orange}{気持ちは}
                end{center}
                [
                contour{red}{$sqrt{x^2}$},
                contour{green}{$not=$},
                contour{blue}{$x$}
                ]
                begin{center}
                contour{cyan}{言い表しにくいです}
                end{center}
                end{CJK}
                end{document}


                enter image description here






                share|improve this answer














                Basic



                documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
                usepackage{contour}
                usepackage{xcolor,amssymb}


                contourlength{0.5pt} % thickness
                contournumber{10} % number of replication

                begin{document}
                huge
                contour{orange}{$bigstar$}
                end{document}


                enter image description here



                Miscellaneous



                The following example is not impossible but it takes much time and energy with PSTricks, let alone TikZ.



                documentclass[preview,border=12pt,varwidth,dvipsnames]{standalone}
                usepackage{contour}
                usepackage{xcolor,amsmath}
                usepackage{CJK}

                contourlength{0.2pt} % thickness
                contournumber{10} % number of replication

                begin{document}
                huge
                begin{CJK}{UTF8}{min}
                begin{center}
                contour{orange}{気持ちは}
                end{center}
                [
                contour{red}{$sqrt{x^2}$},
                contour{green}{$not=$},
                contour{blue}{$x$}
                ]
                begin{center}
                contour{cyan}{言い表しにくいです}
                end{center}
                end{CJK}
                end{document}


                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 hours ago

























                answered 2 hours ago









                Artificial Stupidity

                4,82111039




                4,82111039






















                    up vote
                    2
                    down vote













                    I guess the most simple-minded approach would be to draw the node in black and a bit larger underneath. Notice that you need to add transform shape for the scale=0.5 to affect the node.



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usepackage{amssymb}

                    begin{document}
                    begin{tikzpicture}[scale = 0.5,transform shape]
                    node [black,scale=1.2] at (0,0,0) {$bigstar$};
                    node [yellow] at (0,0,0) {$bigstar$};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    contour, as suggested in this answer does basically the same. However, TikZ also has star symbols built in. Why not use those?



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usetikzlibrary{shapes.geometric}

                    begin{document}
                    begin{tikzpicture}
                    node [star,draw,fill=yellow,minimum size=5mm,star point ratio=2]{};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    The crucial advantage is that you have all sorts of parameters that you can adjust to obtain the star you really want (a so-called super-star ;-), see the pgfmanual on p. 701.



                    enter image description here






                    share|improve this answer























                    • +1. I also wrote the same code., except that I used red instead of black :)
                      – nidhin
                      2 hours ago










                    • @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
                      – marmot
                      2 hours ago






                    • 1




                      hehe. Then let us consider it even. :)
                      – nidhin
                      2 hours ago















                    up vote
                    2
                    down vote













                    I guess the most simple-minded approach would be to draw the node in black and a bit larger underneath. Notice that you need to add transform shape for the scale=0.5 to affect the node.



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usepackage{amssymb}

                    begin{document}
                    begin{tikzpicture}[scale = 0.5,transform shape]
                    node [black,scale=1.2] at (0,0,0) {$bigstar$};
                    node [yellow] at (0,0,0) {$bigstar$};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    contour, as suggested in this answer does basically the same. However, TikZ also has star symbols built in. Why not use those?



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usetikzlibrary{shapes.geometric}

                    begin{document}
                    begin{tikzpicture}
                    node [star,draw,fill=yellow,minimum size=5mm,star point ratio=2]{};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    The crucial advantage is that you have all sorts of parameters that you can adjust to obtain the star you really want (a so-called super-star ;-), see the pgfmanual on p. 701.



                    enter image description here






                    share|improve this answer























                    • +1. I also wrote the same code., except that I used red instead of black :)
                      – nidhin
                      2 hours ago










                    • @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
                      – marmot
                      2 hours ago






                    • 1




                      hehe. Then let us consider it even. :)
                      – nidhin
                      2 hours ago













                    up vote
                    2
                    down vote










                    up vote
                    2
                    down vote









                    I guess the most simple-minded approach would be to draw the node in black and a bit larger underneath. Notice that you need to add transform shape for the scale=0.5 to affect the node.



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usepackage{amssymb}

                    begin{document}
                    begin{tikzpicture}[scale = 0.5,transform shape]
                    node [black,scale=1.2] at (0,0,0) {$bigstar$};
                    node [yellow] at (0,0,0) {$bigstar$};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    contour, as suggested in this answer does basically the same. However, TikZ also has star symbols built in. Why not use those?



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usetikzlibrary{shapes.geometric}

                    begin{document}
                    begin{tikzpicture}
                    node [star,draw,fill=yellow,minimum size=5mm,star point ratio=2]{};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    The crucial advantage is that you have all sorts of parameters that you can adjust to obtain the star you really want (a so-called super-star ;-), see the pgfmanual on p. 701.



                    enter image description here






                    share|improve this answer














                    I guess the most simple-minded approach would be to draw the node in black and a bit larger underneath. Notice that you need to add transform shape for the scale=0.5 to affect the node.



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usepackage{amssymb}

                    begin{document}
                    begin{tikzpicture}[scale = 0.5,transform shape]
                    node [black,scale=1.2] at (0,0,0) {$bigstar$};
                    node [yellow] at (0,0,0) {$bigstar$};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    contour, as suggested in this answer does basically the same. However, TikZ also has star symbols built in. Why not use those?



                    documentclass[tikz,border=10pt]{standalone}
                    usepackage{tikz}
                    usetikzlibrary{shapes.geometric}

                    begin{document}
                    begin{tikzpicture}
                    node [star,draw,fill=yellow,minimum size=5mm,star point ratio=2]{};
                    end{tikzpicture}
                    end{document}


                    enter image description here



                    The crucial advantage is that you have all sorts of parameters that you can adjust to obtain the star you really want (a so-called super-star ;-), see the pgfmanual on p. 701.



                    enter image description here







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 2 hours ago

























                    answered 2 hours ago









                    marmot

                    82.3k492175




                    82.3k492175












                    • +1. I also wrote the same code., except that I used red instead of black :)
                      – nidhin
                      2 hours ago










                    • @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
                      – marmot
                      2 hours ago






                    • 1




                      hehe. Then let us consider it even. :)
                      – nidhin
                      2 hours ago


















                    • +1. I also wrote the same code., except that I used red instead of black :)
                      – nidhin
                      2 hours ago










                    • @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
                      – marmot
                      2 hours ago






                    • 1




                      hehe. Then let us consider it even. :)
                      – nidhin
                      2 hours ago
















                    +1. I also wrote the same code., except that I used red instead of black :)
                    – nidhin
                    2 hours ago




                    +1. I also wrote the same code., except that I used red instead of black :)
                    – nidhin
                    2 hours ago












                    @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
                    – marmot
                    2 hours ago




                    @nidhin You very recently scooped me in another answer, which I (of course) upvoted, thanks!
                    – marmot
                    2 hours ago




                    1




                    1




                    hehe. Then let us consider it even. :)
                    – nidhin
                    2 hours ago




                    hehe. Then let us consider it even. :)
                    – nidhin
                    2 hours ago


















                    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%2f464360%2fdraw-border-around-edge-of-symbol%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

                    What visual should I use to simply compare current year value vs last year in Power BI desktop

                    Alexandru Averescu

                    Trompette piccolo