Common numbering with ntheorem
This does not require introduction of new counters at all. \newtheorem
has two syntaxes
\newtheorem{myname}{Heading}[countwithin]
and
\newtheorem{myname}[usecounter]{Heading}
So if you set up your first theorem definition to be counted within subsection
, and then tell the other environments to use the counter of your first environment you will get the desired numbering. Here is a cut down version of the code with irrelevant formatting etc. removed:
\documentclass{article}
\usepackage{amssymb}
\usepackage[thmmarks]{ntheorem}
\theoremstyle{plain}
\newtheorem{example}{Example}[subsection]
\newtheorem{remark}[example]{Remark}
\newtheorem{theorem}[example]{Theorem}
\newtheorem{prop}[example]{Proposition}
\newtheorem{corollary}[example]{Corollary}
\newtheorem{lemma}[example]{Lemma}
\begin{document}
\section{First section}
\subsection{First subsection}
\begin{theorem}
Theorem
\end{theorem}
\begin{prop}
Proposition
\end{prop}
\begin{lemma}
Lemma
\end{lemma}
\subsection{Second subsection}
\begin{theorem}
Theorem
\end{theorem}
\begin{prop}
Proposition
\end{prop}
\begin{lemma}
Lemma
\end{lemma}
\section{Second section}
\subsection{Next subsection}
\begin{theorem}
Theorem
\end{theorem}
\begin{prop}
Proposition
\end{prop}
\begin{lemma}
Lemma
\end{lemma}
\subsection{Last subsection}
\begin{theorem}
Theorem
\end{theorem}
\begin{prop}
Proposition
\end{prop}
\begin{lemma}
Lemma
\end{lemma}
\end{document}
From your code, it seems that you want each of the theorem-like
environments to inherit the subsection
counter. As such, I have used
\newcounter{dummy}
\numberwithin{dummy}{subsection}
in the below.
Note that you can use
\newtheorem{example}[dummy]{Example}
which tells the newtheorem
command to make the example
counter inherit the dummy
counter, but not
\newtheorem{example}{Example}[dummy][subsection]
as this is undefined.
Here's the complete MWE:
\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage[thmmarks]{ntheorem}
\newcounter{dummy}
\numberwithin{dummy}{subsection}
\theoremprework{\setlength
\theorempreskipamount{10 pt}\setlength\theorempostskipamount{10 pt}}
\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\clubsuit}}
\theoremseparator{:}
\newtheorem{example}[dummy]{Example}
\theoremstyle{plain}
\theorembodyfont{\upshape}
\theoremsymbol{\ensuremath{\blacklozenge}}
\theoremseparator{:}
\newtheorem{remark}[dummy]{Remark}
\theoremprework{\setlength\theorempreskipamount{10 pt}}
\theoremstyle{plain}
\theorembodyfont{\slshape}
\theoremsymbol{}
\theoremseparator{:}
\newtheorem{theorem}[dummy]{Theorem}
\theoremstyle{plain}
\theorembodyfont{\slshape}
\theoremsymbol{}
\theoremseparator{:}
\newtheorem{prop}[dummy]{Proposition}
\theoremstyle{plain}
\theoremheaderfont{\upshape \bfseries}
\theorembodyfont{\slshape}
\theoremsymbol{}
\theoremseparator{:}
\newtheorem{corollary}[dummy]{Corollary}
\theoremstyle{plain}
\theoremheaderfont{\upshape \bfseries}
\theorembodyfont{\slshape}
\theoremsymbol{}
\theoremseparator{:}
\newtheorem{lemma}[dummy]{Lemma}
\begin{document}
\section{Section}
\subsection{SubSection}
\begin{theorem} Hey
\end{theorem}
\begin{lemma}I
\end{lemma}
\begin{prop}Just
\end{prop}
\begin{remark}Met
\end{remark}
\begin{example}You
\end{example}
\subsection{SubSection}
\begin{theorem} Hey
\end{theorem}
\begin{lemma}I
\end{lemma}
\begin{prop}Just
\end{prop}
\begin{remark}Met
\end{remark}
\begin{example}You
\end{example}
\end{document}