How do you put a period after the section number using the article class?
Question
I am using the article class with the code:
\documentclass[12pt]{article}
\begin{document}
\section{Foo}
This is an example of foo.
\section{Bar}
This is an example of bar.
\end{document}
This produces:
1 Foo
2 Bar
What I want is a period after the section number:
Foo
Bar
I cannot change away from the article class. How would I accomplish this?
Solution
\renewcommand{\thesection}{\arabic{section}.}
OTHER TIPS
Use the titlesec package and put in the preamble:
\titlelabel{\thetitle.\quad}
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).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow