# Prevent a new line before a theorem

Is there any way not to start a new line for a theorem? For example, in the following example, I would like the word Theorem to be on the same line as the number 1.

\documentclass[12pt,letterpaper]{article}
\usepackage{amsmath}
\usepackage{amsthm}

\begin{document}
\newtheorem*{theorem}{Theorem}
\begin{enumerate}
\item
\begin{theorem}
$a^2 + b^2 = c^2$.
\end{theorem}
\end{enumerate}
\end{document}


The code above produces the following:

• Instead of \newtheorem* use \newtheorem to get the number. If you want the number first, then tweak the style. Using enumerate is not good. Can you explain your use case? – user11232 Oct 5 '15 at 4:57
• if you want the theorem numbers before "Theorem", use \swapnumbers. see the documentation: texdoc amsthm. – barbara beeton Oct 5 '15 at 14:15

One could set up a theorem-like environment, called shortthm in the example below, that starts off with "Theorem." and places its contents in emphasized (italic) mode.

\documentclass[12pt,letterpaper]{article}
\newenvironment{shortthm}{\textbf{Theorem.}\space\em}{\par}
\begin{document}

\begin{enumerate}
\item  \begin{shortthm}
Pythagoras showed that $a^2 + b^2 = c^2$.
\end{shortthm}
\item  \begin{shortthm}
Euler showed that $e^{i\pi}-1=0$.
\end{shortthm}
\end{enumerate}

\end{document}

• there wasn't a number after "Theorem" in the question. seems to me that \swapnumbers is what's really wanted, although the question really isn't clear. – barbara beeton Oct 5 '15 at 14:16
• @barbarabeeton - Good catch! For unnumbered "short" theorem environments, the code becomes even simpler. Will post an update shortly. – Mico Oct 5 '15 at 14:30