I am using the article class with the code:


This is an example of foo.
This is an example of bar.

This produces:

1 Foo

2 Bar

What I want is a period after the section number:

  1. Foo

  2. Bar

I cannot change away from the article class. How would I accomplish this?


Not sure, since I have still no latex in my, reformatted, pc but it should be something like:

\def\thesection {\arabic{section}.}

You should put it in preamble of document. Absolutely not sure about correctness (no way to try it now).

Nope, this adds the period after a \ref{} as well.
Will Robertson
+1  A: 
Alex Brasetvik
You do **NOT** want to do this! Definitely not the right answer: `\documentclass{article} \begin{document} \renewcommand\thesection{\arabic{section}.} \section{foo}\label{foo} this is section~\ref{foo}.\end{document}`
Will Robertson
it worked, kind of. I wrote another line of code to remove the "." from the subsection command. Using just this line of code with the subsection command got me 2..1 Bar. I changed it though. it's hacky, but it worked.
+5  A: 

Use the titlesec package and put in the preamble:

Cirno de Bergerac
This is the right way to do it. I highly recommend titlesec.
Will Robertson