How to enclose theorems and definition in rectangles?
The following code
documentclass{article}
usepackage{amsthm}
usepackage{amsmath}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
begin{document}
title{Extra Credit}
maketitle
begin{definition}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{definition}
begin{theorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{theorem}
begin{theorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{theorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
produces the following image
How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?
spacing
add a comment |
The following code
documentclass{article}
usepackage{amsthm}
usepackage{amsmath}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
begin{document}
title{Extra Credit}
maketitle
begin{definition}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{definition}
begin{theorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{theorem}
begin{theorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{theorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
produces the following image
How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?
spacing
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 thenewframedtheorem
command inntheorem
.
– Bernard
Apr 2 at 22:06
add a comment |
The following code
documentclass{article}
usepackage{amsthm}
usepackage{amsmath}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
begin{document}
title{Extra Credit}
maketitle
begin{definition}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{definition}
begin{theorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{theorem}
begin{theorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{theorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
produces the following image
How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?
spacing
The following code
documentclass{article}
usepackage{amsthm}
usepackage{amsmath}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
begin{document}
title{Extra Credit}
maketitle
begin{definition}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{definition}
begin{theorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{theorem}
begin{theorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{theorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
produces the following image
How can I enclose Definition 1, Theorem 1, and Theorem 2 in separate rectangles. And have these rectangles separated by a space?
spacing
spacing
asked Apr 2 at 21:38
K.MK.M
1676
1676
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 thenewframedtheorem
command inntheorem
.
– Bernard
Apr 2 at 22:06
add a comment |
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 thenewframedtheorem
command inntheorem
.
– 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
add a comment |
2 Answers
2
active
oldest
votes
You can try with shadethm
package, it can do all you want and many more. In you example what you need is:
documentclass{article}
usepackage{shadethm}
usepackage{mathtools}
newshadetheorem{boxdef}{Definition}[section]
newshadetheorem{boxtheorem}[boxdef]{Theorem}
newtheorem{theorem}[boxdef]{Theorem}
setlength{shadeboxsep}{2pt}
setlength{shadeboxrule}{.4pt}
setlength{shadedtextwidth}{textwidth}
addtolength{shadedtextwidth}{-2shadeboxsep}
addtolength{shadedtextwidth}{-2shadeboxrule}
setlength{shadeleftshift}{0pt}
setlength{shaderightshift}{0pt}
definecolor{shadethmcolor}{cmyk}{0,0,0,0}
definecolor{shaderulecolor}{cmyk}{0,0,0,1}
begin{document}
section{Boxed theorems}
begin{boxdef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxdef}
begin{boxtheorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxtheorem}
begin{boxtheorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxtheorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
which produces the following:
Fornewshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[boxdef]{Theorem}
, why isboxdef
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 abovebegin{equation}
. 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 begin{equation} and one after end{equation}. 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
|
show 1 more comment
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:
documentclass{article}
usepackage{amsthm, thmtools}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
declaretheorem[sibling=definition, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Definition]{boxeddef}
declaretheorem[sibling=theorem, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Theorem]{boxedthm}
begin{document}
title{Extra Credit}
author{}
maketitle
begin{boxeddef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxeddef}
begin{boxedthm}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxedthm}
begin{boxedthm}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxedthm}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
You can try with shadethm
package, it can do all you want and many more. In you example what you need is:
documentclass{article}
usepackage{shadethm}
usepackage{mathtools}
newshadetheorem{boxdef}{Definition}[section]
newshadetheorem{boxtheorem}[boxdef]{Theorem}
newtheorem{theorem}[boxdef]{Theorem}
setlength{shadeboxsep}{2pt}
setlength{shadeboxrule}{.4pt}
setlength{shadedtextwidth}{textwidth}
addtolength{shadedtextwidth}{-2shadeboxsep}
addtolength{shadedtextwidth}{-2shadeboxrule}
setlength{shadeleftshift}{0pt}
setlength{shaderightshift}{0pt}
definecolor{shadethmcolor}{cmyk}{0,0,0,0}
definecolor{shaderulecolor}{cmyk}{0,0,0,1}
begin{document}
section{Boxed theorems}
begin{boxdef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxdef}
begin{boxtheorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxtheorem}
begin{boxtheorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxtheorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
which produces the following:
Fornewshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[boxdef]{Theorem}
, why isboxdef
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 abovebegin{equation}
. 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 begin{equation} and one after end{equation}. 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
|
show 1 more comment
You can try with shadethm
package, it can do all you want and many more. In you example what you need is:
documentclass{article}
usepackage{shadethm}
usepackage{mathtools}
newshadetheorem{boxdef}{Definition}[section]
newshadetheorem{boxtheorem}[boxdef]{Theorem}
newtheorem{theorem}[boxdef]{Theorem}
setlength{shadeboxsep}{2pt}
setlength{shadeboxrule}{.4pt}
setlength{shadedtextwidth}{textwidth}
addtolength{shadedtextwidth}{-2shadeboxsep}
addtolength{shadedtextwidth}{-2shadeboxrule}
setlength{shadeleftshift}{0pt}
setlength{shaderightshift}{0pt}
definecolor{shadethmcolor}{cmyk}{0,0,0,0}
definecolor{shaderulecolor}{cmyk}{0,0,0,1}
begin{document}
section{Boxed theorems}
begin{boxdef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxdef}
begin{boxtheorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxtheorem}
begin{boxtheorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxtheorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
which produces the following:
Fornewshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[boxdef]{Theorem}
, why isboxdef
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 abovebegin{equation}
. 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 begin{equation} and one after end{equation}. 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
|
show 1 more comment
You can try with shadethm
package, it can do all you want and many more. In you example what you need is:
documentclass{article}
usepackage{shadethm}
usepackage{mathtools}
newshadetheorem{boxdef}{Definition}[section]
newshadetheorem{boxtheorem}[boxdef]{Theorem}
newtheorem{theorem}[boxdef]{Theorem}
setlength{shadeboxsep}{2pt}
setlength{shadeboxrule}{.4pt}
setlength{shadedtextwidth}{textwidth}
addtolength{shadedtextwidth}{-2shadeboxsep}
addtolength{shadedtextwidth}{-2shadeboxrule}
setlength{shadeleftshift}{0pt}
setlength{shaderightshift}{0pt}
definecolor{shadethmcolor}{cmyk}{0,0,0,0}
definecolor{shaderulecolor}{cmyk}{0,0,0,1}
begin{document}
section{Boxed theorems}
begin{boxdef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxdef}
begin{boxtheorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxtheorem}
begin{boxtheorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxtheorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
which produces the following:
You can try with shadethm
package, it can do all you want and many more. In you example what you need is:
documentclass{article}
usepackage{shadethm}
usepackage{mathtools}
newshadetheorem{boxdef}{Definition}[section]
newshadetheorem{boxtheorem}[boxdef]{Theorem}
newtheorem{theorem}[boxdef]{Theorem}
setlength{shadeboxsep}{2pt}
setlength{shadeboxrule}{.4pt}
setlength{shadedtextwidth}{textwidth}
addtolength{shadedtextwidth}{-2shadeboxsep}
addtolength{shadedtextwidth}{-2shadeboxrule}
setlength{shadeleftshift}{0pt}
setlength{shaderightshift}{0pt}
definecolor{shadethmcolor}{cmyk}{0,0,0,0}
definecolor{shaderulecolor}{cmyk}{0,0,0,1}
begin{document}
section{Boxed theorems}
begin{boxdef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxdef}
begin{boxtheorem}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxtheorem}
begin{boxtheorem}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxtheorem}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
which produces the following:
answered Apr 2 at 22:27
Luis TurcioLuis Turcio
1359
1359
Fornewshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[boxdef]{Theorem}
, why isboxdef
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 abovebegin{equation}
. 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 begin{equation} and one after end{equation}. 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
|
show 1 more comment
Fornewshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[boxdef]{Theorem}
, why isboxdef
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 abovebegin{equation}
. 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 begin{equation} and one after end{equation}. 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
newshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[boxdef]{Theorem}
, why is boxdef
in brackets?– K.M
Apr 2 at 22:37
For
newshadetheorem{boxdef}{Definition}[section] newshadetheorem{boxtheorem}[boxdef]{Theorem} newtheorem{theorem}[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
begin{equation}
. 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
begin{equation}
. 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 begin{equation} and one after end{equation}. 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 begin{equation} and one after end{equation}. 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
|
show 1 more comment
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:
documentclass{article}
usepackage{amsthm, thmtools}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
declaretheorem[sibling=definition, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Definition]{boxeddef}
declaretheorem[sibling=theorem, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Theorem]{boxedthm}
begin{document}
title{Extra Credit}
author{}
maketitle
begin{boxeddef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxeddef}
begin{boxedthm}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxedthm}
begin{boxedthm}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxedthm}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
add a comment |
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:
documentclass{article}
usepackage{amsthm, thmtools}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
declaretheorem[sibling=definition, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Definition]{boxeddef}
declaretheorem[sibling=theorem, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Theorem]{boxedthm}
begin{document}
title{Extra Credit}
author{}
maketitle
begin{boxeddef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxeddef}
begin{boxedthm}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxedthm}
begin{boxedthm}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxedthm}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
add a comment |
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:
documentclass{article}
usepackage{amsthm, thmtools}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
declaretheorem[sibling=definition, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Definition]{boxeddef}
declaretheorem[sibling=theorem, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Theorem]{boxedthm}
begin{document}
title{Extra Credit}
author{}
maketitle
begin{boxeddef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxeddef}
begin{boxedthm}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxedthm}
begin{boxedthm}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxedthm}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
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:
documentclass{article}
usepackage{amsthm, thmtools}
usepackage{mathtools}
usepackage[left=1.5in, right=1.5in, top=0.5in]{geometry}
newtheorem{definition}{Definition}
newtheorem{theorem}{Theorem}
declaretheorem[sibling=definition, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Definition]{boxeddef}
declaretheorem[sibling=theorem, shaded={rulecolor=black, rulewidth=0.6pt, bgcolor={rgb}{1,1,1}},name=Theorem]{boxedthm}
begin{document}
title{Extra Credit}
author{}
maketitle
begin{boxeddef}
If f is analytic at $z_0$, then the series
begin{equation}
f(z_0) + f'(z_0)(z-z_0) + frac{f''(z_0)}{2!}(z-z_0)^2 + cdots = sum_{n=0}^{infty} frac{f^{(n)}(z_0)}{n!}(z-z_0)^n
end{equation}
is called the Taylor series for f around $z_0$.
end{boxeddef}
begin{boxedthm}
If f is analytic inside and on the simple closed positively oriented contour $Gamma$ and if $z_0$ is any point inside $Gamma$, then
begin{equation}
f^{(n)}(z_0) = frac{n!}{2pi i} int_{Gamma} frac{f(zeta)}{(zeta - z_0)^{n+1}}dzeta hspace{1cm} (n=1,2,3, cdots )
end{equation}
end{boxedthm}
begin{boxedthm}
(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
begin{equation}
f(z_0)= frac{1}{2pi i} int_{Gamma} frac{f(z)}{z-z_0} dz
end{equation}
end{boxedthm}
noindent hrulefill
begin{theorem}
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.
end{theorem}
end{document}
answered Apr 2 at 22:40
BernardBernard
175k778209
175k778209
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 inntheorem
.– Bernard
Apr 2 at 22:06