[Tex/LaTex] how can I get a period right after a theorem number when using \swapnumbers

amsthmnumberingtheorems

I am trying to mimic lecture notes formatted like this:

http://ocw.mit.edu/courses/mathematics/18-01-single-variable-calculus-fall-2005/lecture-notes/lecture_25.pdf

I would like to format a theorem style which produces the same result as the line

  1. Inverse hyperbolic functions.

in the above pdf. So far I've been trying to keep it simple with the amsthm package, as I'm having a hard time finding a way to do this with ntheorem or thmtools.

My first attempt was to use \swapnumbers with the following theorem definition:

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

\swapnumbers
\newtheoremstyle{numberfirst}
{}
{}
{}
{}
{\bfseries}
{.}
{.5em}
%
{\thmnote{#3}}

\theoremstyle{numberfirst}
\newtheorem{varthm}{.}

\begin{document}

\begin{varthm}[The angle between vectors]

Let $\vec{u} = \langle {u_1, u_2} \rangle$ and $\vec{v} = \langle {v_1, v_2}
\rangle$ be two vectors in $\mathbb{R}^2$, and consider the triangle formed by
connecting the heads of $\vec{u}$ and $\vec{v}$.  The third side of this triangle is 
$\vec{u} - \vec{v}$.\footnote{We could also use $\vec{v} - \vec{u}$.  Either will 
suffice because we are only interested in its magnitude.} Let $\theta$ be the angle 
between $\vec{u}$ and $\vec{v}$, opposite $\vec{u} - \vec{v}$.  

\end{varthm}

\end{document}

The other result comes from commenting out \swapnumbers, which is actually closer to what I want, but now the numbering disappears!

Best Answer

For me the first flaw in your mwe is the usage of \newtheorem. You are using \newtheorem{varthm}{.}. However the correct syntax as explained in the documentation is:

\newtheorem{name}{Printed output}

So your period is wrong. Related I think the correct syntax is

\newtheorem{varthm}{Varthm}

The command \swapnumbers (explained in the documentation) places the theorem number at the beginning of the heading instead of at the end. The command affects only common theorem styles.

The command \newtheoremstyle is a suitable way to specify the behaviour of a theorem environment. It has 9 mandatory arguments whereby the last argument specifies the heading. At this point it's important to highlight that the command \swapnumbers disables the declaration of the ninth argument of \newtheoremstyle. So related to your needs I suggest the following avoiding \swapnumbers and playing with the ninth argument:

\newtheoremstyle{numberfirst}
 {}%space above
 {}%space below
 {}%body font
 {}%Indent amount
 {\bfseries}%Theorem head font
 {}%Punctuation after theorem head
 {.5em}%Space after theorem head
 {#2.~\thmnote{#3}}%Theorem head spec
\theoremstyle{numberfirst}
\newtheorem{varthm}{Varthm}