Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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!

share|improve this question
2  
It seems that without \swapnumbers the last argument of \newtheoremstyle should be: {#2#1 \thmnote{#3}} –  Marco Daniel Jun 13 '13 at 19:17
    
Okay, that worked perfectly. Thank you! So I am clear on this, the #2 takes care of the numbering, the #1 takes care of the theorem name, which I have specified to be just a period after {varthm}{.}, and the final period comes from the puncutation after thm head given in the definition itself. –  Abbas Jaffary Jun 13 '13 at 19:33
    
All arguments are explained in the documentation of amsthm. –  Marco Daniel Jun 13 '13 at 19:39

1 Answer 1

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}
share|improve this answer
1  
The period in "indent amount" is wrong: it should be either empty (meaning zero) or a length. You can leave empty the second mandatory argument to \newtheorem, as the string Varthm is never used. A period should be added after #3: \thmnote{#3.} –  egreg Aug 18 '13 at 13:12
    
@egreg: Indeed. Thanks –  Marco Daniel Aug 18 '13 at 13:13
    
I'm sorry I just saw this response. Thank you both very much! –  Abbas Jaffary Oct 11 '13 at 20:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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