Organize counter (newtheorem)











up vote
0
down vote

favorite












I'm writing some notes and I have a problem with the organization. I defined the theorems as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

end{document}


In the text, theorems, definitions, propositions etc are in the same "counter". I mean



Theorem 1.5



Proposition 1.6



Example 1.7



I want to organize as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

chapter{ONE}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1

chapter{TWO}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1


end{document}


Is it possible to do that?










share|improve this question
























  • If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter?
    – Bernard
    Dec 2 at 23:03










  • @Bernard, yes, exactly! I did not want the theorems to be linked sections, only chapters, but I don't want to use the chapter counter too, I mean "Theorem 1.1". Just "Theorem 1" and restarting in each chapter.
    – Lucas Corrêa
    Dec 2 at 23:58

















up vote
0
down vote

favorite












I'm writing some notes and I have a problem with the organization. I defined the theorems as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

end{document}


In the text, theorems, definitions, propositions etc are in the same "counter". I mean



Theorem 1.5



Proposition 1.6



Example 1.7



I want to organize as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

chapter{ONE}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1

chapter{TWO}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1


end{document}


Is it possible to do that?










share|improve this question
























  • If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter?
    – Bernard
    Dec 2 at 23:03










  • @Bernard, yes, exactly! I did not want the theorems to be linked sections, only chapters, but I don't want to use the chapter counter too, I mean "Theorem 1.1". Just "Theorem 1" and restarting in each chapter.
    – Lucas Corrêa
    Dec 2 at 23:58















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm writing some notes and I have a problem with the organization. I defined the theorems as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

end{document}


In the text, theorems, definitions, propositions etc are in the same "counter". I mean



Theorem 1.5



Proposition 1.6



Example 1.7



I want to organize as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

chapter{ONE}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1

chapter{TWO}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1


end{document}


Is it possible to do that?










share|improve this question















I'm writing some notes and I have a problem with the organization. I defined the theorems as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

end{document}


In the text, theorems, definitions, propositions etc are in the same "counter". I mean



Theorem 1.5



Proposition 1.6



Example 1.7



I want to organize as follows:



documentclass[12pt,a4paper]{book}

theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}[teo]{Theorem}
newtheorem{coro}[teo]{Corolary}
newtheorem{lema}[teo]{Lemma}
newtheorem{prop}[teo]{Proposition}

theoremstyle{definition}
newtheorem{df}[teo]{Definition}
newtheorem{ex}[teo]{Example}
newtheorem{obs}[teo]{Remark}

begin{document}

chapter{ONE}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1

chapter{TWO}

section{1}

Proposition 1
Theorem 1

section{2}

Theorem 2
Example 1


end{document}


Is it possible to do that?







theorems counters newtheorem






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 3 at 0:02

























asked Dec 2 at 22:41









Lucas Corrêa

1084




1084












  • If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter?
    – Bernard
    Dec 2 at 23:03










  • @Bernard, yes, exactly! I did not want the theorems to be linked sections, only chapters, but I don't want to use the chapter counter too, I mean "Theorem 1.1". Just "Theorem 1" and restarting in each chapter.
    – Lucas Corrêa
    Dec 2 at 23:58




















  • If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter?
    – Bernard
    Dec 2 at 23:03










  • @Bernard, yes, exactly! I did not want the theorems to be linked sections, only chapters, but I don't want to use the chapter counter too, I mean "Theorem 1.1". Just "Theorem 1" and restarting in each chapter.
    – Lucas Corrêa
    Dec 2 at 23:58


















If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter?
– Bernard
Dec 2 at 23:03




If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter?
– Bernard
Dec 2 at 23:03












@Bernard, yes, exactly! I did not want the theorems to be linked sections, only chapters, but I don't want to use the chapter counter too, I mean "Theorem 1.1". Just "Theorem 1" and restarting in each chapter.
– Lucas Corrêa
Dec 2 at 23:58






@Bernard, yes, exactly! I did not want the theorems to be linked sections, only chapters, but I don't want to use the chapter counter too, I mean "Theorem 1.1". Just "Theorem 1" and restarting in each chapter.
– Lucas Corrêa
Dec 2 at 23:58












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Here you are: remove the optional [teo] everywhere, replace the optional [section]with[chapter], and redefinetheteo`, &c., so it doesn't include the chapter number as a prefix.



documentclass[12pt,a4paper]{book}
usepackage{amsthm}
theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}{Theorem}[chapter]
newtheorem{coro}{Corollary}[chapter]
newtheorem{lema}{Lemma}[chapter]
newtheorem{prop}{Proposition}[chapter]

renewcommand{theteo}{arabic{teo}}
renewcommand{thetheo}{arabic{theo}}
renewcommand{thecoro}{arabic{coro}}
renewcommand{thelema}{arabic{lema}}
renewcommand{theprop}{arabic{prop}}

theoremstyle{definition}
newtheorem{df}{Definition}[chapter]
newtheorem{ex}{Example}[chapter]
newtheorem{obs}{Remark}[chapter]
renewcommand{thedf}{arabic{df}}
renewcommand{theex}{arabic{ex}}
renewcommand{theobs}{arabic{obs}}

begin{document}

chapter{ONE}

section{1}
begin{prop}
Proposition 1
end{prop}
begin{theo}
A first theorem
end{theo}

section{2}

begin{theo}
Another theorem
end{theo}
begin{ex}
A funny example.
end{ex}

chapter{TWO}

section{1}

begin{prop}
Another proposition.
end{prop}

begin{theo}
A first theorem in chap. two
end{theo}

section{2}

begin{theo}
A second theorem in chap. two
end{theo}
begin{ex}
A silly example.
end{ex}

end{document}


enter image description here



enter image description here






share|improve this answer





















  • I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
    – Lucas Corrêa
    Dec 3 at 0:38












  • I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
    – Bernard
    Dec 3 at 0:45











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',
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462869%2forganize-counter-newtheorem%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








up vote
1
down vote



accepted










Here you are: remove the optional [teo] everywhere, replace the optional [section]with[chapter], and redefinetheteo`, &c., so it doesn't include the chapter number as a prefix.



documentclass[12pt,a4paper]{book}
usepackage{amsthm}
theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}{Theorem}[chapter]
newtheorem{coro}{Corollary}[chapter]
newtheorem{lema}{Lemma}[chapter]
newtheorem{prop}{Proposition}[chapter]

renewcommand{theteo}{arabic{teo}}
renewcommand{thetheo}{arabic{theo}}
renewcommand{thecoro}{arabic{coro}}
renewcommand{thelema}{arabic{lema}}
renewcommand{theprop}{arabic{prop}}

theoremstyle{definition}
newtheorem{df}{Definition}[chapter]
newtheorem{ex}{Example}[chapter]
newtheorem{obs}{Remark}[chapter]
renewcommand{thedf}{arabic{df}}
renewcommand{theex}{arabic{ex}}
renewcommand{theobs}{arabic{obs}}

begin{document}

chapter{ONE}

section{1}
begin{prop}
Proposition 1
end{prop}
begin{theo}
A first theorem
end{theo}

section{2}

begin{theo}
Another theorem
end{theo}
begin{ex}
A funny example.
end{ex}

chapter{TWO}

section{1}

begin{prop}
Another proposition.
end{prop}

begin{theo}
A first theorem in chap. two
end{theo}

section{2}

begin{theo}
A second theorem in chap. two
end{theo}
begin{ex}
A silly example.
end{ex}

end{document}


enter image description here



enter image description here






share|improve this answer





















  • I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
    – Lucas Corrêa
    Dec 3 at 0:38












  • I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
    – Bernard
    Dec 3 at 0:45















up vote
1
down vote



accepted










Here you are: remove the optional [teo] everywhere, replace the optional [section]with[chapter], and redefinetheteo`, &c., so it doesn't include the chapter number as a prefix.



documentclass[12pt,a4paper]{book}
usepackage{amsthm}
theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}{Theorem}[chapter]
newtheorem{coro}{Corollary}[chapter]
newtheorem{lema}{Lemma}[chapter]
newtheorem{prop}{Proposition}[chapter]

renewcommand{theteo}{arabic{teo}}
renewcommand{thetheo}{arabic{theo}}
renewcommand{thecoro}{arabic{coro}}
renewcommand{thelema}{arabic{lema}}
renewcommand{theprop}{arabic{prop}}

theoremstyle{definition}
newtheorem{df}{Definition}[chapter]
newtheorem{ex}{Example}[chapter]
newtheorem{obs}{Remark}[chapter]
renewcommand{thedf}{arabic{df}}
renewcommand{theex}{arabic{ex}}
renewcommand{theobs}{arabic{obs}}

begin{document}

chapter{ONE}

section{1}
begin{prop}
Proposition 1
end{prop}
begin{theo}
A first theorem
end{theo}

section{2}

begin{theo}
Another theorem
end{theo}
begin{ex}
A funny example.
end{ex}

chapter{TWO}

section{1}

begin{prop}
Another proposition.
end{prop}

begin{theo}
A first theorem in chap. two
end{theo}

section{2}

begin{theo}
A second theorem in chap. two
end{theo}
begin{ex}
A silly example.
end{ex}

end{document}


enter image description here



enter image description here






share|improve this answer





















  • I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
    – Lucas Corrêa
    Dec 3 at 0:38












  • I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
    – Bernard
    Dec 3 at 0:45













up vote
1
down vote



accepted







up vote
1
down vote



accepted






Here you are: remove the optional [teo] everywhere, replace the optional [section]with[chapter], and redefinetheteo`, &c., so it doesn't include the chapter number as a prefix.



documentclass[12pt,a4paper]{book}
usepackage{amsthm}
theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}{Theorem}[chapter]
newtheorem{coro}{Corollary}[chapter]
newtheorem{lema}{Lemma}[chapter]
newtheorem{prop}{Proposition}[chapter]

renewcommand{theteo}{arabic{teo}}
renewcommand{thetheo}{arabic{theo}}
renewcommand{thecoro}{arabic{coro}}
renewcommand{thelema}{arabic{lema}}
renewcommand{theprop}{arabic{prop}}

theoremstyle{definition}
newtheorem{df}{Definition}[chapter]
newtheorem{ex}{Example}[chapter]
newtheorem{obs}{Remark}[chapter]
renewcommand{thedf}{arabic{df}}
renewcommand{theex}{arabic{ex}}
renewcommand{theobs}{arabic{obs}}

begin{document}

chapter{ONE}

section{1}
begin{prop}
Proposition 1
end{prop}
begin{theo}
A first theorem
end{theo}

section{2}

begin{theo}
Another theorem
end{theo}
begin{ex}
A funny example.
end{ex}

chapter{TWO}

section{1}

begin{prop}
Another proposition.
end{prop}

begin{theo}
A first theorem in chap. two
end{theo}

section{2}

begin{theo}
A second theorem in chap. two
end{theo}
begin{ex}
A silly example.
end{ex}

end{document}


enter image description here



enter image description here






share|improve this answer












Here you are: remove the optional [teo] everywhere, replace the optional [section]with[chapter], and redefinetheteo`, &c., so it doesn't include the chapter number as a prefix.



documentclass[12pt,a4paper]{book}
usepackage{amsthm}
theoremstyle{plain}
newtheorem{teo}{Teorema}[chapter]
newtheorem{theo}{Theorem}[chapter]
newtheorem{coro}{Corollary}[chapter]
newtheorem{lema}{Lemma}[chapter]
newtheorem{prop}{Proposition}[chapter]

renewcommand{theteo}{arabic{teo}}
renewcommand{thetheo}{arabic{theo}}
renewcommand{thecoro}{arabic{coro}}
renewcommand{thelema}{arabic{lema}}
renewcommand{theprop}{arabic{prop}}

theoremstyle{definition}
newtheorem{df}{Definition}[chapter]
newtheorem{ex}{Example}[chapter]
newtheorem{obs}{Remark}[chapter]
renewcommand{thedf}{arabic{df}}
renewcommand{theex}{arabic{ex}}
renewcommand{theobs}{arabic{obs}}

begin{document}

chapter{ONE}

section{1}
begin{prop}
Proposition 1
end{prop}
begin{theo}
A first theorem
end{theo}

section{2}

begin{theo}
Another theorem
end{theo}
begin{ex}
A funny example.
end{ex}

chapter{TWO}

section{1}

begin{prop}
Another proposition.
end{prop}

begin{theo}
A first theorem in chap. two
end{theo}

section{2}

begin{theo}
A second theorem in chap. two
end{theo}
begin{ex}
A silly example.
end{ex}

end{document}


enter image description here



enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 3 at 0:22









Bernard

164k769192




164k769192












  • I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
    – Lucas Corrêa
    Dec 3 at 0:38












  • I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
    – Bernard
    Dec 3 at 0:45


















  • I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
    – Lucas Corrêa
    Dec 3 at 0:38












  • I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
    – Bernard
    Dec 3 at 0:45
















I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
– Lucas Corrêa
Dec 3 at 0:38






I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like?
– Lucas Corrêa
Dec 3 at 0:38














I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
– Bernard
Dec 3 at 0:45




I think you should define a new theorem style. Package thmtools may help. Other than that, ntheorem has built-in nonumberplain and nonumberbreak theorem styles.
– Bernard
Dec 3 at 0:45


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462869%2forganize-counter-newtheorem%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

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents