How to enclose theorems and definition in rectangles?Vertical space around theoremsTheorems and Definitions as quotesHow to replace all pictures by white rectangles?How to remove line breaks before and after theorems?Horizontal spaces to the left and right of theoremsExtra spacing around restatable theoremsKOMA script and amsthm: Space lost before and after theoremsShrinking spacing around definition environmentTheorems and parskipremove spacing from a definition

How to format long polynomial?

To string or not to string

tikz: show 0 at the axis origin

How is it possible to have an ability score that is less than 3?

Fencing style for blades that can attack from a distance

Smoothness of finite-dimensional functional calculus

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

can i play a electric guitar through a bass amp?

Test whether all array elements are factors of a number

Is this a crack on the carbon frame?

What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)

Adding span tags within wp_list_pages list items

The use of multiple foreign keys on same column in SQL Server

Is it legal for company to use my work email to pretend I still work there?

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

How to write a macro that is braces sensitive?

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

Can I ask the recruiters in my resume to put the reason why I am rejected?

Why was the small council so happy for Tyrion to become the Master of Coin?

Windows 98 hangs after entering password on fresh install

An academic/student plagiarism

Problem of parity - Can we draw a closed path made up of 20 line segments...

Is it tax fraud for an individual to declare non-taxable revenue as taxable income? (US tax laws)



How to enclose theorems and definition in rectangles?


Vertical space around theoremsTheorems and Definitions as quotesHow to replace all pictures by white rectangles?How to remove line breaks before and after theorems?Horizontal spaces to the left and right of theoremsExtra spacing around restatable theoremsKOMA script and amsthm: Space lost before and after theoremsShrinking spacing around definition environmentTheorems and parskipremove spacing from a definition













1















The following code



documentclassarticle


usepackageamsthm
usepackageamsmath
usepackagemathtools

usepackage[left=1.5in, right=1.5in, top=0.5in]geometry



newtheoremdefinitionDefinition
newtheoremtheoremTheorem


begindocument
titleExtra Credit
maketitle

begindefinition
If f is analytic at $z_0$, then the series

beginequation
f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
endequation

is called the Taylor series for f around $z_0$.
enddefinition

begintheorem
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
beginequation
f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
endequation
endtheorem

begintheorem
(Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
beginequation
f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
endequation
endtheorem
noindent hrulefill

begintheorem
If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
endtheorem


produces the following image
enter image description here



How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?










share|improve this question







New contributor




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




















  • Do you want all theorems/definition to be enclosed in a frame, or only some?

    – Bernard
    Apr 2 at 21:55












  • I would like all theorems/definitions to be enclosed in a frame except for Theorem 3

    – K.M
    Apr 2 at 21:57











  • In this case you should take a look at the newframedtheorem command in ntheorem.

    – Bernard
    Apr 2 at 22:06















1















The following code



documentclassarticle


usepackageamsthm
usepackageamsmath
usepackagemathtools

usepackage[left=1.5in, right=1.5in, top=0.5in]geometry



newtheoremdefinitionDefinition
newtheoremtheoremTheorem


begindocument
titleExtra Credit
maketitle

begindefinition
If f is analytic at $z_0$, then the series

beginequation
f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
endequation

is called the Taylor series for f around $z_0$.
enddefinition

begintheorem
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
beginequation
f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
endequation
endtheorem

begintheorem
(Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
beginequation
f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
endequation
endtheorem
noindent hrulefill

begintheorem
If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
endtheorem


produces the following image
enter image description here



How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?










share|improve this question







New contributor




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




















  • Do you want all theorems/definition to be enclosed in a frame, or only some?

    – Bernard
    Apr 2 at 21:55












  • I would like all theorems/definitions to be enclosed in a frame except for Theorem 3

    – K.M
    Apr 2 at 21:57











  • In this case you should take a look at the newframedtheorem command in ntheorem.

    – Bernard
    Apr 2 at 22:06













1












1








1








The following code



documentclassarticle


usepackageamsthm
usepackageamsmath
usepackagemathtools

usepackage[left=1.5in, right=1.5in, top=0.5in]geometry



newtheoremdefinitionDefinition
newtheoremtheoremTheorem


begindocument
titleExtra Credit
maketitle

begindefinition
If f is analytic at $z_0$, then the series

beginequation
f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
endequation

is called the Taylor series for f around $z_0$.
enddefinition

begintheorem
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
beginequation
f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
endequation
endtheorem

begintheorem
(Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
beginequation
f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
endequation
endtheorem
noindent hrulefill

begintheorem
If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
endtheorem


produces the following image
enter image description here



How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?










share|improve this question







New contributor




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












The following code



documentclassarticle


usepackageamsthm
usepackageamsmath
usepackagemathtools

usepackage[left=1.5in, right=1.5in, top=0.5in]geometry



newtheoremdefinitionDefinition
newtheoremtheoremTheorem


begindocument
titleExtra Credit
maketitle

begindefinition
If f is analytic at $z_0$, then the series

beginequation
f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
endequation

is called the Taylor series for f around $z_0$.
enddefinition

begintheorem
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
beginequation
f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
endequation
endtheorem

begintheorem
(Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
beginequation
f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
endequation
endtheorem
noindent hrulefill

begintheorem
If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
endtheorem


produces the following image
enter image description here



How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?







spacing






share|improve this question







New contributor




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











share|improve this question







New contributor




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









share|improve this question




share|improve this question






New contributor




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









asked Apr 2 at 21:38









K.MK.M

1675




1675




New contributor




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





New contributor





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






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












  • Do you want all theorems/definition to be enclosed in a frame, or only some?

    – Bernard
    Apr 2 at 21:55












  • I would like all theorems/definitions to be enclosed in a frame except for Theorem 3

    – K.M
    Apr 2 at 21:57











  • In this case you should take a look at the newframedtheorem command in ntheorem.

    – Bernard
    Apr 2 at 22:06

















  • Do you want all theorems/definition to be enclosed in a frame, or only some?

    – Bernard
    Apr 2 at 21:55












  • I would like all theorems/definitions to be enclosed in a frame except for Theorem 3

    – K.M
    Apr 2 at 21:57











  • In this case you should take a look at the newframedtheorem command in ntheorem.

    – Bernard
    Apr 2 at 22:06
















Do you want all theorems/definition to be enclosed in a frame, or only some?

– Bernard
Apr 2 at 21:55






Do you want all theorems/definition to be enclosed in a frame, or only some?

– Bernard
Apr 2 at 21:55














I would like all theorems/definitions to be enclosed in a frame except for Theorem 3

– K.M
Apr 2 at 21:57





I would like all theorems/definitions to be enclosed in a frame except for Theorem 3

– K.M
Apr 2 at 21:57













In this case you should take a look at the newframedtheorem command in ntheorem.

– Bernard
Apr 2 at 22:06





In this case you should take a look at the newframedtheorem command in ntheorem.

– Bernard
Apr 2 at 22:06










2 Answers
2






active

oldest

votes


















1














You can try with shadethm package, it can do all you want and many more. In you example what you need is:



documentclassarticle
usepackageshadethm
usepackagemathtools

newshadetheoremboxdefDefinition[section]
newshadetheoremboxtheorem[boxdef]Theorem
newtheoremtheorem[boxdef]Theorem

setlengthshadeboxsep2pt
setlengthshadeboxrule.4pt
setlengthshadedtextwidthtextwidth
addtolengthshadedtextwidth-2shadeboxsep
addtolengthshadedtextwidth-2shadeboxrule
setlengthshadeleftshift0pt
setlengthshaderightshift0pt
definecolorshadethmcolorcmyk0,0,0,0
definecolorshaderulecolorcmyk0,0,0,1

begindocument

sectionBoxed theorems

beginboxdef
If f is analytic at $z_0$, then the series

beginequation
f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
endequation

is called the Taylor series for f around $z_0$.
endboxdef

beginboxtheorem
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
beginequation
f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
endequation
endboxtheorem

beginboxtheorem
(Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
beginequation
f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
endequation
endboxtheorem
noindent hrulefill

begintheorem
If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
endtheorem

enddocument


which produces the following:



enter image description here






share|improve this answer























  • For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

    – K.M
    Apr 2 at 22:37







  • 1





    In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

    – barbara beeton
    Apr 3 at 21:06






  • 1





    @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

    – Luis Turcio
    Apr 3 at 21:50











  • @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

    – Luis Turcio
    Apr 3 at 21:54











  • @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

    – barbara beeton
    Apr 4 at 0:12


















2














Here is a solution with thmtools, which cooperates wit amsthm. Unrelated: you don't have to load amsmath if you load mathtools, as the latter does it for you:



documentclassarticle
usepackageamsthm, thmtools
usepackagemathtools

usepackage[left=1.5in, right=1.5in, top=0.5in]geometry

newtheoremdefinitionDefinition
newtheoremtheoremTheorem

declaretheorem[sibling=definition, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Definition]boxeddef
declaretheorem[sibling=theorem, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Theorem]boxedthm

begindocument
titleExtra Credit
author
maketitle

beginboxeddef
If f is analytic at $z_0$, then the series

beginequation
f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
endequation

is called the Taylor series for f around $z_0$.
endboxeddef

beginboxedthm
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
beginequation
f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
endequation
endboxedthm

beginboxedthm
(Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
beginequation
f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
endequation
endboxedthm

noindent hrulefill

begintheorem
If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
endtheorem

enddocument


enter image description here






share|improve this answer























    Your Answer








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

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

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






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









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482860%2fhow-to-enclose-theorems-and-definition-in-rectangles%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You can try with shadethm package, it can do all you want and many more. In you example what you need is:



    documentclassarticle
    usepackageshadethm
    usepackagemathtools

    newshadetheoremboxdefDefinition[section]
    newshadetheoremboxtheorem[boxdef]Theorem
    newtheoremtheorem[boxdef]Theorem

    setlengthshadeboxsep2pt
    setlengthshadeboxrule.4pt
    setlengthshadedtextwidthtextwidth
    addtolengthshadedtextwidth-2shadeboxsep
    addtolengthshadedtextwidth-2shadeboxrule
    setlengthshadeleftshift0pt
    setlengthshaderightshift0pt
    definecolorshadethmcolorcmyk0,0,0,0
    definecolorshaderulecolorcmyk0,0,0,1

    begindocument

    sectionBoxed theorems

    beginboxdef
    If f is analytic at $z_0$, then the series

    beginequation
    f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
    endequation

    is called the Taylor series for f around $z_0$.
    endboxdef

    beginboxtheorem
    If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
    beginequation
    f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
    endequation
    endboxtheorem

    beginboxtheorem
    (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
    beginequation
    f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
    endequation
    endboxtheorem
    noindent hrulefill

    begintheorem
    If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
    endtheorem

    enddocument


    which produces the following:



    enter image description here






    share|improve this answer























    • For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

      – K.M
      Apr 2 at 22:37







    • 1





      In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

      – barbara beeton
      Apr 3 at 21:06






    • 1





      @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

      – Luis Turcio
      Apr 3 at 21:50











    • @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

      – Luis Turcio
      Apr 3 at 21:54











    • @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

      – barbara beeton
      Apr 4 at 0:12















    1














    You can try with shadethm package, it can do all you want and many more. In you example what you need is:



    documentclassarticle
    usepackageshadethm
    usepackagemathtools

    newshadetheoremboxdefDefinition[section]
    newshadetheoremboxtheorem[boxdef]Theorem
    newtheoremtheorem[boxdef]Theorem

    setlengthshadeboxsep2pt
    setlengthshadeboxrule.4pt
    setlengthshadedtextwidthtextwidth
    addtolengthshadedtextwidth-2shadeboxsep
    addtolengthshadedtextwidth-2shadeboxrule
    setlengthshadeleftshift0pt
    setlengthshaderightshift0pt
    definecolorshadethmcolorcmyk0,0,0,0
    definecolorshaderulecolorcmyk0,0,0,1

    begindocument

    sectionBoxed theorems

    beginboxdef
    If f is analytic at $z_0$, then the series

    beginequation
    f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
    endequation

    is called the Taylor series for f around $z_0$.
    endboxdef

    beginboxtheorem
    If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
    beginequation
    f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
    endequation
    endboxtheorem

    beginboxtheorem
    (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
    beginequation
    f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
    endequation
    endboxtheorem
    noindent hrulefill

    begintheorem
    If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
    endtheorem

    enddocument


    which produces the following:



    enter image description here






    share|improve this answer























    • For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

      – K.M
      Apr 2 at 22:37







    • 1





      In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

      – barbara beeton
      Apr 3 at 21:06






    • 1





      @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

      – Luis Turcio
      Apr 3 at 21:50











    • @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

      – Luis Turcio
      Apr 3 at 21:54











    • @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

      – barbara beeton
      Apr 4 at 0:12













    1












    1








    1







    You can try with shadethm package, it can do all you want and many more. In you example what you need is:



    documentclassarticle
    usepackageshadethm
    usepackagemathtools

    newshadetheoremboxdefDefinition[section]
    newshadetheoremboxtheorem[boxdef]Theorem
    newtheoremtheorem[boxdef]Theorem

    setlengthshadeboxsep2pt
    setlengthshadeboxrule.4pt
    setlengthshadedtextwidthtextwidth
    addtolengthshadedtextwidth-2shadeboxsep
    addtolengthshadedtextwidth-2shadeboxrule
    setlengthshadeleftshift0pt
    setlengthshaderightshift0pt
    definecolorshadethmcolorcmyk0,0,0,0
    definecolorshaderulecolorcmyk0,0,0,1

    begindocument

    sectionBoxed theorems

    beginboxdef
    If f is analytic at $z_0$, then the series

    beginequation
    f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
    endequation

    is called the Taylor series for f around $z_0$.
    endboxdef

    beginboxtheorem
    If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
    beginequation
    f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
    endequation
    endboxtheorem

    beginboxtheorem
    (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
    beginequation
    f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
    endequation
    endboxtheorem
    noindent hrulefill

    begintheorem
    If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
    endtheorem

    enddocument


    which produces the following:



    enter image description here






    share|improve this answer













    You can try with shadethm package, it can do all you want and many more. In you example what you need is:



    documentclassarticle
    usepackageshadethm
    usepackagemathtools

    newshadetheoremboxdefDefinition[section]
    newshadetheoremboxtheorem[boxdef]Theorem
    newtheoremtheorem[boxdef]Theorem

    setlengthshadeboxsep2pt
    setlengthshadeboxrule.4pt
    setlengthshadedtextwidthtextwidth
    addtolengthshadedtextwidth-2shadeboxsep
    addtolengthshadedtextwidth-2shadeboxrule
    setlengthshadeleftshift0pt
    setlengthshaderightshift0pt
    definecolorshadethmcolorcmyk0,0,0,0
    definecolorshaderulecolorcmyk0,0,0,1

    begindocument

    sectionBoxed theorems

    beginboxdef
    If f is analytic at $z_0$, then the series

    beginequation
    f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
    endequation

    is called the Taylor series for f around $z_0$.
    endboxdef

    beginboxtheorem
    If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
    beginequation
    f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
    endequation
    endboxtheorem

    beginboxtheorem
    (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
    beginequation
    f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
    endequation
    endboxtheorem
    noindent hrulefill

    begintheorem
    If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
    endtheorem

    enddocument


    which produces the following:



    enter image description here







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Apr 2 at 22:27









    Luis TurcioLuis Turcio

    1259




    1259












    • For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

      – K.M
      Apr 2 at 22:37







    • 1





      In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

      – barbara beeton
      Apr 3 at 21:06






    • 1





      @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

      – Luis Turcio
      Apr 3 at 21:50











    • @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

      – Luis Turcio
      Apr 3 at 21:54











    • @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

      – barbara beeton
      Apr 4 at 0:12

















    • For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

      – K.M
      Apr 2 at 22:37







    • 1





      In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

      – barbara beeton
      Apr 3 at 21:06






    • 1





      @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

      – Luis Turcio
      Apr 3 at 21:50











    • @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

      – Luis Turcio
      Apr 3 at 21:54











    • @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

      – barbara beeton
      Apr 4 at 0:12
















    For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

    – K.M
    Apr 2 at 22:37






    For newshadetheoremboxdefDefinition[section] newshadetheoremboxtheorem[boxdef]Theorem newtheoremtheorem[boxdef]Theorem, why is boxdef in brackets?

    – K.M
    Apr 2 at 22:37





    1




    1





    In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

    – barbara beeton
    Apr 3 at 21:06





    In the first box, the space above the equation is larger than that below the equation The reason for this is the blank line above beginequation. Blank lines in that position should be avoided.

    – barbara beeton
    Apr 3 at 21:06




    1




    1





    @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

    – Luis Turcio
    Apr 3 at 21:50





    @K.M the brackets [boxdef] is to enumerate all different kind of theorems with the same enumeration

    – Luis Turcio
    Apr 3 at 21:50













    @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

    – Luis Turcio
    Apr 3 at 21:54





    @barbarabeeton the spacing is due to the original code written by K.M, it has a blank line before beginequation and one after endequation. Removing or commenting this blank lines should be enough to correct spacing.

    – Luis Turcio
    Apr 3 at 21:54













    @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

    – barbara beeton
    Apr 4 at 0:12





    @LuisTurcio -- Indeed, commenting or removing the blank line is what is recommended. I really should have posted this comment to the original question.

    – barbara beeton
    Apr 4 at 0:12











    2














    Here is a solution with thmtools, which cooperates wit amsthm. Unrelated: you don't have to load amsmath if you load mathtools, as the latter does it for you:



    documentclassarticle
    usepackageamsthm, thmtools
    usepackagemathtools

    usepackage[left=1.5in, right=1.5in, top=0.5in]geometry

    newtheoremdefinitionDefinition
    newtheoremtheoremTheorem

    declaretheorem[sibling=definition, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Definition]boxeddef
    declaretheorem[sibling=theorem, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Theorem]boxedthm

    begindocument
    titleExtra Credit
    author
    maketitle

    beginboxeddef
    If f is analytic at $z_0$, then the series

    beginequation
    f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
    endequation

    is called the Taylor series for f around $z_0$.
    endboxeddef

    beginboxedthm
    If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
    beginequation
    f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
    endequation
    endboxedthm

    beginboxedthm
    (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
    beginequation
    f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
    endequation
    endboxedthm

    noindent hrulefill

    begintheorem
    If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
    endtheorem

    enddocument


    enter image description here






    share|improve this answer



























      2














      Here is a solution with thmtools, which cooperates wit amsthm. Unrelated: you don't have to load amsmath if you load mathtools, as the latter does it for you:



      documentclassarticle
      usepackageamsthm, thmtools
      usepackagemathtools

      usepackage[left=1.5in, right=1.5in, top=0.5in]geometry

      newtheoremdefinitionDefinition
      newtheoremtheoremTheorem

      declaretheorem[sibling=definition, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Definition]boxeddef
      declaretheorem[sibling=theorem, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Theorem]boxedthm

      begindocument
      titleExtra Credit
      author
      maketitle

      beginboxeddef
      If f is analytic at $z_0$, then the series

      beginequation
      f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
      endequation

      is called the Taylor series for f around $z_0$.
      endboxeddef

      beginboxedthm
      If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
      beginequation
      f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
      endequation
      endboxedthm

      beginboxedthm
      (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
      beginequation
      f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
      endequation
      endboxedthm

      noindent hrulefill

      begintheorem
      If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
      endtheorem

      enddocument


      enter image description here






      share|improve this answer

























        2












        2








        2







        Here is a solution with thmtools, which cooperates wit amsthm. Unrelated: you don't have to load amsmath if you load mathtools, as the latter does it for you:



        documentclassarticle
        usepackageamsthm, thmtools
        usepackagemathtools

        usepackage[left=1.5in, right=1.5in, top=0.5in]geometry

        newtheoremdefinitionDefinition
        newtheoremtheoremTheorem

        declaretheorem[sibling=definition, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Definition]boxeddef
        declaretheorem[sibling=theorem, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Theorem]boxedthm

        begindocument
        titleExtra Credit
        author
        maketitle

        beginboxeddef
        If f is analytic at $z_0$, then the series

        beginequation
        f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
        endequation

        is called the Taylor series for f around $z_0$.
        endboxeddef

        beginboxedthm
        If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
        beginequation
        f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
        endequation
        endboxedthm

        beginboxedthm
        (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
        beginequation
        f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
        endequation
        endboxedthm

        noindent hrulefill

        begintheorem
        If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
        endtheorem

        enddocument


        enter image description here






        share|improve this answer













        Here is a solution with thmtools, which cooperates wit amsthm. Unrelated: you don't have to load amsmath if you load mathtools, as the latter does it for you:



        documentclassarticle
        usepackageamsthm, thmtools
        usepackagemathtools

        usepackage[left=1.5in, right=1.5in, top=0.5in]geometry

        newtheoremdefinitionDefinition
        newtheoremtheoremTheorem

        declaretheorem[sibling=definition, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Definition]boxeddef
        declaretheorem[sibling=theorem, shaded=rulecolor=black, rulewidth=0.6pt, bgcolor=rgb1,1,1,name=Theorem]boxedthm

        begindocument
        titleExtra Credit
        author
        maketitle

        beginboxeddef
        If f is analytic at $z_0$, then the series

        beginequation
        f(z_0) + f'(z_0)(z-z_0) + fracf''(z_0)2!(z-z_0)^2 + cdots = sum_n=0^infty fracf^(n)(z_0)n!(z-z_0)^n
        endequation

        is called the Taylor series for f around $z_0$.
        endboxeddef

        beginboxedthm
        If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
        beginequation
        f^(n)(z_0) = fracn!2pi i int_Gamma fracf(zeta)(zeta - z_0)^n+1dzeta hspace1cm (n=1,2,3, cdots )
        endequation
        endboxedthm

        beginboxedthm
        (Cauchy's Integral Formula) Let $Gamma$ be a simple closed positively oriented contour. If $f$ is analytic in some simply connected domain $D$ containing $Gamma$ and $z_0$ is any point inside $Gamma$, then
        beginequation
        f(z_0)= frac12pi i int_Gamma fracf(z)z-z_0 dz
        endequation
        endboxedthm

        noindent hrulefill

        begintheorem
        If f is analytic in the disk $|z-z_0|<R'$, then the Taylor series $(1)$ converges to $f(z)$ for all $z$ in this disk.
        endtheorem

        enddocument


        enter image description here







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 2 at 22:40









        BernardBernard

        175k778208




        175k778208




















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









            draft saved

            draft discarded


















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












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











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














            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%2f482860%2fhow-to-enclose-theorems-and-definition-in-rectangles%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

            រឿង រ៉ូមេអូ និង ហ្ស៊ុយលីយេ សង្ខេបរឿង តួអង្គ បញ្ជីណែនាំ

            QGIS export composer to PDF scale the map [closed] Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Print Composer QGIS 2.6, how to export image?QGIS 2.8.1 print composer won't export all OpenCycleMap base layer tilesSave Print/Map QGIS composer view as PNG/PDF using Python (without changing anything in visible layout)?Export QGIS Print Composer PDF with searchable text labelsQGIS Print Composer does not change from landscape to portrait orientation?How can I avoid map size and scale changes in print composer?Fuzzy PDF export in QGIS running on macSierra OSExport the legend into its 100% size using Print ComposerScale-dependent rendering in QGIS PDF output

            PDF-ში გადმოწერა სანავიგაციო მენიუproject page