Fix some problems with a nice frame using tcolorbox












1















For my book I'm using this code (I have 4 with similar aspect) to put the important definitions, notes, and other. Here there is my MWE:



documentclass{article}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[1]{colback=teal!10,coltitle=black,colframe=teal!30,fonttitle=bfseries,title=#1, arc=0mm}
usepackage{lipsum}

begin{document}

begin{mybox}{An example}
lipsum[1]
end{mybox}

end{document}


and the output is:



enter image description here



I would like use the package pifont to put a general symbol as the picture below:



enter image description here



My problems are:




  1. Why is there a rounded corner if I have writen arc=0mm? I would like to have an edge and not a rounded edge;

  2. I would like the thickness not to be there at all or to be reduced to a very small line;

  3. How to insert the desired symbol from pifont package in a lateral position as shown in the second figure, in a dynamic position, that is to say that you can move it either downwards or upwards.










share|improve this question

























  • @JouleV Thank you very much for edit my question. Have you fix also my English (I hope)? :-)

    – Sebastiano
    8 hours ago






  • 2





    Hmm, I just edit the list formatting. I'm also not from an English-speaking country, so I would not do that ;-)

    – JouleV
    8 hours ago











  • I think we have some questions about overlaying symbols on tcolorbox environments already. This must be a duplicate. There are also examples of such overlays etc, as well as there is a pretty explanation about the geometry options of tcolorbox in the manual. Reading the manual does not hurt!

    – Christian Hupfer
    7 hours ago













  • @ChristianHupfer There is only an old question. You're right but my problem was adapted into my MWE my request. I have read, surely, the manual but I'm not very able to solve my question.

    – Sebastiano
    4 hours ago
















1















For my book I'm using this code (I have 4 with similar aspect) to put the important definitions, notes, and other. Here there is my MWE:



documentclass{article}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[1]{colback=teal!10,coltitle=black,colframe=teal!30,fonttitle=bfseries,title=#1, arc=0mm}
usepackage{lipsum}

begin{document}

begin{mybox}{An example}
lipsum[1]
end{mybox}

end{document}


and the output is:



enter image description here



I would like use the package pifont to put a general symbol as the picture below:



enter image description here



My problems are:




  1. Why is there a rounded corner if I have writen arc=0mm? I would like to have an edge and not a rounded edge;

  2. I would like the thickness not to be there at all or to be reduced to a very small line;

  3. How to insert the desired symbol from pifont package in a lateral position as shown in the second figure, in a dynamic position, that is to say that you can move it either downwards or upwards.










share|improve this question

























  • @JouleV Thank you very much for edit my question. Have you fix also my English (I hope)? :-)

    – Sebastiano
    8 hours ago






  • 2





    Hmm, I just edit the list formatting. I'm also not from an English-speaking country, so I would not do that ;-)

    – JouleV
    8 hours ago











  • I think we have some questions about overlaying symbols on tcolorbox environments already. This must be a duplicate. There are also examples of such overlays etc, as well as there is a pretty explanation about the geometry options of tcolorbox in the manual. Reading the manual does not hurt!

    – Christian Hupfer
    7 hours ago













  • @ChristianHupfer There is only an old question. You're right but my problem was adapted into my MWE my request. I have read, surely, the manual but I'm not very able to solve my question.

    – Sebastiano
    4 hours ago














1












1








1








For my book I'm using this code (I have 4 with similar aspect) to put the important definitions, notes, and other. Here there is my MWE:



documentclass{article}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[1]{colback=teal!10,coltitle=black,colframe=teal!30,fonttitle=bfseries,title=#1, arc=0mm}
usepackage{lipsum}

begin{document}

begin{mybox}{An example}
lipsum[1]
end{mybox}

end{document}


and the output is:



enter image description here



I would like use the package pifont to put a general symbol as the picture below:



enter image description here



My problems are:




  1. Why is there a rounded corner if I have writen arc=0mm? I would like to have an edge and not a rounded edge;

  2. I would like the thickness not to be there at all or to be reduced to a very small line;

  3. How to insert the desired symbol from pifont package in a lateral position as shown in the second figure, in a dynamic position, that is to say that you can move it either downwards or upwards.










share|improve this question
















For my book I'm using this code (I have 4 with similar aspect) to put the important definitions, notes, and other. Here there is my MWE:



documentclass{article}
usepackage[most]{tcolorbox}
newtcolorbox{mybox}[1]{colback=teal!10,coltitle=black,colframe=teal!30,fonttitle=bfseries,title=#1, arc=0mm}
usepackage{lipsum}

begin{document}

begin{mybox}{An example}
lipsum[1]
end{mybox}

end{document}


and the output is:



enter image description here



I would like use the package pifont to put a general symbol as the picture below:



enter image description here



My problems are:




  1. Why is there a rounded corner if I have writen arc=0mm? I would like to have an edge and not a rounded edge;

  2. I would like the thickness not to be there at all or to be reduced to a very small line;

  3. How to insert the desired symbol from pifont package in a lateral position as shown in the second figure, in a dynamic position, that is to say that you can move it either downwards or upwards.







fonts tcolorbox






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 7 hours ago









Sigur

25k356139




25k356139










asked 8 hours ago









SebastianoSebastiano

10.1k41858




10.1k41858













  • @JouleV Thank you very much for edit my question. Have you fix also my English (I hope)? :-)

    – Sebastiano
    8 hours ago






  • 2





    Hmm, I just edit the list formatting. I'm also not from an English-speaking country, so I would not do that ;-)

    – JouleV
    8 hours ago











  • I think we have some questions about overlaying symbols on tcolorbox environments already. This must be a duplicate. There are also examples of such overlays etc, as well as there is a pretty explanation about the geometry options of tcolorbox in the manual. Reading the manual does not hurt!

    – Christian Hupfer
    7 hours ago













  • @ChristianHupfer There is only an old question. You're right but my problem was adapted into my MWE my request. I have read, surely, the manual but I'm not very able to solve my question.

    – Sebastiano
    4 hours ago



















  • @JouleV Thank you very much for edit my question. Have you fix also my English (I hope)? :-)

    – Sebastiano
    8 hours ago






  • 2





    Hmm, I just edit the list formatting. I'm also not from an English-speaking country, so I would not do that ;-)

    – JouleV
    8 hours ago











  • I think we have some questions about overlaying symbols on tcolorbox environments already. This must be a duplicate. There are also examples of such overlays etc, as well as there is a pretty explanation about the geometry options of tcolorbox in the manual. Reading the manual does not hurt!

    – Christian Hupfer
    7 hours ago













  • @ChristianHupfer There is only an old question. You're right but my problem was adapted into my MWE my request. I have read, surely, the manual but I'm not very able to solve my question.

    – Sebastiano
    4 hours ago

















@JouleV Thank you very much for edit my question. Have you fix also my English (I hope)? :-)

– Sebastiano
8 hours ago





@JouleV Thank you very much for edit my question. Have you fix also my English (I hope)? :-)

– Sebastiano
8 hours ago




2




2





Hmm, I just edit the list formatting. I'm also not from an English-speaking country, so I would not do that ;-)

– JouleV
8 hours ago





Hmm, I just edit the list formatting. I'm also not from an English-speaking country, so I would not do that ;-)

– JouleV
8 hours ago













I think we have some questions about overlaying symbols on tcolorbox environments already. This must be a duplicate. There are also examples of such overlays etc, as well as there is a pretty explanation about the geometry options of tcolorbox in the manual. Reading the manual does not hurt!

– Christian Hupfer
7 hours ago







I think we have some questions about overlaying symbols on tcolorbox environments already. This must be a duplicate. There are also examples of such overlays etc, as well as there is a pretty explanation about the geometry options of tcolorbox in the manual. Reading the manual does not hurt!

– Christian Hupfer
7 hours ago















@ChristianHupfer There is only an old question. You're right but my problem was adapted into my MWE my request. I have read, surely, the manual but I'm not very able to solve my question.

– Sebastiano
4 hours ago





@ChristianHupfer There is only an old question. You're right but my problem was adapted into my MWE my request. I have read, surely, the manual but I'm not very able to solve my question.

– Sebastiano
4 hours ago










2 Answers
2






active

oldest

votes


















4
















  1. arc=0pt. This option fixes corner's inner radius while outer arc remains untouched. Use sharp corners option to get inner and outer sharp corners.


  2. rules. Tcolorbox defines five rules around the box: toprule, bottomrule, leftrule, rightrule and titlerule (this one between title and upper part). You can fix each one with independence of others or all together with boxrule. To suppress of all them use boxrule=0pt

  3. Overlay symbol. You can use overlay options to add any symbol or figure with TikZ commands. It's conveninent to declare the box as enhanced to allow TikZ commands.


All together:



documentclass{article}
usepackage[most]{tcolorbox}
usepackage{pifont}

newtcolorbox{mybox}[1]{%
colback=teal!10,
coltitle=black,
colframe=teal!30,
fonttitle=bfseries,
title=#1,
sharp corners,
boxrule=0pt,
enhanced,
overlay={node[font=Huge, text=cyan!70!black] at ([yshift=-4mm]interior.north west) {ding{228}};}
}

usepackage{lipsum}

begin{document}

begin{mybox}{An example}
lipsum[1]
end{mybox}

end{document}


enter image description here






share|improve this answer
























  • Thank you very much to all users. I like the simple question :-) Thank you again.

    – Sebastiano
    2 hours ago



















3














Only answering the first question, because multiple questions in one post are not good:



The radius of the other corners is defined by outer arc, not arc



documentclass{article}
usepackage[most]{tcolorbox}
newtcolorbox{mybox} [1]{
colback=teal!10,
coltitle=black,
colframe=teal!30,
fonttitle=bfseries,
title=#1,
arc=0mm,
outer arc=0mm
}
usepackage{lipsum}

begin{document}

begin{mybox}{An example}
lipsum[1]
end{mybox}

end{document}


enter image description here






share|improve this answer










New contributor




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




















    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%2f475701%2ffix-some-problems-with-a-nice-frame-using-tcolorbox%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









    4
















    1. arc=0pt. This option fixes corner's inner radius while outer arc remains untouched. Use sharp corners option to get inner and outer sharp corners.


    2. rules. Tcolorbox defines five rules around the box: toprule, bottomrule, leftrule, rightrule and titlerule (this one between title and upper part). You can fix each one with independence of others or all together with boxrule. To suppress of all them use boxrule=0pt

    3. Overlay symbol. You can use overlay options to add any symbol or figure with TikZ commands. It's conveninent to declare the box as enhanced to allow TikZ commands.


    All together:



    documentclass{article}
    usepackage[most]{tcolorbox}
    usepackage{pifont}

    newtcolorbox{mybox}[1]{%
    colback=teal!10,
    coltitle=black,
    colframe=teal!30,
    fonttitle=bfseries,
    title=#1,
    sharp corners,
    boxrule=0pt,
    enhanced,
    overlay={node[font=Huge, text=cyan!70!black] at ([yshift=-4mm]interior.north west) {ding{228}};}
    }

    usepackage{lipsum}

    begin{document}

    begin{mybox}{An example}
    lipsum[1]
    end{mybox}

    end{document}


    enter image description here






    share|improve this answer
























    • Thank you very much to all users. I like the simple question :-) Thank you again.

      – Sebastiano
      2 hours ago
















    4
















    1. arc=0pt. This option fixes corner's inner radius while outer arc remains untouched. Use sharp corners option to get inner and outer sharp corners.


    2. rules. Tcolorbox defines five rules around the box: toprule, bottomrule, leftrule, rightrule and titlerule (this one between title and upper part). You can fix each one with independence of others or all together with boxrule. To suppress of all them use boxrule=0pt

    3. Overlay symbol. You can use overlay options to add any symbol or figure with TikZ commands. It's conveninent to declare the box as enhanced to allow TikZ commands.


    All together:



    documentclass{article}
    usepackage[most]{tcolorbox}
    usepackage{pifont}

    newtcolorbox{mybox}[1]{%
    colback=teal!10,
    coltitle=black,
    colframe=teal!30,
    fonttitle=bfseries,
    title=#1,
    sharp corners,
    boxrule=0pt,
    enhanced,
    overlay={node[font=Huge, text=cyan!70!black] at ([yshift=-4mm]interior.north west) {ding{228}};}
    }

    usepackage{lipsum}

    begin{document}

    begin{mybox}{An example}
    lipsum[1]
    end{mybox}

    end{document}


    enter image description here






    share|improve this answer
























    • Thank you very much to all users. I like the simple question :-) Thank you again.

      – Sebastiano
      2 hours ago














    4












    4








    4









    1. arc=0pt. This option fixes corner's inner radius while outer arc remains untouched. Use sharp corners option to get inner and outer sharp corners.


    2. rules. Tcolorbox defines five rules around the box: toprule, bottomrule, leftrule, rightrule and titlerule (this one between title and upper part). You can fix each one with independence of others or all together with boxrule. To suppress of all them use boxrule=0pt

    3. Overlay symbol. You can use overlay options to add any symbol or figure with TikZ commands. It's conveninent to declare the box as enhanced to allow TikZ commands.


    All together:



    documentclass{article}
    usepackage[most]{tcolorbox}
    usepackage{pifont}

    newtcolorbox{mybox}[1]{%
    colback=teal!10,
    coltitle=black,
    colframe=teal!30,
    fonttitle=bfseries,
    title=#1,
    sharp corners,
    boxrule=0pt,
    enhanced,
    overlay={node[font=Huge, text=cyan!70!black] at ([yshift=-4mm]interior.north west) {ding{228}};}
    }

    usepackage{lipsum}

    begin{document}

    begin{mybox}{An example}
    lipsum[1]
    end{mybox}

    end{document}


    enter image description here






    share|improve this answer















    1. arc=0pt. This option fixes corner's inner radius while outer arc remains untouched. Use sharp corners option to get inner and outer sharp corners.


    2. rules. Tcolorbox defines five rules around the box: toprule, bottomrule, leftrule, rightrule and titlerule (this one between title and upper part). You can fix each one with independence of others or all together with boxrule. To suppress of all them use boxrule=0pt

    3. Overlay symbol. You can use overlay options to add any symbol or figure with TikZ commands. It's conveninent to declare the box as enhanced to allow TikZ commands.


    All together:



    documentclass{article}
    usepackage[most]{tcolorbox}
    usepackage{pifont}

    newtcolorbox{mybox}[1]{%
    colback=teal!10,
    coltitle=black,
    colframe=teal!30,
    fonttitle=bfseries,
    title=#1,
    sharp corners,
    boxrule=0pt,
    enhanced,
    overlay={node[font=Huge, text=cyan!70!black] at ([yshift=-4mm]interior.north west) {ding{228}};}
    }

    usepackage{lipsum}

    begin{document}

    begin{mybox}{An example}
    lipsum[1]
    end{mybox}

    end{document}


    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 7 hours ago









    IgnasiIgnasi

    93.5k4169311




    93.5k4169311













    • Thank you very much to all users. I like the simple question :-) Thank you again.

      – Sebastiano
      2 hours ago



















    • Thank you very much to all users. I like the simple question :-) Thank you again.

      – Sebastiano
      2 hours ago

















    Thank you very much to all users. I like the simple question :-) Thank you again.

    – Sebastiano
    2 hours ago





    Thank you very much to all users. I like the simple question :-) Thank you again.

    – Sebastiano
    2 hours ago











    3














    Only answering the first question, because multiple questions in one post are not good:



    The radius of the other corners is defined by outer arc, not arc



    documentclass{article}
    usepackage[most]{tcolorbox}
    newtcolorbox{mybox} [1]{
    colback=teal!10,
    coltitle=black,
    colframe=teal!30,
    fonttitle=bfseries,
    title=#1,
    arc=0mm,
    outer arc=0mm
    }
    usepackage{lipsum}

    begin{document}

    begin{mybox}{An example}
    lipsum[1]
    end{mybox}

    end{document}


    enter image description here






    share|improve this answer










    New contributor




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

























      3














      Only answering the first question, because multiple questions in one post are not good:



      The radius of the other corners is defined by outer arc, not arc



      documentclass{article}
      usepackage[most]{tcolorbox}
      newtcolorbox{mybox} [1]{
      colback=teal!10,
      coltitle=black,
      colframe=teal!30,
      fonttitle=bfseries,
      title=#1,
      arc=0mm,
      outer arc=0mm
      }
      usepackage{lipsum}

      begin{document}

      begin{mybox}{An example}
      lipsum[1]
      end{mybox}

      end{document}


      enter image description here






      share|improve this answer










      New contributor




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























        3












        3








        3







        Only answering the first question, because multiple questions in one post are not good:



        The radius of the other corners is defined by outer arc, not arc



        documentclass{article}
        usepackage[most]{tcolorbox}
        newtcolorbox{mybox} [1]{
        colback=teal!10,
        coltitle=black,
        colframe=teal!30,
        fonttitle=bfseries,
        title=#1,
        arc=0mm,
        outer arc=0mm
        }
        usepackage{lipsum}

        begin{document}

        begin{mybox}{An example}
        lipsum[1]
        end{mybox}

        end{document}


        enter image description here






        share|improve this answer










        New contributor




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










        Only answering the first question, because multiple questions in one post are not good:



        The radius of the other corners is defined by outer arc, not arc



        documentclass{article}
        usepackage[most]{tcolorbox}
        newtcolorbox{mybox} [1]{
        colback=teal!10,
        coltitle=black,
        colframe=teal!30,
        fonttitle=bfseries,
        title=#1,
        arc=0mm,
        outer arc=0mm
        }
        usepackage{lipsum}

        begin{document}

        begin{mybox}{An example}
        lipsum[1]
        end{mybox}

        end{document}


        enter image description here







        share|improve this answer










        New contributor




        user181777 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 answer



        share|improve this answer








        edited 7 hours ago









        Hafid Boukhoulda

        3,6971621




        3,6971621






        New contributor




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









        answered 8 hours ago









        user181777user181777

        785




        785




        New contributor




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





        New contributor





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






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






























            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%2f475701%2ffix-some-problems-with-a-nice-frame-using-tcolorbox%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

            CARDNET

            Boot-repair Failure: Unable to locate package grub-common:i386

            濃尾地震