I am using etoolbox
and ntheorem
packages to have a custom numbering of theorems and equations. Everything works but these side errors occur:
\qedhere
command is unknown (EDIT: following some suggestions I worked something out, so the\qedhere
issue is somehow solved)- theorems title (the optional argument) is typeset in bold
As a MWE, the following code
\documentclass{book}
\usepackage{amsmath}
\usepackage{etoolbox}
\usepackage[amsmath,amsthm,framed,thmmarks]{ntheorem}
%
\renewcommand{\theequation}{\thechapter.\arabic{equation}}
\setcounter{equation}{0}
\newcounter{tempcounter}
\newtheorem{thm}{Theorem}[chapter]
%
\BeforeBeginEnvironment{thm}{\setcounter{tempcounter}{\arabic{equation}}}
\AtBeginEnvironment{thm}
{\setcounter{thm}{\thetempcounter}\subequations}
\AtEndEnvironment{thm}{\endsubequations}
%
\begin{document}
\chapter{This is a chapter}
\begin{equation}\label{Eq:A}
2+2=4
\end{equation}
\begin{thm}[First Theorem]\label{Thm:First}
\begin{equation}\label{Eq:B}
1+1=2
\end{equation}
\begin{proof}
If equation \ref{Eq:A} was trivial, equation \ref{Eq:B} in Theorem \ref{Thm:First} is even more \qedhere \\
trivial.
\end{proof}
\end{thm}
\end{document}
results in this output:
The \qedhere
command is unknown and therefore ignored. I think that the problem is a conflict between the amsthm
option in ntheorem
package and the amsthm
package. However, if I add \usepackage{amsthm}
in the preamble I get errors like
! LaTeX Error: Command \theoremstyle already defined.
and many more.
I would like either to solve the two problems listed above, or to have an alternative code in order to have:
- theorems and equations following the same numbering, resetting at each chapter
- equations in theorem environments subnumbered as shown in the above MWE's output.
Any other suggestion is highly appreciated.
\qedhere
is not among the "supported" features fromamsmath
. thentheorem
documentation states that "some features ofamsthm
have been incorporated into option[amsthm]
". the operative word here is "some". if you would like to have\qedhere
supported, i suggest writing to the authors ofntheorem
. – barbara beeton Dec 9 '12 at 15:16ntheorem
, notamsthm
(except for some features), the suggestion to ask the authors ofntheorem
to add\qedhere
wasn't intended as a real answer. however, this tex file (which does depend onamsthm
) offers some suggestions intended to enable the setting of a qed-type symbol outside ofproof
environments that may give you some ideas of how to handle the problem temporarily with manual adjustments. – barbara beeton Dec 9 '12 at 21:16\qedhere
issue. Now the question shrinks to the bold theorem title problem. – AndreasT Dec 10 '12 at 10:43