Text FormattingCustom Numbering for theorem-like Environments

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
bzdb
Posts: 1
Joined: Mon Jun 17, 2013 8:56 am

Custom Numbering for theorem-like Environments

Post by bzdb »

I am new at the forum. So, hey to everyone. :)

I want to number definitions, lemmas and theorems on the left side of the paper, like 2.4. lemma, 2.5. theorem, etc. But equations numbers still be on the right.

How can I do this?

Thank you very much.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Custom Numbering for theorem-like Environments

Post by localghost »

If I understand you right, the below code (with some examples) should do what you want.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools} % loads »amsmath«
\usepackage{amsthm}

\swapnumbers
\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\theoremstyle{definition}
\newtheorem{definition}{Definition}

\begin{document}
  \begin{theorem}[Einstein]
    \begin{equation}
      E=mc^2
    \end{equation}
  \end{theorem}

  \begin{lemma}[Binomi]
    \begin{subequations}
      \begin{align}
        (a+b)^2 &= a^2+2ab+b^2 \\
        (a+b)^2 &= a^2+2ab+b^2 \\
        (a+b)(a-b) &= a^2-b^2
      \end{align}
    \end{subequations}
  \end{lemma}

  \begin{definition}[Schroedinger]
    \begin{equation}
      i\hbar\,\frac{\partial}{\partial t}\,|\psi(t)\rangle = \hat{H}|\psi(t)\rangle
    \end{equation}
  \end{definition}
\end{document}
Please take a look at the manuals of the involved packages, especially amsthm in this case.

If that doesn't help, kindly prepare a self-contained and minimal example to give an adequate problem description along with the setup of your document.


Best regards and welcome to the board
Thorsten
Post Reply