Here is my MWE:
\documentclass[12pt,a4paper,oneside]{report}
\usepackage[left=2.00cm,right=2.00cm,top=2.45cm,bottom=2.5cm]{geometry}
\usepackage{amsmath,amssymb,amscd,color,enumitem}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage[amsmath,framed,thmmarks]{ntheorem}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}{}}
\lhead{\leftmark}
\rhead{\rightmark}
\cfoot{\thepage}
\renewcommand{\qed}{\qedsymbol{\blacksquare}}
\theoremstyle{marginbreak}
\theoremheaderfont{\normalfont\bfseries}\theorembodyfont{\slshape}
\theoremsymbol{\ensuremath{\diamondsuit}}
\theoremseparator{:}
\newtheorem{thm}{Theorem}[Theorem]
\theoremstyle{changebreak}
\theoremsymbol{\ensuremath{\heartsuit}}
\theoremindent0.5cm
\theoremnumbering{greek}
\newtheorem{lem}{Lemma}
\theoremindent0cm
\theoremsymbol{\ensuremath{\spadesuit}}
\theoremnumbering{arabic}
\newtheorem{cor}[thm]{Corollary}
\theoremstyle{change}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\ast}}
\theoremseparator{}
\newtheorem{exm}{Example}
\theoremstyle{plain}
\theoremsymbol{\ensuremath{\clubsuit}}
\theoremseparator{.}
\theoremprework{\bigskip\hrule}
\theorempostwork{\hrule\bigskip}
\newtheorem{defn}{Definition}
\theoremheaderfont{\sc}\theorembodyfont{\upshape}
\theoremstyle{nonumberplain}
\theoremseparator{}
\theoremsymbol{\rule{1ex}{1ex}}
\newtheorem{proof}{Proof}
\theoremstyle{change}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\ast}}
\theoremseparator{}
\newtheorem{rem}{Remark}
\theoremclass{Theorem}
\theoremstyle{break}
\theoreminframepreskip{0pt}
\theoreminframepostskip{0pt}
\theoremframepreskip{1cm}
\theoremframepostskip{1cm}
\theoremstyle{break}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=blue,linecolor=black]}
\newshadedtheorem{sthm}[Theorem]{Theorem}
\theoremclass{Proof}
\theoremstyle{nonumberbreak}
\shadecolor{red}
\def\theoremframecommand{%
\psshadowbox[fillstyle=solid,fillcolor=red,linecolor=black]}
\theoremsymbol{\rule{1ex}{1ex}}
\newshadedtheorem{sproof}{Proof}
\title{Calculus Notes}
\author{}
\date{\today}
\begin{document}
\maketitle
chapter{Limits}
\begin{sthm}[Basic Limits]
Let $b$ and $k \in \mathbb{R}$ and let $n$ be a positive integer. Then:
\begin{enumerate}
\item $\lim\limits_{x\to c}k=c$
\item $\lim\limits_{x\to c}x=c$
\item $\lim\limits_{x\to c}x^n=c^n$
\end{enumerate}
\end{sthm}
\end{document}
For the thm and sthm I keep getting the error:
No counter "theorem" defined.
If I try and add exam, defn, proof, arem, and sproof so far they are fine. But for thm and sthm I keep getting that error. I have tried adding the following line above my definition of theorem:
\newtheorem{Theorem}{Thm}
which results in a full compile without any errors, but without the theorem environment and no shading whatsoever. Any help would be appreciated. Thanks!
[Theorem]
or replace it with[chapter]
indicating that you want the theorem counter (here: thm) dominated by the chapter counter (among other things, thus will reset the thm counter at each new chapter).\newtheorem{thm}{Theorem}[Theorem]
tries to use theTheorem
counter as resetting counter forthm
. This counter is not yet defined --> Do you need this resetter at all? If no,then remove[Theorem]
, if yes, say\newcounter{Theorem}
, but you say whatTheorem
counts thenmdframed
ortcolorbox
to provide shaded/coloured theorems and having a cleaner interface?