2

This question already has an answer here:

\newtheorem{thm}{Theorem}[section] 
\newtheorem{defn}{Definition}[section] 

\begin{defn}
--some text
\end{defn}

\begin{thm}
--some text
\end{thm}

when using the above commands i get as output the following code:

Definition 1.1 Theorem 1.1

But i want as output the following values: Definition 1.1 Theorem 1.2

Every time theorem and definition is used only the decimal values should be incremented. How can i do this?

marked as duplicate by egreg tex-core Sep 12 '15 at 17:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

Use the optional argument to say defnshould be numbered like thm

\documentclass{article}

\newtheorem{thm}{Theorem}[section] 
\newtheorem{defn}[thm]{Definition}

\begin{document}

\section{zzz}

\begin{defn}
--some text
\end{defn}

\begin{thm}
--some text
\end{thm}

\end{document}

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