0

I use ntheorem and define two theorem-like environments ("Theorem" and "Lemma") that share the same counter which is reset for every section. Moreover I have a proof-environment that has no counter at all.

At the same time I include thm-restate because I need to repeat a particular theorem.

Even if I do not use thm-restate but simply load the package, the lemma environment does not print its counter. If thm-restate is not loaded the output is as expected. Alternatively, if I omit switching the theorem style to nonumberplain for the proof-environment the counter is printed, too. However, in this case the proof gets numbered, too, which is not desired.

The MWE below yields

  • List item
  • Theorem 1.1
  • Lemma
  • Theorem 1.3
  • Proof

expected output is

  • Theorem 1.1
  • Lemma 1.2
  • Theorem 1.3
  • Proof

This means, the shared counter is correctly incremented but not printed.

\documentclass[american]{article}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[thmmarks,thref]{ntheorem}
% Option 1: Either do no use 'thm-restate' and 'lemma' will be numbered
\usepackage{thm-restate}



\theoremstyle{plain}
\theoremheaderfont{\normalfont\bfseries}
\theoremseparator{}
\theorembodyfont{\normalfont\itshape}
\theoremsymbol{}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
% Option 2: or do not use 'nonumberplain' and 'lemma' will be numbered
\theoremstyle{nonumberplain}
\theoremheaderfont{\normalfont\scshape}
\theoremseparator{}
\theorembodyfont{\normalfont\upshape}
\theoremsymbol{\rule{1ex}{1ex}}
\newtheorem{proof}{Proof}



\begin{document}

\section{Header}

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
Curabitur dictum gravida mauris.

\begin{theorem}[Suprising Result]
Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna.
Donec vehicula augue eu neque.
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
\end{theorem}

\begin{lemma}[Trivial Conclusion]
Mauris ut leo.
Cras viverra metus rhoncus sem.
Nulla et lectus vestibulum urna fringilla ultrices.
\end{lemma}

\begin{theorem}[Awesome Result]
Phasellus eu tellus sit amet tortor gravida placerat.
Integer sapien est, iaculis in, pretium quis, viverra ac, nunc.
Praesent eget sem vel leo ultrices bibendum.
\end{theorem}

\begin{proof}
Aenean faucibus.
Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla.
Curabitur auctor semper nulla.
\end{proof}

\end{document}

Your Answer

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

Browse other questions tagged or ask your own question.