1

I was wondering how the format for numbering statements can be changed so that the statement number precedes the word "Theorem" or "Definition". For example, I use the following code:

\newtheorem{Theorem}[Lemma]{Theorem}
\begin{Theorem} \label{thmOnSomething} 
Here is the theorem statement.
\end{Theorem}

The output looks like this:

Theorem 1.2.27 Here is the theorem statement.

How can I change the code so that the output is as follows:

1.2.27. Theorem: Here is the theorem statement.

  • Do you load amsthm or any other related package. Please add a complete minimal working example. – Marco Daniel Nov 3 '13 at 8:05
  • if you're using amsthm, just insert \swapnumbers before the first \newtheorem. documented in the user's guide: texdoc amsthdoc. – barbara beeton Nov 3 '13 at 8:22
1

In the base LaTeX the solution may be as follows:

\documentclass{book}

\begin{document}


\chapter{One}
\section{Oneone}


\makeatletter
\def\@begintheorem#1#2{\trivlist
%   \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape}
\item[\hskip \labelsep{\bfseries #2.\ #1:}]\itshape}
\makeatother

\newtheorem{tw}{Theorem}[section]

\begin{tw}
1+1=2
\end{tw}

\section{Twotwo}

\begin{tw}
1+1=2
\end{tw}

\end{document}

enter image description here

Because the style of numbering depends on class, there is a full example with the class book. The main trick is in the line below the commented one.

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.