Is there a way to modify the theorem environment in order to have an horizontal rule immediately before and...
I've just seen this solution for the proof environment and I really liked it.
How to draw a horizontal line at the end of proofs?
I'm wondering if is there an elegant way to do it also with the theorem environment.
Note
I don't want to use boxes or mdframed packages...
Edit: the following code for example doesn't work:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage{thmtools}
usepackage[thmmarks, thref, amsmath]{ntheorem}
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
begin{document}
tableofcontents
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
addcontentsline{toc}{chapter}{List of Theorems}
listoftheorems[ignoreall,onlynamed={thm,lmm,prop}
end{document}
theorems rules newtheorem addlines
add a comment |
I've just seen this solution for the proof environment and I really liked it.
How to draw a horizontal line at the end of proofs?
I'm wondering if is there an elegant way to do it also with the theorem environment.
Note
I don't want to use boxes or mdframed packages...
Edit: the following code for example doesn't work:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage{thmtools}
usepackage[thmmarks, thref, amsmath]{ntheorem}
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
begin{document}
tableofcontents
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
addcontentsline{toc}{chapter}{List of Theorems}
listoftheorems[ignoreall,onlynamed={thm,lmm,prop}
end{document}
theorems rules newtheorem addlines
add a comment |
I've just seen this solution for the proof environment and I really liked it.
How to draw a horizontal line at the end of proofs?
I'm wondering if is there an elegant way to do it also with the theorem environment.
Note
I don't want to use boxes or mdframed packages...
Edit: the following code for example doesn't work:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage{thmtools}
usepackage[thmmarks, thref, amsmath]{ntheorem}
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
begin{document}
tableofcontents
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
addcontentsline{toc}{chapter}{List of Theorems}
listoftheorems[ignoreall,onlynamed={thm,lmm,prop}
end{document}
theorems rules newtheorem addlines
I've just seen this solution for the proof environment and I really liked it.
How to draw a horizontal line at the end of proofs?
I'm wondering if is there an elegant way to do it also with the theorem environment.
Note
I don't want to use boxes or mdframed packages...
Edit: the following code for example doesn't work:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage{thmtools}
usepackage[thmmarks, thref, amsmath]{ntheorem}
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
begin{document}
tableofcontents
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
addcontentsline{toc}{chapter}{List of Theorems}
listoftheorems[ignoreall,onlynamed={thm,lmm,prop}
end{document}
theorems rules newtheorem addlines
theorems rules newtheorem addlines
edited Oct 18 '17 at 21:33
asked Oct 16 '17 at 18:09
Erik Pillon
1036
1036
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Quite simple with the theoremprework
and theorempostwork
commands from ntheorem
:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage[thmmarks, thref, amsmath]{ntheorem}%
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
usepackage{thmtools}
begin{document}
tableofcontents
bigskip
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
bigskip
addcontentsline{toc}{chapter}{List of Theorems}
theoremlisttype{allname}
listtheorems{thm}%
end{document}
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
Thanks a lot for your immediate answer! Anyway this way strangely collides with the commandlistoftheorems
of the packagethmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.
– Erik Pillon
Oct 18 '17 at 21:16
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
|
show 1 more 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%2f396485%2fis-there-a-way-to-modify-the-theorem-environment-in-order-to-have-an-horizontal%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Quite simple with the theoremprework
and theorempostwork
commands from ntheorem
:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage[thmmarks, thref, amsmath]{ntheorem}%
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
usepackage{thmtools}
begin{document}
tableofcontents
bigskip
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
bigskip
addcontentsline{toc}{chapter}{List of Theorems}
theoremlisttype{allname}
listtheorems{thm}%
end{document}
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
Thanks a lot for your immediate answer! Anyway this way strangely collides with the commandlistoftheorems
of the packagethmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.
– Erik Pillon
Oct 18 '17 at 21:16
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
|
show 1 more comment
Quite simple with the theoremprework
and theorempostwork
commands from ntheorem
:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage[thmmarks, thref, amsmath]{ntheorem}%
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
usepackage{thmtools}
begin{document}
tableofcontents
bigskip
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
bigskip
addcontentsline{toc}{chapter}{List of Theorems}
theoremlisttype{allname}
listtheorems{thm}%
end{document}
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
Thanks a lot for your immediate answer! Anyway this way strangely collides with the commandlistoftheorems
of the packagethmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.
– Erik Pillon
Oct 18 '17 at 21:16
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
|
show 1 more comment
Quite simple with the theoremprework
and theorempostwork
commands from ntheorem
:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage[thmmarks, thref, amsmath]{ntheorem}%
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
usepackage{thmtools}
begin{document}
tableofcontents
bigskip
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
bigskip
addcontentsline{toc}{chapter}{List of Theorems}
theoremlisttype{allname}
listtheorems{thm}%
end{document}
Quite simple with the theoremprework
and theorempostwork
commands from ntheorem
:
documentclass[11pt,a4paper]{book}
usepackage[utf8]{inputenc}
usepackage[T1]{fontenc}
usepackage{fourier}
usepackage{lipsum}
usepackage{amsmath}
usepackage[thmmarks, thref, amsmath]{ntheorem}%
theoremstyle{plain}
theoremprework{bigskiphrulevspace{-1.5ex}leavevmodenobreak}%leavevmode
theorempostwork{vspace*{-1ex}hrulebigskipleavevmode}
theoremheaderfont{scshape}
theorembodyfont{itshape}
theoremseparator{. }
newtheorem{thm}{Theorem}
usepackage{thmtools}
begin{document}
tableofcontents
bigskip
lipsum[1]
begin{thm}[D’Alembert-Gauss]
The field $mathbf C$ is algebraically closed.
end{thm}
lipsum[2]
bigskip
addcontentsline{toc}{chapter}{List of Theorems}
theoremlisttype{allname}
listtheorems{thm}%
end{document}
edited 1 min ago
Frenzy Li
231211
231211
answered Oct 16 '17 at 19:15
Bernard
166k769193
166k769193
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
Thanks a lot for your immediate answer! Anyway this way strangely collides with the commandlistoftheorems
of the packagethmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.
– Erik Pillon
Oct 18 '17 at 21:16
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
|
show 1 more comment
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
Thanks a lot for your immediate answer! Anyway this way strangely collides with the commandlistoftheorems
of the packagethmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.
– Erik Pillon
Oct 18 '17 at 21:16
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
The rules can get detached at page breaks and there's no spacing around the statement.
– egreg
Oct 16 '17 at 22:39
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
@egreg: For the rules at page breaks, there must be a way to avoid them that's explained somewhere in the documentation, but I can't find it. What do you mean with ‘no spacing around the statement’? I added a small negative vertical space because I found the spacing at the end too large.Could you give some details?
– Bernard
Oct 16 '17 at 22:58
Thanks a lot for your immediate answer! Anyway this way strangely collides with the command
listoftheorems
of the package thmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.– Erik Pillon
Oct 18 '17 at 21:16
Thanks a lot for your immediate answer! Anyway this way strangely collides with the command
listoftheorems
of the package thmtools
... Lualatex starts compiling the document but a certain point it get stuck and I have to force it it stop with the terminal.– Erik Pillon
Oct 18 '17 at 21:16
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
Could you post a minimal (non-)working example?
– Bernard
Oct 18 '17 at 21:18
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
I've just edited the question. Thanks.
– Erik Pillon
Oct 18 '17 at 21:33
|
show 1 more 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f396485%2fis-there-a-way-to-modify-the-theorem-environment-in-order-to-have-an-horizontal%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