Create a box using the tcolorbox package or any other? (image)Position image next to a text within an adjustbox created in a newenvironmentSplit beamer and alignmenttoo much space between two environment create with tcolorboxIndentation in tcolorbox packageCreate a color box?Create a box using tcolorbox package?tcolorbox / out of the boxNeed help in creating tcolorbox (like the one in manual)How to set different length for different borderline of a box using tcolorbox?Tcolorbox: breakable inlined boxBox Title rounded corners in Tcolorbox

What is this nut?

Why, in the US, are politicians tried by other politicians?

Did the US embassy in Kyiv resist hanging Trump's picture while Yovanovitch was ambassador?

Peaceable Bishops on an 8x8 grid

Cheap and safe way to dim 100+ 60W Incandescent bulbs

Music engraving - note with two accidentals - natural (♮) and sharp (♯)

Cooking with sugar makes pan very difficult to clean

Because things smell, is everything evaporating?

Regarding New Zealand Tourist Visa validity

What are the maximum hit points of an NPC?

Universal example of Lie algebra

What will happen to a ball kept on a frictionless inclined plane?

Draw the Ionising Radiation Hazard Symbol

Why are file URLs marked as not secure while HTTPS URLs are marked as secure in browsers?

Rudin Exercise 2.7

Did the Apollo missions fly "over the top" of the Van Allen radiation belts?

What is the largest piece of space debris volumetrically?

Employer wants me to do something explicitly illegal

A New Math Operation?

How to deal with an employee who is requesting a demotion?

How can I see Explorer.exe's frames per second?

Why would Earth be long-term unsuitable for an advanced alien species that's already colonized it?

What is a recently obsolete computer storage device that would be significantly difficult to extract data from?

Rotational Mechanics: Is Angular Acceleration Possible without any External Torque?



Create a box using the tcolorbox package or any other? (image)


Position image next to a text within an adjustbox created in a newenvironmentSplit beamer and alignmenttoo much space between two environment create with tcolorboxIndentation in tcolorbox packageCreate a color box?Create a box using tcolorbox package?tcolorbox / out of the boxNeed help in creating tcolorbox (like the one in manual)How to set different length for different borderline of a box using tcolorbox?Tcolorbox: breakable inlined boxBox Title rounded corners in Tcolorbox






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









6


















I would like to make a box like the figure below. Can you assist me with text code using tcolorbox?
enter image description here



Thanks










share|improve this question



























  • Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.

    – Stefan Pinnow
    Oct 16 at 18:37











  • Why does the inverted relation have an i and the non inverted one does not?

    – Schrödinger's cat
    Oct 17 at 0:56

















6


















I would like to make a box like the figure below. Can you assist me with text code using tcolorbox?
enter image description here



Thanks










share|improve this question



























  • Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.

    – Stefan Pinnow
    Oct 16 at 18:37











  • Why does the inverted relation have an i and the non inverted one does not?

    – Schrödinger's cat
    Oct 17 at 0:56













6













6









6


2






I would like to make a box like the figure below. Can you assist me with text code using tcolorbox?
enter image description here



Thanks










share|improve this question
















I would like to make a box like the figure below. Can you assist me with text code using tcolorbox?
enter image description here



Thanks







tables color packages tcolorbox box






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 16 at 19:43









Sveinung

16k2 gold badges40 silver badges65 bronze badges




16k2 gold badges40 silver badges65 bronze badges










asked Oct 16 at 17:54









phymathphymath

1534 bronze badges




1534 bronze badges















  • Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.

    – Stefan Pinnow
    Oct 16 at 18:37











  • Why does the inverted relation have an i and the non inverted one does not?

    – Schrödinger's cat
    Oct 17 at 0:56

















  • Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.

    – Stefan Pinnow
    Oct 16 at 18:37











  • Why does the inverted relation have an i and the non inverted one does not?

    – Schrödinger's cat
    Oct 17 at 0:56
















Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.

– Stefan Pinnow
Oct 16 at 18:37





Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help.

– Stefan Pinnow
Oct 16 at 18:37













Why does the inverted relation have an i and the non inverted one does not?

– Schrödinger's cat
Oct 17 at 0:56





Why does the inverted relation have an i and the non inverted one does not?

– Schrödinger's cat
Oct 17 at 0:56










5 Answers
5






active

oldest

votes


















2



















I offer a solution based on the xcoffin package, not to compete with the other excellent solutions proposed, but to show the advantages of a great package.



Many questions posted in this forum relates with the positioning of various elements as graphics, tables, text, etc. on a page, in specific places and in relation with one another.
In many cases against TeX wishes.



Over time I was able to replace geometry, rotate, titlepage, and similar packages with xcoffin, to design book covers, title-pages, posters, chapter styles, etc. thus avoiding conflicts and specially avoiding the dreadful time checking a full upgrade to discover that old projects not longer produce the same output or simply did not run at all.



To me the lesser number of packages, the better.



xcoffin provides only a handful of commands with intuitive meaning (at least for me) and does not require remembering dozens of keyvals or options. Excellent manual, by the way.



I also appreciate the fact that in the case of the one-time jobs mentioned earlier, the resulting code is very simple since there not need to contemplate multiple alternatives for the input and it is mostly auto-documented. Even if a book title changes over the course of a project, the corrections are straightforward.



Of course previously you need to produce the material, perhaps using amsmath, xcolor, tabularx, graphicx, ... and then fill the coffin with it.



Afterward you fit the coffins in the page using as origin the current text insertion point, or in relative positions among themselves, as could be the case of an image and a margin explanatory note. Then you typeset the result at the insertion point or in any other place of the page of your liking (a plus) since the resulting coffin it is not a float.



In this particular case only four coffins are required: the Output which will collect the others, a green rectangle, a side rule, and the inside text, as shown in the code. Both the rectangle and the rule adapts theirs height to the text content.



I also include a macro, to be moved to the preamble, to reduce the clutter of the document. For the fun of it, and supposing that several Definitions will be included in the document, I added a counter and applied the macro five times.



documentclassarticle

usepackagexcolor
usepackageamsmath
usepackagexcoffins,calc

begindocument

%% Create and Set Coffins

NewCoffinOutput %Coffin to hold the others
NewCoffinDefinition % Definition definition ...
NewCoffinBackFrame % Background: green rectangle
NewCoffinSideRule %lateral left border

SetHorizontalCoffinOutput % It will provide the reference point to join the others

SetVerticalCoffinDefinitionlinewidth%
textbfDefinition. $gamma^5$ is defined to be the matrix given by:%
[gamma^5=frac124epsilon_abcdgamma^abcd ]%


%% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip

SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

%% Assembly Coffins
JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output

%% now your document

We need some more meaningless test to for a multiline paragraph, because these form a basis for the space of all complex $4times4$ matrices.

%% Typeset Definition
noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

%%%%%%%%%%%%%%%%% macro def, to be moved to the preamble, use as SetDefinitionyour-text
newcounterdefcounter

newcommandSetDefinition[1]%
SetHorizontalCoffinOutput % It will be the reference point join the others
SetVerticalCoffinDefinitionlinewidthtextbfDefinition stepcounterdefcounterRomandefcounter. #1 %added counter

%% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip
SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

%% Assembly Coffins
JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output
%% Typeset ooutput
noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

%%%%%%%%%%%%%%%%%%%%% end macro

SetDefinition$gamma^1$ is defined to be the matrix given by:[gamma^1=frac124epsilon_abcdgamma^abcd ]
SetDefinition$gamma^2$ is defined to be the matrix given by:[gamma^2=frac124epsilon_abcdgamma^abcd ]
SetDefinition$gamma^3$ is defined to be the matrix given by:[gamma^3=frac124epsilon_abcdgamma^abcd ]
SetDefinition$gamma^4$ is defined to be the matrix given by:[gamma^4=frac124epsilon_abcdgamma^abcd ]
SetDefinition$gamma^5$ is defined to be the matrix given above.\ % a short Definition
enddocument


Definition






share|improve this answer



































    8



















    The following might give you an idea on how to start:



    enter image description here



    documentclassarticle
    usepackage[most]tcolorbox

    newtcolorboxmybox
    enhanced,
    boxrule=0pt,frame hidden,
    borderline west=4pt0ptgreen!75!black,
    colback=green!10!white,
    sharp corners


    begindocument


    beginmybox
    textbfDefinition My definition text here
    endmybox

    enddocument





    share|improve this answer

































      6



















      A very light weight solution is to use a tabular. Not as sexy as tcolorbox and other TikZ based solution, but it compiles fast. The simplest is to use a p-column as wide as the linewidth.



      1. First I define a new column type N and calculate its width to linewidth minus two tabcolsep. Then the table fits between the margins and will adapt if you change margins.


      2. Since we need some space above an below the "box", I have set the table inside a center-environment to ensure that the table is fixed between the margins, and vertical space on par with other environments.


      3. Thereafter, I define the width and colour of the left vertical bar. I put the redefinition inside the centring environment, which limits the scope of the redefinitions to this taular. Without, all table rules will be green and 3 pt thick!


      I have since yesterday slightly optimised the code. It is possible to define a new environment, and move most of the code to such definition. This may be useful if you have lot of boxes.



      enter image description here



      documentclassarticle
      usepackageamsmath
      usepackage[table]xcolor
      usepackagearray

      newcolumntypeN@

      begindocument

      We need som more meaningless test to for a multiline paragraph, because these form a basis for the space of all compex $4times4$ matrices.

      begincenter
      setlengthextrarowheight4pt
      setlengtharrayrulewidth3pt
      arrayrulecolorgreen!50!black
      begintabularN
      cellcolorgreen!15
      textbfDefinition: $lambda^5$ is defined to be the matrix given by:
      medskip
      [lambda^5=dfrac114 epsilon_abcdgamma^abcd ]

      endtabular
      endcenter

      We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

      enddocument





      share|improve this answer



































        6



















        I have used mdframed instead of tcolorbox (they are similar package but tcolorbox is mor complete than mdframed). You can see that you have the same result. Here there is my proposal where I have used for theorem, definition, examples, the specific package amsthm with the possibility to create a book: see the specific class of the document documentclass[12pt]book. For to increase the tickness vertical green line you can to change the value linewidth=2.5pt.
        This example sets the text in italic:



        documentclass[12pt]book
        usepackageamsthm
        usepackageamsmath,amssymb
        usepackage[svgnames]xcolor
        RequirePackage[framemethod=default]mdframed
        newmdenv[skipabove=7pt,
        skipbelow=7pt,
        rightline=false,
        leftline=true,
        topline=false,
        bottomline=false,
        linecolor=Green,
        backgroundcolor=Green!10,
        innerleftmargin=5pt,
        innerrightmargin=5pt,
        innertopmargin=2pt,
        leftmargin=0cm,
        rightmargin=0cm,
        linewidth=2.5pt,
        innerbottommargin=5pt]dBox
        newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
        newtheoremdefinitionTDefinition[section]

        begindocument
        begindefinition
        $gamma^5$ is defined to be a matrix given by:
        [gamma^5=frac124epsilon_abcdgamma^abcd]
        enddefinition
        enddocument


        enter image description here



        Another code sets the text in roman adding theoremstyledefinition. See this MWE:



        enter image description here



        documentclass[12pt]book
        usepackageamsthm
        usepackageamsmath,amssymb
        usepackage[svgnames]xcolor
        RequirePackage[framemethod=default]mdframed
        newmdenv[skipabove=7pt,
        skipbelow=7pt,
        rightline=false,
        leftline=true,
        topline=false,
        bottomline=false,
        linecolor=Green,
        backgroundcolor=Green!10,
        innerleftmargin=5pt,
        innerrightmargin=5pt,
        innertopmargin=2pt,
        leftmargin=0cm,
        rightmargin=0cm,
        linewidth=2.5pt,
        innerbottommargin=5pt]dBox
        theoremstyledefinition
        newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
        newtheoremdefinitionTDefinition[section]

        begindocument
        begindefinition
        $gamma^5$ is defined to be a matrix given by:
        [gamma^5=frac124epsilon_abcdgamma^abcd]
        enddefinition
        enddocument





        share|improve this answer



































          5



















          In case that you do not use tcolorbox or tikz for anything else, is a bit overkill use it for a simple box. What I see is AMS theorem-like environment with the definition style in a green box with a vertical rule beside, so I made defined the definition command that make just that. Note that macros cannot have paragraph breaks, so, if you need will that, define a new environment instead of a macro.



          The advantage of use the amsthm package just to write "definition" in bold is that you can just remove the asterisk of line 7 to have numbered definitions that you can reference by the usual label-- ref method.




          mwe




          documentclassarticle
          usepackagexcolor
          usepackageamsthm
          usepackagelipsum

          theoremstyledefinition
          newtheorem*defiDefinition
          defdefinition#1parmedskipnoindentcolorgreen!50!blackvrule width 3pt%
          colorboxgreen!30!gray!15parbox[c]dimexprlinewidth-3pt-2fboxsep-2fboxrule
          begindefi#1enddefiparmedskip

          begindocument

          lipsum[1][1-4]

          definition$gamma^5$ is defined to be the matrix given by:
          [gamma^5=frac124epsilon_abcdgamma^abcd ]

          lipsum[2][1-5]

          enddocument





          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',
            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/4.0/"u003ecc by-sa 4.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%2f512501%2fcreate-a-box-using-the-tcolorbox-package-or-any-other-image%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown


























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2



















            I offer a solution based on the xcoffin package, not to compete with the other excellent solutions proposed, but to show the advantages of a great package.



            Many questions posted in this forum relates with the positioning of various elements as graphics, tables, text, etc. on a page, in specific places and in relation with one another.
            In many cases against TeX wishes.



            Over time I was able to replace geometry, rotate, titlepage, and similar packages with xcoffin, to design book covers, title-pages, posters, chapter styles, etc. thus avoiding conflicts and specially avoiding the dreadful time checking a full upgrade to discover that old projects not longer produce the same output or simply did not run at all.



            To me the lesser number of packages, the better.



            xcoffin provides only a handful of commands with intuitive meaning (at least for me) and does not require remembering dozens of keyvals or options. Excellent manual, by the way.



            I also appreciate the fact that in the case of the one-time jobs mentioned earlier, the resulting code is very simple since there not need to contemplate multiple alternatives for the input and it is mostly auto-documented. Even if a book title changes over the course of a project, the corrections are straightforward.



            Of course previously you need to produce the material, perhaps using amsmath, xcolor, tabularx, graphicx, ... and then fill the coffin with it.



            Afterward you fit the coffins in the page using as origin the current text insertion point, or in relative positions among themselves, as could be the case of an image and a margin explanatory note. Then you typeset the result at the insertion point or in any other place of the page of your liking (a plus) since the resulting coffin it is not a float.



            In this particular case only four coffins are required: the Output which will collect the others, a green rectangle, a side rule, and the inside text, as shown in the code. Both the rectangle and the rule adapts theirs height to the text content.



            I also include a macro, to be moved to the preamble, to reduce the clutter of the document. For the fun of it, and supposing that several Definitions will be included in the document, I added a counter and applied the macro five times.



            documentclassarticle

            usepackagexcolor
            usepackageamsmath
            usepackagexcoffins,calc

            begindocument

            %% Create and Set Coffins

            NewCoffinOutput %Coffin to hold the others
            NewCoffinDefinition % Definition definition ...
            NewCoffinBackFrame % Background: green rectangle
            NewCoffinSideRule %lateral left border

            SetHorizontalCoffinOutput % It will provide the reference point to join the others

            SetVerticalCoffinDefinitionlinewidth%
            textbfDefinition. $gamma^5$ is defined to be the matrix given by:%
            [gamma^5=frac124epsilon_abcdgamma^abcd ]%


            %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
            SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip

            SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

            %% Assembly Coffins
            JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
            JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
            JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output

            %% now your document

            We need some more meaningless test to for a multiline paragraph, because these form a basis for the space of all complex $4times4$ matrices.

            %% Typeset Definition
            noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
            vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

            We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

            %%%%%%%%%%%%%%%%% macro def, to be moved to the preamble, use as SetDefinitionyour-text
            newcounterdefcounter

            newcommandSetDefinition[1]%
            SetHorizontalCoffinOutput % It will be the reference point join the others
            SetVerticalCoffinDefinitionlinewidthtextbfDefinition stepcounterdefcounterRomandefcounter. #1 %added counter

            %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
            SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip
            SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

            %% Assembly Coffins
            JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
            JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
            JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output
            %% Typeset ooutput
            noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
            vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

            %%%%%%%%%%%%%%%%%%%%% end macro

            SetDefinition$gamma^1$ is defined to be the matrix given by:[gamma^1=frac124epsilon_abcdgamma^abcd ]
            SetDefinition$gamma^2$ is defined to be the matrix given by:[gamma^2=frac124epsilon_abcdgamma^abcd ]
            SetDefinition$gamma^3$ is defined to be the matrix given by:[gamma^3=frac124epsilon_abcdgamma^abcd ]
            SetDefinition$gamma^4$ is defined to be the matrix given by:[gamma^4=frac124epsilon_abcdgamma^abcd ]
            SetDefinition$gamma^5$ is defined to be the matrix given above.\ % a short Definition
            enddocument


            Definition






            share|improve this answer
































              2



















              I offer a solution based on the xcoffin package, not to compete with the other excellent solutions proposed, but to show the advantages of a great package.



              Many questions posted in this forum relates with the positioning of various elements as graphics, tables, text, etc. on a page, in specific places and in relation with one another.
              In many cases against TeX wishes.



              Over time I was able to replace geometry, rotate, titlepage, and similar packages with xcoffin, to design book covers, title-pages, posters, chapter styles, etc. thus avoiding conflicts and specially avoiding the dreadful time checking a full upgrade to discover that old projects not longer produce the same output or simply did not run at all.



              To me the lesser number of packages, the better.



              xcoffin provides only a handful of commands with intuitive meaning (at least for me) and does not require remembering dozens of keyvals or options. Excellent manual, by the way.



              I also appreciate the fact that in the case of the one-time jobs mentioned earlier, the resulting code is very simple since there not need to contemplate multiple alternatives for the input and it is mostly auto-documented. Even if a book title changes over the course of a project, the corrections are straightforward.



              Of course previously you need to produce the material, perhaps using amsmath, xcolor, tabularx, graphicx, ... and then fill the coffin with it.



              Afterward you fit the coffins in the page using as origin the current text insertion point, or in relative positions among themselves, as could be the case of an image and a margin explanatory note. Then you typeset the result at the insertion point or in any other place of the page of your liking (a plus) since the resulting coffin it is not a float.



              In this particular case only four coffins are required: the Output which will collect the others, a green rectangle, a side rule, and the inside text, as shown in the code. Both the rectangle and the rule adapts theirs height to the text content.



              I also include a macro, to be moved to the preamble, to reduce the clutter of the document. For the fun of it, and supposing that several Definitions will be included in the document, I added a counter and applied the macro five times.



              documentclassarticle

              usepackagexcolor
              usepackageamsmath
              usepackagexcoffins,calc

              begindocument

              %% Create and Set Coffins

              NewCoffinOutput %Coffin to hold the others
              NewCoffinDefinition % Definition definition ...
              NewCoffinBackFrame % Background: green rectangle
              NewCoffinSideRule %lateral left border

              SetHorizontalCoffinOutput % It will provide the reference point to join the others

              SetVerticalCoffinDefinitionlinewidth%
              textbfDefinition. $gamma^5$ is defined to be the matrix given by:%
              [gamma^5=frac124epsilon_abcdgamma^abcd ]%


              %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
              SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip

              SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

              %% Assembly Coffins
              JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
              JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
              JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output

              %% now your document

              We need some more meaningless test to for a multiline paragraph, because these form a basis for the space of all complex $4times4$ matrices.

              %% Typeset Definition
              noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
              vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

              We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

              %%%%%%%%%%%%%%%%% macro def, to be moved to the preamble, use as SetDefinitionyour-text
              newcounterdefcounter

              newcommandSetDefinition[1]%
              SetHorizontalCoffinOutput % It will be the reference point join the others
              SetVerticalCoffinDefinitionlinewidthtextbfDefinition stepcounterdefcounterRomandefcounter. #1 %added counter

              %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
              SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip
              SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

              %% Assembly Coffins
              JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
              JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
              JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output
              %% Typeset ooutput
              noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
              vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

              %%%%%%%%%%%%%%%%%%%%% end macro

              SetDefinition$gamma^1$ is defined to be the matrix given by:[gamma^1=frac124epsilon_abcdgamma^abcd ]
              SetDefinition$gamma^2$ is defined to be the matrix given by:[gamma^2=frac124epsilon_abcdgamma^abcd ]
              SetDefinition$gamma^3$ is defined to be the matrix given by:[gamma^3=frac124epsilon_abcdgamma^abcd ]
              SetDefinition$gamma^4$ is defined to be the matrix given by:[gamma^4=frac124epsilon_abcdgamma^abcd ]
              SetDefinition$gamma^5$ is defined to be the matrix given above.\ % a short Definition
              enddocument


              Definition






              share|improve this answer






























                2















                2











                2









                I offer a solution based on the xcoffin package, not to compete with the other excellent solutions proposed, but to show the advantages of a great package.



                Many questions posted in this forum relates with the positioning of various elements as graphics, tables, text, etc. on a page, in specific places and in relation with one another.
                In many cases against TeX wishes.



                Over time I was able to replace geometry, rotate, titlepage, and similar packages with xcoffin, to design book covers, title-pages, posters, chapter styles, etc. thus avoiding conflicts and specially avoiding the dreadful time checking a full upgrade to discover that old projects not longer produce the same output or simply did not run at all.



                To me the lesser number of packages, the better.



                xcoffin provides only a handful of commands with intuitive meaning (at least for me) and does not require remembering dozens of keyvals or options. Excellent manual, by the way.



                I also appreciate the fact that in the case of the one-time jobs mentioned earlier, the resulting code is very simple since there not need to contemplate multiple alternatives for the input and it is mostly auto-documented. Even if a book title changes over the course of a project, the corrections are straightforward.



                Of course previously you need to produce the material, perhaps using amsmath, xcolor, tabularx, graphicx, ... and then fill the coffin with it.



                Afterward you fit the coffins in the page using as origin the current text insertion point, or in relative positions among themselves, as could be the case of an image and a margin explanatory note. Then you typeset the result at the insertion point or in any other place of the page of your liking (a plus) since the resulting coffin it is not a float.



                In this particular case only four coffins are required: the Output which will collect the others, a green rectangle, a side rule, and the inside text, as shown in the code. Both the rectangle and the rule adapts theirs height to the text content.



                I also include a macro, to be moved to the preamble, to reduce the clutter of the document. For the fun of it, and supposing that several Definitions will be included in the document, I added a counter and applied the macro five times.



                documentclassarticle

                usepackagexcolor
                usepackageamsmath
                usepackagexcoffins,calc

                begindocument

                %% Create and Set Coffins

                NewCoffinOutput %Coffin to hold the others
                NewCoffinDefinition % Definition definition ...
                NewCoffinBackFrame % Background: green rectangle
                NewCoffinSideRule %lateral left border

                SetHorizontalCoffinOutput % It will provide the reference point to join the others

                SetVerticalCoffinDefinitionlinewidth%
                textbfDefinition. $gamma^5$ is defined to be the matrix given by:%
                [gamma^5=frac124epsilon_abcdgamma^abcd ]%


                %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
                SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip

                SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

                %% Assembly Coffins
                JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
                JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
                JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output

                %% now your document

                We need some more meaningless test to for a multiline paragraph, because these form a basis for the space of all complex $4times4$ matrices.

                %% Typeset Definition
                noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
                vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

                We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

                %%%%%%%%%%%%%%%%% macro def, to be moved to the preamble, use as SetDefinitionyour-text
                newcounterdefcounter

                newcommandSetDefinition[1]%
                SetHorizontalCoffinOutput % It will be the reference point join the others
                SetVerticalCoffinDefinitionlinewidthtextbfDefinition stepcounterdefcounterRomandefcounter. #1 %added counter

                %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
                SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip
                SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

                %% Assembly Coffins
                JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
                JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
                JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output
                %% Typeset ooutput
                noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
                vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

                %%%%%%%%%%%%%%%%%%%%% end macro

                SetDefinition$gamma^1$ is defined to be the matrix given by:[gamma^1=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^2$ is defined to be the matrix given by:[gamma^2=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^3$ is defined to be the matrix given by:[gamma^3=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^4$ is defined to be the matrix given by:[gamma^4=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^5$ is defined to be the matrix given above.\ % a short Definition
                enddocument


                Definition






                share|improve this answer
















                I offer a solution based on the xcoffin package, not to compete with the other excellent solutions proposed, but to show the advantages of a great package.



                Many questions posted in this forum relates with the positioning of various elements as graphics, tables, text, etc. on a page, in specific places and in relation with one another.
                In many cases against TeX wishes.



                Over time I was able to replace geometry, rotate, titlepage, and similar packages with xcoffin, to design book covers, title-pages, posters, chapter styles, etc. thus avoiding conflicts and specially avoiding the dreadful time checking a full upgrade to discover that old projects not longer produce the same output or simply did not run at all.



                To me the lesser number of packages, the better.



                xcoffin provides only a handful of commands with intuitive meaning (at least for me) and does not require remembering dozens of keyvals or options. Excellent manual, by the way.



                I also appreciate the fact that in the case of the one-time jobs mentioned earlier, the resulting code is very simple since there not need to contemplate multiple alternatives for the input and it is mostly auto-documented. Even if a book title changes over the course of a project, the corrections are straightforward.



                Of course previously you need to produce the material, perhaps using amsmath, xcolor, tabularx, graphicx, ... and then fill the coffin with it.



                Afterward you fit the coffins in the page using as origin the current text insertion point, or in relative positions among themselves, as could be the case of an image and a margin explanatory note. Then you typeset the result at the insertion point or in any other place of the page of your liking (a plus) since the resulting coffin it is not a float.



                In this particular case only four coffins are required: the Output which will collect the others, a green rectangle, a side rule, and the inside text, as shown in the code. Both the rectangle and the rule adapts theirs height to the text content.



                I also include a macro, to be moved to the preamble, to reduce the clutter of the document. For the fun of it, and supposing that several Definitions will be included in the document, I added a counter and applied the macro five times.



                documentclassarticle

                usepackagexcolor
                usepackageamsmath
                usepackagexcoffins,calc

                begindocument

                %% Create and Set Coffins

                NewCoffinOutput %Coffin to hold the others
                NewCoffinDefinition % Definition definition ...
                NewCoffinBackFrame % Background: green rectangle
                NewCoffinSideRule %lateral left border

                SetHorizontalCoffinOutput % It will provide the reference point to join the others

                SetVerticalCoffinDefinitionlinewidth%
                textbfDefinition. $gamma^5$ is defined to be the matrix given by:%
                [gamma^5=frac124epsilon_abcdgamma^abcd ]%


                %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
                SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip

                SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

                %% Assembly Coffins
                JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
                JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
                JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output

                %% now your document

                We need some more meaningless test to for a multiline paragraph, because these form a basis for the space of all complex $4times4$ matrices.

                %% Typeset Definition
                noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
                vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

                We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

                %%%%%%%%%%%%%%%%% macro def, to be moved to the preamble, use as SetDefinitionyour-text
                newcounterdefcounter

                newcommandSetDefinition[1]%
                SetHorizontalCoffinOutput % It will be the reference point join the others
                SetVerticalCoffinDefinitionlinewidthtextbfDefinition stepcounterdefcounterRomandefcounter. #1 %added counter

                %% Make both BackFrame & SideRule heights = height of Definition + 1*baselineskip
                SetHorizontalCoffinBackFramecolorgreen!30!gray!15rulelinewidthCoffinTotalHeightDefinition + baselineskip
                SetHorizontalCoffinSideRulecolorgreen!50!blackrule3ptCoffinTotalHeightDefinition +baselineskip %vertical side rule

                %% Assembly Coffins
                JoinCoffins*Output[l,t]BackFrame[l,t] %attach left-top corner of BackFrame to idem of Output
                JoinCoffins*Output[l,t]SideRule[l,t] %attach left-top corner of SideRule to idem of Output
                JoinCoffins*Output[l,t]Definition[l,t](0pt,-baselineskip) %attack left-top corner of Definition to idem of Output
                %% Typeset ooutput
                noindentTypesetCoffinOutput % at the text insertion point. It is not a float.
                vspace*CoffinTotalHeightDefinitionbigskip %make some room for Output

                %%%%%%%%%%%%%%%%%%%%% end macro

                SetDefinition$gamma^1$ is defined to be the matrix given by:[gamma^1=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^2$ is defined to be the matrix given by:[gamma^2=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^3$ is defined to be the matrix given by:[gamma^3=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^4$ is defined to be the matrix given by:[gamma^4=frac124epsilon_abcdgamma^abcd ]
                SetDefinition$gamma^5$ is defined to be the matrix given above.\ % a short Definition
                enddocument


                Definition







                share|improve this answer















                share|improve this answer




                share|improve this answer








                edited Nov 6 at 19:41

























                answered Nov 6 at 17:57









                Simon DispaSimon Dispa

                1928 bronze badges




                1928 bronze badges


























                    8



















                    The following might give you an idea on how to start:



                    enter image description here



                    documentclassarticle
                    usepackage[most]tcolorbox

                    newtcolorboxmybox
                    enhanced,
                    boxrule=0pt,frame hidden,
                    borderline west=4pt0ptgreen!75!black,
                    colback=green!10!white,
                    sharp corners


                    begindocument


                    beginmybox
                    textbfDefinition My definition text here
                    endmybox

                    enddocument





                    share|improve this answer






























                      8



















                      The following might give you an idea on how to start:



                      enter image description here



                      documentclassarticle
                      usepackage[most]tcolorbox

                      newtcolorboxmybox
                      enhanced,
                      boxrule=0pt,frame hidden,
                      borderline west=4pt0ptgreen!75!black,
                      colback=green!10!white,
                      sharp corners


                      begindocument


                      beginmybox
                      textbfDefinition My definition text here
                      endmybox

                      enddocument





                      share|improve this answer




























                        8















                        8











                        8









                        The following might give you an idea on how to start:



                        enter image description here



                        documentclassarticle
                        usepackage[most]tcolorbox

                        newtcolorboxmybox
                        enhanced,
                        boxrule=0pt,frame hidden,
                        borderline west=4pt0ptgreen!75!black,
                        colback=green!10!white,
                        sharp corners


                        begindocument


                        beginmybox
                        textbfDefinition My definition text here
                        endmybox

                        enddocument





                        share|improve this answer














                        The following might give you an idea on how to start:



                        enter image description here



                        documentclassarticle
                        usepackage[most]tcolorbox

                        newtcolorboxmybox
                        enhanced,
                        boxrule=0pt,frame hidden,
                        borderline west=4pt0ptgreen!75!black,
                        colback=green!10!white,
                        sharp corners


                        begindocument


                        beginmybox
                        textbfDefinition My definition text here
                        endmybox

                        enddocument






                        share|improve this answer













                        share|improve this answer




                        share|improve this answer










                        answered Oct 16 at 18:20









                        leandriisleandriis

                        23.7k1 gold badge12 silver badges41 bronze badges




                        23.7k1 gold badge12 silver badges41 bronze badges
























                            6



















                            A very light weight solution is to use a tabular. Not as sexy as tcolorbox and other TikZ based solution, but it compiles fast. The simplest is to use a p-column as wide as the linewidth.



                            1. First I define a new column type N and calculate its width to linewidth minus two tabcolsep. Then the table fits between the margins and will adapt if you change margins.


                            2. Since we need some space above an below the "box", I have set the table inside a center-environment to ensure that the table is fixed between the margins, and vertical space on par with other environments.


                            3. Thereafter, I define the width and colour of the left vertical bar. I put the redefinition inside the centring environment, which limits the scope of the redefinitions to this taular. Without, all table rules will be green and 3 pt thick!


                            I have since yesterday slightly optimised the code. It is possible to define a new environment, and move most of the code to such definition. This may be useful if you have lot of boxes.



                            enter image description here



                            documentclassarticle
                            usepackageamsmath
                            usepackage[table]xcolor
                            usepackagearray

                            newcolumntypeN@

                            begindocument

                            We need som more meaningless test to for a multiline paragraph, because these form a basis for the space of all compex $4times4$ matrices.

                            begincenter
                            setlengthextrarowheight4pt
                            setlengtharrayrulewidth3pt
                            arrayrulecolorgreen!50!black
                            begintabularN
                            cellcolorgreen!15
                            textbfDefinition: $lambda^5$ is defined to be the matrix given by:
                            medskip
                            [lambda^5=dfrac114 epsilon_abcdgamma^abcd ]

                            endtabular
                            endcenter

                            We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

                            enddocument





                            share|improve this answer
































                              6



















                              A very light weight solution is to use a tabular. Not as sexy as tcolorbox and other TikZ based solution, but it compiles fast. The simplest is to use a p-column as wide as the linewidth.



                              1. First I define a new column type N and calculate its width to linewidth minus two tabcolsep. Then the table fits between the margins and will adapt if you change margins.


                              2. Since we need some space above an below the "box", I have set the table inside a center-environment to ensure that the table is fixed between the margins, and vertical space on par with other environments.


                              3. Thereafter, I define the width and colour of the left vertical bar. I put the redefinition inside the centring environment, which limits the scope of the redefinitions to this taular. Without, all table rules will be green and 3 pt thick!


                              I have since yesterday slightly optimised the code. It is possible to define a new environment, and move most of the code to such definition. This may be useful if you have lot of boxes.



                              enter image description here



                              documentclassarticle
                              usepackageamsmath
                              usepackage[table]xcolor
                              usepackagearray

                              newcolumntypeN@

                              begindocument

                              We need som more meaningless test to for a multiline paragraph, because these form a basis for the space of all compex $4times4$ matrices.

                              begincenter
                              setlengthextrarowheight4pt
                              setlengtharrayrulewidth3pt
                              arrayrulecolorgreen!50!black
                              begintabularN
                              cellcolorgreen!15
                              textbfDefinition: $lambda^5$ is defined to be the matrix given by:
                              medskip
                              [lambda^5=dfrac114 epsilon_abcdgamma^abcd ]

                              endtabular
                              endcenter

                              We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

                              enddocument





                              share|improve this answer






























                                6















                                6











                                6









                                A very light weight solution is to use a tabular. Not as sexy as tcolorbox and other TikZ based solution, but it compiles fast. The simplest is to use a p-column as wide as the linewidth.



                                1. First I define a new column type N and calculate its width to linewidth minus two tabcolsep. Then the table fits between the margins and will adapt if you change margins.


                                2. Since we need some space above an below the "box", I have set the table inside a center-environment to ensure that the table is fixed between the margins, and vertical space on par with other environments.


                                3. Thereafter, I define the width and colour of the left vertical bar. I put the redefinition inside the centring environment, which limits the scope of the redefinitions to this taular. Without, all table rules will be green and 3 pt thick!


                                I have since yesterday slightly optimised the code. It is possible to define a new environment, and move most of the code to such definition. This may be useful if you have lot of boxes.



                                enter image description here



                                documentclassarticle
                                usepackageamsmath
                                usepackage[table]xcolor
                                usepackagearray

                                newcolumntypeN@

                                begindocument

                                We need som more meaningless test to for a multiline paragraph, because these form a basis for the space of all compex $4times4$ matrices.

                                begincenter
                                setlengthextrarowheight4pt
                                setlengtharrayrulewidth3pt
                                arrayrulecolorgreen!50!black
                                begintabularN
                                cellcolorgreen!15
                                textbfDefinition: $lambda^5$ is defined to be the matrix given by:
                                medskip
                                [lambda^5=dfrac114 epsilon_abcdgamma^abcd ]

                                endtabular
                                endcenter

                                We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

                                enddocument





                                share|improve this answer
















                                A very light weight solution is to use a tabular. Not as sexy as tcolorbox and other TikZ based solution, but it compiles fast. The simplest is to use a p-column as wide as the linewidth.



                                1. First I define a new column type N and calculate its width to linewidth minus two tabcolsep. Then the table fits between the margins and will adapt if you change margins.


                                2. Since we need some space above an below the "box", I have set the table inside a center-environment to ensure that the table is fixed between the margins, and vertical space on par with other environments.


                                3. Thereafter, I define the width and colour of the left vertical bar. I put the redefinition inside the centring environment, which limits the scope of the redefinitions to this taular. Without, all table rules will be green and 3 pt thick!


                                I have since yesterday slightly optimised the code. It is possible to define a new environment, and move most of the code to such definition. This may be useful if you have lot of boxes.



                                enter image description here



                                documentclassarticle
                                usepackageamsmath
                                usepackage[table]xcolor
                                usepackagearray

                                newcolumntypeN@

                                begindocument

                                We need som more meaningless test to for a multiline paragraph, because these form a basis for the space of all compex $4times4$ matrices.

                                begincenter
                                setlengthextrarowheight4pt
                                setlengtharrayrulewidth3pt
                                arrayrulecolorgreen!50!black
                                begintabularN
                                cellcolorgreen!15
                                textbfDefinition: $lambda^5$ is defined to be the matrix given by:
                                medskip
                                [lambda^5=dfrac114 epsilon_abcdgamma^abcd ]

                                endtabular
                                endcenter

                                We can invert this to obtain $ epsilon_abcdigamma^abcd lambda^5$, but we need som more meaningless test to for a multiline paragraph.

                                enddocument






                                share|improve this answer















                                share|improve this answer




                                share|improve this answer








                                edited Oct 17 at 11:03

























                                answered Oct 16 at 18:15









                                SveinungSveinung

                                16k2 gold badges40 silver badges65 bronze badges




                                16k2 gold badges40 silver badges65 bronze badges
























                                    6



















                                    I have used mdframed instead of tcolorbox (they are similar package but tcolorbox is mor complete than mdframed). You can see that you have the same result. Here there is my proposal where I have used for theorem, definition, examples, the specific package amsthm with the possibility to create a book: see the specific class of the document documentclass[12pt]book. For to increase the tickness vertical green line you can to change the value linewidth=2.5pt.
                                    This example sets the text in italic:



                                    documentclass[12pt]book
                                    usepackageamsthm
                                    usepackageamsmath,amssymb
                                    usepackage[svgnames]xcolor
                                    RequirePackage[framemethod=default]mdframed
                                    newmdenv[skipabove=7pt,
                                    skipbelow=7pt,
                                    rightline=false,
                                    leftline=true,
                                    topline=false,
                                    bottomline=false,
                                    linecolor=Green,
                                    backgroundcolor=Green!10,
                                    innerleftmargin=5pt,
                                    innerrightmargin=5pt,
                                    innertopmargin=2pt,
                                    leftmargin=0cm,
                                    rightmargin=0cm,
                                    linewidth=2.5pt,
                                    innerbottommargin=5pt]dBox
                                    newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                    newtheoremdefinitionTDefinition[section]

                                    begindocument
                                    begindefinition
                                    $gamma^5$ is defined to be a matrix given by:
                                    [gamma^5=frac124epsilon_abcdgamma^abcd]
                                    enddefinition
                                    enddocument


                                    enter image description here



                                    Another code sets the text in roman adding theoremstyledefinition. See this MWE:



                                    enter image description here



                                    documentclass[12pt]book
                                    usepackageamsthm
                                    usepackageamsmath,amssymb
                                    usepackage[svgnames]xcolor
                                    RequirePackage[framemethod=default]mdframed
                                    newmdenv[skipabove=7pt,
                                    skipbelow=7pt,
                                    rightline=false,
                                    leftline=true,
                                    topline=false,
                                    bottomline=false,
                                    linecolor=Green,
                                    backgroundcolor=Green!10,
                                    innerleftmargin=5pt,
                                    innerrightmargin=5pt,
                                    innertopmargin=2pt,
                                    leftmargin=0cm,
                                    rightmargin=0cm,
                                    linewidth=2.5pt,
                                    innerbottommargin=5pt]dBox
                                    theoremstyledefinition
                                    newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                    newtheoremdefinitionTDefinition[section]

                                    begindocument
                                    begindefinition
                                    $gamma^5$ is defined to be a matrix given by:
                                    [gamma^5=frac124epsilon_abcdgamma^abcd]
                                    enddefinition
                                    enddocument





                                    share|improve this answer
































                                      6



















                                      I have used mdframed instead of tcolorbox (they are similar package but tcolorbox is mor complete than mdframed). You can see that you have the same result. Here there is my proposal where I have used for theorem, definition, examples, the specific package amsthm with the possibility to create a book: see the specific class of the document documentclass[12pt]book. For to increase the tickness vertical green line you can to change the value linewidth=2.5pt.
                                      This example sets the text in italic:



                                      documentclass[12pt]book
                                      usepackageamsthm
                                      usepackageamsmath,amssymb
                                      usepackage[svgnames]xcolor
                                      RequirePackage[framemethod=default]mdframed
                                      newmdenv[skipabove=7pt,
                                      skipbelow=7pt,
                                      rightline=false,
                                      leftline=true,
                                      topline=false,
                                      bottomline=false,
                                      linecolor=Green,
                                      backgroundcolor=Green!10,
                                      innerleftmargin=5pt,
                                      innerrightmargin=5pt,
                                      innertopmargin=2pt,
                                      leftmargin=0cm,
                                      rightmargin=0cm,
                                      linewidth=2.5pt,
                                      innerbottommargin=5pt]dBox
                                      newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                      newtheoremdefinitionTDefinition[section]

                                      begindocument
                                      begindefinition
                                      $gamma^5$ is defined to be a matrix given by:
                                      [gamma^5=frac124epsilon_abcdgamma^abcd]
                                      enddefinition
                                      enddocument


                                      enter image description here



                                      Another code sets the text in roman adding theoremstyledefinition. See this MWE:



                                      enter image description here



                                      documentclass[12pt]book
                                      usepackageamsthm
                                      usepackageamsmath,amssymb
                                      usepackage[svgnames]xcolor
                                      RequirePackage[framemethod=default]mdframed
                                      newmdenv[skipabove=7pt,
                                      skipbelow=7pt,
                                      rightline=false,
                                      leftline=true,
                                      topline=false,
                                      bottomline=false,
                                      linecolor=Green,
                                      backgroundcolor=Green!10,
                                      innerleftmargin=5pt,
                                      innerrightmargin=5pt,
                                      innertopmargin=2pt,
                                      leftmargin=0cm,
                                      rightmargin=0cm,
                                      linewidth=2.5pt,
                                      innerbottommargin=5pt]dBox
                                      theoremstyledefinition
                                      newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                      newtheoremdefinitionTDefinition[section]

                                      begindocument
                                      begindefinition
                                      $gamma^5$ is defined to be a matrix given by:
                                      [gamma^5=frac124epsilon_abcdgamma^abcd]
                                      enddefinition
                                      enddocument





                                      share|improve this answer






























                                        6















                                        6











                                        6









                                        I have used mdframed instead of tcolorbox (they are similar package but tcolorbox is mor complete than mdframed). You can see that you have the same result. Here there is my proposal where I have used for theorem, definition, examples, the specific package amsthm with the possibility to create a book: see the specific class of the document documentclass[12pt]book. For to increase the tickness vertical green line you can to change the value linewidth=2.5pt.
                                        This example sets the text in italic:



                                        documentclass[12pt]book
                                        usepackageamsthm
                                        usepackageamsmath,amssymb
                                        usepackage[svgnames]xcolor
                                        RequirePackage[framemethod=default]mdframed
                                        newmdenv[skipabove=7pt,
                                        skipbelow=7pt,
                                        rightline=false,
                                        leftline=true,
                                        topline=false,
                                        bottomline=false,
                                        linecolor=Green,
                                        backgroundcolor=Green!10,
                                        innerleftmargin=5pt,
                                        innerrightmargin=5pt,
                                        innertopmargin=2pt,
                                        leftmargin=0cm,
                                        rightmargin=0cm,
                                        linewidth=2.5pt,
                                        innerbottommargin=5pt]dBox
                                        newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                        newtheoremdefinitionTDefinition[section]

                                        begindocument
                                        begindefinition
                                        $gamma^5$ is defined to be a matrix given by:
                                        [gamma^5=frac124epsilon_abcdgamma^abcd]
                                        enddefinition
                                        enddocument


                                        enter image description here



                                        Another code sets the text in roman adding theoremstyledefinition. See this MWE:



                                        enter image description here



                                        documentclass[12pt]book
                                        usepackageamsthm
                                        usepackageamsmath,amssymb
                                        usepackage[svgnames]xcolor
                                        RequirePackage[framemethod=default]mdframed
                                        newmdenv[skipabove=7pt,
                                        skipbelow=7pt,
                                        rightline=false,
                                        leftline=true,
                                        topline=false,
                                        bottomline=false,
                                        linecolor=Green,
                                        backgroundcolor=Green!10,
                                        innerleftmargin=5pt,
                                        innerrightmargin=5pt,
                                        innertopmargin=2pt,
                                        leftmargin=0cm,
                                        rightmargin=0cm,
                                        linewidth=2.5pt,
                                        innerbottommargin=5pt]dBox
                                        theoremstyledefinition
                                        newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                        newtheoremdefinitionTDefinition[section]

                                        begindocument
                                        begindefinition
                                        $gamma^5$ is defined to be a matrix given by:
                                        [gamma^5=frac124epsilon_abcdgamma^abcd]
                                        enddefinition
                                        enddocument





                                        share|improve this answer
















                                        I have used mdframed instead of tcolorbox (they are similar package but tcolorbox is mor complete than mdframed). You can see that you have the same result. Here there is my proposal where I have used for theorem, definition, examples, the specific package amsthm with the possibility to create a book: see the specific class of the document documentclass[12pt]book. For to increase the tickness vertical green line you can to change the value linewidth=2.5pt.
                                        This example sets the text in italic:



                                        documentclass[12pt]book
                                        usepackageamsthm
                                        usepackageamsmath,amssymb
                                        usepackage[svgnames]xcolor
                                        RequirePackage[framemethod=default]mdframed
                                        newmdenv[skipabove=7pt,
                                        skipbelow=7pt,
                                        rightline=false,
                                        leftline=true,
                                        topline=false,
                                        bottomline=false,
                                        linecolor=Green,
                                        backgroundcolor=Green!10,
                                        innerleftmargin=5pt,
                                        innerrightmargin=5pt,
                                        innertopmargin=2pt,
                                        leftmargin=0cm,
                                        rightmargin=0cm,
                                        linewidth=2.5pt,
                                        innerbottommargin=5pt]dBox
                                        newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                        newtheoremdefinitionTDefinition[section]

                                        begindocument
                                        begindefinition
                                        $gamma^5$ is defined to be a matrix given by:
                                        [gamma^5=frac124epsilon_abcdgamma^abcd]
                                        enddefinition
                                        enddocument


                                        enter image description here



                                        Another code sets the text in roman adding theoremstyledefinition. See this MWE:



                                        enter image description here



                                        documentclass[12pt]book
                                        usepackageamsthm
                                        usepackageamsmath,amssymb
                                        usepackage[svgnames]xcolor
                                        RequirePackage[framemethod=default]mdframed
                                        newmdenv[skipabove=7pt,
                                        skipbelow=7pt,
                                        rightline=false,
                                        leftline=true,
                                        topline=false,
                                        bottomline=false,
                                        linecolor=Green,
                                        backgroundcolor=Green!10,
                                        innerleftmargin=5pt,
                                        innerrightmargin=5pt,
                                        innertopmargin=2pt,
                                        leftmargin=0cm,
                                        rightmargin=0cm,
                                        linewidth=2.5pt,
                                        innerbottommargin=5pt]dBox
                                        theoremstyledefinition
                                        newenvironmentdefinitionbegindBoxbegindefinitionTenddefinitionTenddBox
                                        newtheoremdefinitionTDefinition[section]

                                        begindocument
                                        begindefinition
                                        $gamma^5$ is defined to be a matrix given by:
                                        [gamma^5=frac124epsilon_abcdgamma^abcd]
                                        enddefinition
                                        enddocument






                                        share|improve this answer















                                        share|improve this answer




                                        share|improve this answer








                                        edited Nov 6 at 20:36

























                                        answered Oct 16 at 19:45









                                        SebastianoSebastiano

                                        20.4k5 gold badges30 silver badges87 bronze badges




                                        20.4k5 gold badges30 silver badges87 bronze badges
























                                            5



















                                            In case that you do not use tcolorbox or tikz for anything else, is a bit overkill use it for a simple box. What I see is AMS theorem-like environment with the definition style in a green box with a vertical rule beside, so I made defined the definition command that make just that. Note that macros cannot have paragraph breaks, so, if you need will that, define a new environment instead of a macro.



                                            The advantage of use the amsthm package just to write "definition" in bold is that you can just remove the asterisk of line 7 to have numbered definitions that you can reference by the usual label-- ref method.




                                            mwe




                                            documentclassarticle
                                            usepackagexcolor
                                            usepackageamsthm
                                            usepackagelipsum

                                            theoremstyledefinition
                                            newtheorem*defiDefinition
                                            defdefinition#1parmedskipnoindentcolorgreen!50!blackvrule width 3pt%
                                            colorboxgreen!30!gray!15parbox[c]dimexprlinewidth-3pt-2fboxsep-2fboxrule
                                            begindefi#1enddefiparmedskip

                                            begindocument

                                            lipsum[1][1-4]

                                            definition$gamma^5$ is defined to be the matrix given by:
                                            [gamma^5=frac124epsilon_abcdgamma^abcd ]

                                            lipsum[2][1-5]

                                            enddocument





                                            share|improve this answer
































                                              5



















                                              In case that you do not use tcolorbox or tikz for anything else, is a bit overkill use it for a simple box. What I see is AMS theorem-like environment with the definition style in a green box with a vertical rule beside, so I made defined the definition command that make just that. Note that macros cannot have paragraph breaks, so, if you need will that, define a new environment instead of a macro.



                                              The advantage of use the amsthm package just to write "definition" in bold is that you can just remove the asterisk of line 7 to have numbered definitions that you can reference by the usual label-- ref method.




                                              mwe




                                              documentclassarticle
                                              usepackagexcolor
                                              usepackageamsthm
                                              usepackagelipsum

                                              theoremstyledefinition
                                              newtheorem*defiDefinition
                                              defdefinition#1parmedskipnoindentcolorgreen!50!blackvrule width 3pt%
                                              colorboxgreen!30!gray!15parbox[c]dimexprlinewidth-3pt-2fboxsep-2fboxrule
                                              begindefi#1enddefiparmedskip

                                              begindocument

                                              lipsum[1][1-4]

                                              definition$gamma^5$ is defined to be the matrix given by:
                                              [gamma^5=frac124epsilon_abcdgamma^abcd ]

                                              lipsum[2][1-5]

                                              enddocument





                                              share|improve this answer






























                                                5















                                                5











                                                5









                                                In case that you do not use tcolorbox or tikz for anything else, is a bit overkill use it for a simple box. What I see is AMS theorem-like environment with the definition style in a green box with a vertical rule beside, so I made defined the definition command that make just that. Note that macros cannot have paragraph breaks, so, if you need will that, define a new environment instead of a macro.



                                                The advantage of use the amsthm package just to write "definition" in bold is that you can just remove the asterisk of line 7 to have numbered definitions that you can reference by the usual label-- ref method.




                                                mwe




                                                documentclassarticle
                                                usepackagexcolor
                                                usepackageamsthm
                                                usepackagelipsum

                                                theoremstyledefinition
                                                newtheorem*defiDefinition
                                                defdefinition#1parmedskipnoindentcolorgreen!50!blackvrule width 3pt%
                                                colorboxgreen!30!gray!15parbox[c]dimexprlinewidth-3pt-2fboxsep-2fboxrule
                                                begindefi#1enddefiparmedskip

                                                begindocument

                                                lipsum[1][1-4]

                                                definition$gamma^5$ is defined to be the matrix given by:
                                                [gamma^5=frac124epsilon_abcdgamma^abcd ]

                                                lipsum[2][1-5]

                                                enddocument





                                                share|improve this answer
















                                                In case that you do not use tcolorbox or tikz for anything else, is a bit overkill use it for a simple box. What I see is AMS theorem-like environment with the definition style in a green box with a vertical rule beside, so I made defined the definition command that make just that. Note that macros cannot have paragraph breaks, so, if you need will that, define a new environment instead of a macro.



                                                The advantage of use the amsthm package just to write "definition" in bold is that you can just remove the asterisk of line 7 to have numbered definitions that you can reference by the usual label-- ref method.




                                                mwe




                                                documentclassarticle
                                                usepackagexcolor
                                                usepackageamsthm
                                                usepackagelipsum

                                                theoremstyledefinition
                                                newtheorem*defiDefinition
                                                defdefinition#1parmedskipnoindentcolorgreen!50!blackvrule width 3pt%
                                                colorboxgreen!30!gray!15parbox[c]dimexprlinewidth-3pt-2fboxsep-2fboxrule
                                                begindefi#1enddefiparmedskip

                                                begindocument

                                                lipsum[1][1-4]

                                                definition$gamma^5$ is defined to be the matrix given by:
                                                [gamma^5=frac124epsilon_abcdgamma^abcd ]

                                                lipsum[2][1-5]

                                                enddocument






                                                share|improve this answer















                                                share|improve this answer




                                                share|improve this answer








                                                edited Oct 16 at 20:20

























                                                answered Oct 16 at 20:03









                                                FranFran

                                                58.7k6 gold badges126 silver badges195 bronze badges




                                                58.7k6 gold badges126 silver badges195 bronze badges































                                                    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%2f512501%2fcreate-a-box-using-the-tcolorbox-package-or-any-other-image%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

                                                    Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                                                    Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                                                    Tom Holland Mục lục Đầu đời và giáo dục | Sự nghiệp | Cuộc sống cá nhân | Phim tham gia | Giải thưởng và đề cử | Chú thích | Liên kết ngoài | Trình đơn chuyển hướngProfile“Person Details for Thomas Stanley Holland, "England and Wales Birth Registration Index, 1837-2008" — FamilySearch.org”"Meet Tom Holland... the 16-year-old star of The Impossible""Schoolboy actor Tom Holland finds himself in Oscar contention for role in tsunami drama"“Naomi Watts on the Prince William and Harry's reaction to her film about the late Princess Diana”lưu trữ"Holland and Pflueger Are West End's Two New 'Billy Elliots'""I'm so envious of my son, the movie star! British writer Dominic Holland's spent 20 years trying to crack Hollywood - but he's been beaten to it by a very unlikely rival"“Richard and Margaret Povey of Jersey, Channel Islands, UK: Information about Thomas Stanley Holland”"Tom Holland to play Billy Elliot""New Billy Elliot leaving the garage"Billy Elliot the Musical - Tom Holland - Billy"A Tale of four Billys: Tom Holland""The Feel Good Factor""Thames Christian College schoolboys join Myleene Klass for The Feelgood Factor""Government launches £600,000 arts bursaries pilot""BILLY's Chapman, Holland, Gardner & Jackson-Keen Visit Prime Minister""Elton John 'blown away' by Billy Elliot fifth birthday" (video with John's interview and fragments of Holland's performance)"First News interviews Arrietty's Tom Holland"“33rd Critics' Circle Film Awards winners”“National Board of Review Current Awards”Bản gốc"Ron Howard Whaling Tale 'In The Heart Of The Sea' Casts Tom Holland"“'Spider-Man' Finds Tom Holland to Star as New Web-Slinger”lưu trữ“Captain America: Civil War (2016)”“Film Review: ‘Captain America: Civil War’”lưu trữ“‘Captain America: Civil War’ review: Choose your own avenger”lưu trữ“The Lost City of Z reviews”“Sony Pictures and Marvel Studios Find Their 'Spider-Man' Star and Director”“‘Mary Magdalene’, ‘Current War’ & ‘Wind River’ Get 2017 Release Dates From Weinstein”“Lionsgate Unleashing Daisy Ridley & Tom Holland Starrer ‘Chaos Walking’ In Cannes”“PTA's 'Master' Leads Chicago Film Critics Nominations, UPDATED: Houston and Indiana Critics Nominations”“Nominaciones Goya 2013 Telecinco Cinema – ENG”“Jameson Empire Film Awards: Martin Freeman wins best actor for performance in The Hobbit”“34th Annual Young Artist Awards”Bản gốc“Teen Choice Awards 2016—Captain America: Civil War Leads Second Wave of Nominations”“BAFTA Film Award Nominations: ‘La La Land’ Leads Race”“Saturn Awards Nominations 2017: 'Rogue One,' 'Walking Dead' Lead”Tom HollandTom HollandTom HollandTom Hollandmedia.gettyimages.comWorldCat Identities300279794no20130442900000 0004 0355 42791085670554170004732cb16706349t(data)XX5557367