5

Similar questions have been answered but the solutions didn't seem to give what I need.

I would like theorems and equations both to proceed as follows within each section.

Say we've begun Section 6. If I started with a theorem, it'd be Theorem 6.1. Then if I next used an equation, it would show up with numbering (6.2). The next equation or theorem (whichever is first) would be 6.3, and so on.

  • Welcome to TeX.SE. It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. And sometimes the solutions depend on the packages being used. – Peter Grill May 8 '14 at 2:01
7

Using

\numberwithin{equation}{section}

(requires amsmath) makes the section counter to be used as prefix for equations, and then

\newtheorem{theorem}[equation]{Theorem}

makes theorem share the equation counter. A complete example

\documentclass{article}
\usepackage{amsthm}
\usepackage{amsmath}

\numberwithin{equation}{section}
\newtheorem{theorem}[equation]{Theorem}

\begin{document}

\section{Test section}
\begin{theorem}
test theorem
\end{theorem}

\begin{equation}
a=b
\end{equation}

\begin{theorem}
test theorem
\end{theorem}

\begin{align}
a &= b \\
&= c
\end{align}

\end{document}

enter image description here

Your Answer

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

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