Indented theorem and proof environemnts
up vote
2
down vote
favorite
I would like to be able to recreate the following theorem style, where the main body of a theorem/proof/definition etc. is indented by a variable amount. I would also like to end a theorem proof with a filled circle rather than a square. The labels "Definition 1.1., etc." should be vertically aligned with the first line of the definition text. How do I go about achieving this?
As a starting point, I am working with the following document.
documentclass[11pt,a4paper]{article}
usepackage[margin=2.5cm]{geometry}
usepackage{xcolor}
usepackage[calcwidth]{titlesec}
usepackage{blindtext}
usepackage{scrextend}
usepackage{microtype}
usepackage[leqno]{amsmath}
usepackage[standard,amsmath,thmmarks]{ntheorem}
usepackage{etoolbox}
makeatletter
setlength labelsep {3.15em}
newtheoremstyle{mymargin}%
{item[theorem@headerfont llap{##1 ##2}]}%
{item[theorem@headerfont llap{##1 ##2}| ##3theorem@separatorhskiplabelsep]}%
makeatother
% my definition
theoremstyle{mymargin}
theorembodyfont{}
theoremsymbol{}
theoremprework{}
theorempostwork{}
theoremseparator{.}
newtheorem{mydefinition}{Definition}
numberwithin{mydefinition}{section}
newtheorem{mythm}{Theorem}
numberwithin{mythm}{section}
begin{document}
section{A test section}
begin{addmargin}[10em]{0em}begin{mydefinition}blindtextend{mydefinition}
end{addmargin}
end{document}
theorems amsthm ntheorem
add a comment |
up vote
2
down vote
favorite
I would like to be able to recreate the following theorem style, where the main body of a theorem/proof/definition etc. is indented by a variable amount. I would also like to end a theorem proof with a filled circle rather than a square. The labels "Definition 1.1., etc." should be vertically aligned with the first line of the definition text. How do I go about achieving this?
As a starting point, I am working with the following document.
documentclass[11pt,a4paper]{article}
usepackage[margin=2.5cm]{geometry}
usepackage{xcolor}
usepackage[calcwidth]{titlesec}
usepackage{blindtext}
usepackage{scrextend}
usepackage{microtype}
usepackage[leqno]{amsmath}
usepackage[standard,amsmath,thmmarks]{ntheorem}
usepackage{etoolbox}
makeatletter
setlength labelsep {3.15em}
newtheoremstyle{mymargin}%
{item[theorem@headerfont llap{##1 ##2}]}%
{item[theorem@headerfont llap{##1 ##2}| ##3theorem@separatorhskiplabelsep]}%
makeatother
% my definition
theoremstyle{mymargin}
theorembodyfont{}
theoremsymbol{}
theoremprework{}
theorempostwork{}
theoremseparator{.}
newtheorem{mydefinition}{Definition}
numberwithin{mydefinition}{section}
newtheorem{mythm}{Theorem}
numberwithin{mythm}{section}
begin{document}
section{A test section}
begin{addmargin}[10em]{0em}begin{mydefinition}blindtextend{mydefinition}
end{addmargin}
end{document}
theorems amsthm ntheorem
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I would like to be able to recreate the following theorem style, where the main body of a theorem/proof/definition etc. is indented by a variable amount. I would also like to end a theorem proof with a filled circle rather than a square. The labels "Definition 1.1., etc." should be vertically aligned with the first line of the definition text. How do I go about achieving this?
As a starting point, I am working with the following document.
documentclass[11pt,a4paper]{article}
usepackage[margin=2.5cm]{geometry}
usepackage{xcolor}
usepackage[calcwidth]{titlesec}
usepackage{blindtext}
usepackage{scrextend}
usepackage{microtype}
usepackage[leqno]{amsmath}
usepackage[standard,amsmath,thmmarks]{ntheorem}
usepackage{etoolbox}
makeatletter
setlength labelsep {3.15em}
newtheoremstyle{mymargin}%
{item[theorem@headerfont llap{##1 ##2}]}%
{item[theorem@headerfont llap{##1 ##2}| ##3theorem@separatorhskiplabelsep]}%
makeatother
% my definition
theoremstyle{mymargin}
theorembodyfont{}
theoremsymbol{}
theoremprework{}
theorempostwork{}
theoremseparator{.}
newtheorem{mydefinition}{Definition}
numberwithin{mydefinition}{section}
newtheorem{mythm}{Theorem}
numberwithin{mythm}{section}
begin{document}
section{A test section}
begin{addmargin}[10em]{0em}begin{mydefinition}blindtextend{mydefinition}
end{addmargin}
end{document}
theorems amsthm ntheorem
I would like to be able to recreate the following theorem style, where the main body of a theorem/proof/definition etc. is indented by a variable amount. I would also like to end a theorem proof with a filled circle rather than a square. The labels "Definition 1.1., etc." should be vertically aligned with the first line of the definition text. How do I go about achieving this?
As a starting point, I am working with the following document.
documentclass[11pt,a4paper]{article}
usepackage[margin=2.5cm]{geometry}
usepackage{xcolor}
usepackage[calcwidth]{titlesec}
usepackage{blindtext}
usepackage{scrextend}
usepackage{microtype}
usepackage[leqno]{amsmath}
usepackage[standard,amsmath,thmmarks]{ntheorem}
usepackage{etoolbox}
makeatletter
setlength labelsep {3.15em}
newtheoremstyle{mymargin}%
{item[theorem@headerfont llap{##1 ##2}]}%
{item[theorem@headerfont llap{##1 ##2}| ##3theorem@separatorhskiplabelsep]}%
makeatother
% my definition
theoremstyle{mymargin}
theorembodyfont{}
theoremsymbol{}
theoremprework{}
theorempostwork{}
theoremseparator{.}
newtheorem{mydefinition}{Definition}
numberwithin{mydefinition}{section}
newtheorem{mythm}{Theorem}
numberwithin{mythm}{section}
begin{document}
section{A test section}
begin{addmargin}[10em]{0em}begin{mydefinition}blindtextend{mydefinition}
end{addmargin}
end{document}
theorems amsthm ntheorem
theorems amsthm ntheorem
asked yesterday
wrb98
21219
21219
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
I don't like ntheorem
. Here's a modification of https://tex.stackexchange.com/a/106582/4427
documentclass[a4paper]{article}
usepackage{amsthm,thmtools}
usepackage{etoolbox}
usepackage{lipsum} % just for context
usepackage{showframe} % for showing the margins
makeatletter
newlength{thmindent}
AtBeginDocument{setlength{thmindent}{15em}}
patchcmd@thm
{trivlist}
{list{}{leftmarginthmindent}}
{}{}
newcommand{xdeclaretheorem}[2]{%
declaretheorem[#1]{#2}%
expandafterpatchcmdcsname thmt@original@end#2endcsname
{endtrivlist}{endlist}{}{}%
}
renewenvironment{proof}[1][proofname]{par
pushQED{qed}%
normalfont
list{}{leftmargin=thmindent}
item
makebox[0pt][r]{makebox[thmindent][l]{itshape#1@addpunct{.}}}ignorespaces
}{%
popQEDendlist@endpefalse
}
renewcommand{qedsymbol}{textbullet}
makeatother
declaretheoremstyle[
headpunct={},
headfont=bfseries,
bodyfont=normalfont,
headindent=0pt,
postheadspace=0pt,
headformat={makebox[0pt][r]{makebox[thmindent][l]{NAME NUMBER.}}},
]{INDENTthm}
xdeclaretheorem[
within=section,
style=INDENTthm,
name=Theorem
]{thm}
xdeclaretheorem[
sibling=thm,
style=INDENTthm,
name=Lemma
]{lem}
begin{document}
begin{thm}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{thm}
begin{lem}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{lem}
begin{proof}
lipsum*[2]
end{proof}
end{document}
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
I don't like ntheorem
. Here's a modification of https://tex.stackexchange.com/a/106582/4427
documentclass[a4paper]{article}
usepackage{amsthm,thmtools}
usepackage{etoolbox}
usepackage{lipsum} % just for context
usepackage{showframe} % for showing the margins
makeatletter
newlength{thmindent}
AtBeginDocument{setlength{thmindent}{15em}}
patchcmd@thm
{trivlist}
{list{}{leftmarginthmindent}}
{}{}
newcommand{xdeclaretheorem}[2]{%
declaretheorem[#1]{#2}%
expandafterpatchcmdcsname thmt@original@end#2endcsname
{endtrivlist}{endlist}{}{}%
}
renewenvironment{proof}[1][proofname]{par
pushQED{qed}%
normalfont
list{}{leftmargin=thmindent}
item
makebox[0pt][r]{makebox[thmindent][l]{itshape#1@addpunct{.}}}ignorespaces
}{%
popQEDendlist@endpefalse
}
renewcommand{qedsymbol}{textbullet}
makeatother
declaretheoremstyle[
headpunct={},
headfont=bfseries,
bodyfont=normalfont,
headindent=0pt,
postheadspace=0pt,
headformat={makebox[0pt][r]{makebox[thmindent][l]{NAME NUMBER.}}},
]{INDENTthm}
xdeclaretheorem[
within=section,
style=INDENTthm,
name=Theorem
]{thm}
xdeclaretheorem[
sibling=thm,
style=INDENTthm,
name=Lemma
]{lem}
begin{document}
begin{thm}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{thm}
begin{lem}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{lem}
begin{proof}
lipsum*[2]
end{proof}
end{document}
add a comment |
up vote
3
down vote
accepted
I don't like ntheorem
. Here's a modification of https://tex.stackexchange.com/a/106582/4427
documentclass[a4paper]{article}
usepackage{amsthm,thmtools}
usepackage{etoolbox}
usepackage{lipsum} % just for context
usepackage{showframe} % for showing the margins
makeatletter
newlength{thmindent}
AtBeginDocument{setlength{thmindent}{15em}}
patchcmd@thm
{trivlist}
{list{}{leftmarginthmindent}}
{}{}
newcommand{xdeclaretheorem}[2]{%
declaretheorem[#1]{#2}%
expandafterpatchcmdcsname thmt@original@end#2endcsname
{endtrivlist}{endlist}{}{}%
}
renewenvironment{proof}[1][proofname]{par
pushQED{qed}%
normalfont
list{}{leftmargin=thmindent}
item
makebox[0pt][r]{makebox[thmindent][l]{itshape#1@addpunct{.}}}ignorespaces
}{%
popQEDendlist@endpefalse
}
renewcommand{qedsymbol}{textbullet}
makeatother
declaretheoremstyle[
headpunct={},
headfont=bfseries,
bodyfont=normalfont,
headindent=0pt,
postheadspace=0pt,
headformat={makebox[0pt][r]{makebox[thmindent][l]{NAME NUMBER.}}},
]{INDENTthm}
xdeclaretheorem[
within=section,
style=INDENTthm,
name=Theorem
]{thm}
xdeclaretheorem[
sibling=thm,
style=INDENTthm,
name=Lemma
]{lem}
begin{document}
begin{thm}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{thm}
begin{lem}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{lem}
begin{proof}
lipsum*[2]
end{proof}
end{document}
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
I don't like ntheorem
. Here's a modification of https://tex.stackexchange.com/a/106582/4427
documentclass[a4paper]{article}
usepackage{amsthm,thmtools}
usepackage{etoolbox}
usepackage{lipsum} % just for context
usepackage{showframe} % for showing the margins
makeatletter
newlength{thmindent}
AtBeginDocument{setlength{thmindent}{15em}}
patchcmd@thm
{trivlist}
{list{}{leftmarginthmindent}}
{}{}
newcommand{xdeclaretheorem}[2]{%
declaretheorem[#1]{#2}%
expandafterpatchcmdcsname thmt@original@end#2endcsname
{endtrivlist}{endlist}{}{}%
}
renewenvironment{proof}[1][proofname]{par
pushQED{qed}%
normalfont
list{}{leftmargin=thmindent}
item
makebox[0pt][r]{makebox[thmindent][l]{itshape#1@addpunct{.}}}ignorespaces
}{%
popQEDendlist@endpefalse
}
renewcommand{qedsymbol}{textbullet}
makeatother
declaretheoremstyle[
headpunct={},
headfont=bfseries,
bodyfont=normalfont,
headindent=0pt,
postheadspace=0pt,
headformat={makebox[0pt][r]{makebox[thmindent][l]{NAME NUMBER.}}},
]{INDENTthm}
xdeclaretheorem[
within=section,
style=INDENTthm,
name=Theorem
]{thm}
xdeclaretheorem[
sibling=thm,
style=INDENTthm,
name=Lemma
]{lem}
begin{document}
begin{thm}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{thm}
begin{lem}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{lem}
begin{proof}
lipsum*[2]
end{proof}
end{document}
I don't like ntheorem
. Here's a modification of https://tex.stackexchange.com/a/106582/4427
documentclass[a4paper]{article}
usepackage{amsthm,thmtools}
usepackage{etoolbox}
usepackage{lipsum} % just for context
usepackage{showframe} % for showing the margins
makeatletter
newlength{thmindent}
AtBeginDocument{setlength{thmindent}{15em}}
patchcmd@thm
{trivlist}
{list{}{leftmarginthmindent}}
{}{}
newcommand{xdeclaretheorem}[2]{%
declaretheorem[#1]{#2}%
expandafterpatchcmdcsname thmt@original@end#2endcsname
{endtrivlist}{endlist}{}{}%
}
renewenvironment{proof}[1][proofname]{par
pushQED{qed}%
normalfont
list{}{leftmargin=thmindent}
item
makebox[0pt][r]{makebox[thmindent][l]{itshape#1@addpunct{.}}}ignorespaces
}{%
popQEDendlist@endpefalse
}
renewcommand{qedsymbol}{textbullet}
makeatother
declaretheoremstyle[
headpunct={},
headfont=bfseries,
bodyfont=normalfont,
headindent=0pt,
postheadspace=0pt,
headformat={makebox[0pt][r]{makebox[thmindent][l]{NAME NUMBER.}}},
]{INDENTthm}
xdeclaretheorem[
within=section,
style=INDENTthm,
name=Theorem
]{thm}
xdeclaretheorem[
sibling=thm,
style=INDENTthm,
name=Lemma
]{lem}
begin{document}
begin{thm}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{thm}
begin{lem}
lipsum*[2]
begin{enumerate}
item a
item b
end{enumerate}
end{lem}
begin{proof}
lipsum*[2]
end{proof}
end{document}
answered yesterday
egreg
699k8518593129
699k8518593129
add a comment |
add a comment |
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%2f461287%2findented-theorem-and-proof-environemnts%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