0

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?

  • If I understand well, all theorem-like environment should each have its own counter, which should be reset per chapter? – Bernard Dec 2 '18 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. – Corrêa Dec 2 '18 at 23:58
1

Here you are: remove the optional [teo] everywhere, replace the optional [section]with[chapter], and redefine\theteo`, &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

  • I got it, perfect! Thank you! A curiosity: using rennewcommand, is possible remove the numbers of theorem-like? – Corrêa Dec 3 '18 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 '18 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.