5

So I downloaded a nice looking article template which has a custom look for section titles. But now the number next to the References header is the same as that of the last section.

How do I fix this? Showing no number at all has my preference, but showing the correct section number is fine too.

\documentclass[twoside]{article}
\usepackage{titlesec}% Allows customization of titles
\titleformat{\section}[block]{\large\scshape\centering{\Roman{section}.}}{}{1em}{} % Change the look of the section titles 

\begin{document}

\section{Introduction}
\subsection{Problem description}

Blah blah blah.
\subsection{Another section}

Another section.
\begin{thebibliography}{9}

\bibitem{ref}
  some reference.
\end{thebibliography}

\end{document}
4

Use \titleformat{name=\section,numberless} to change the format of unnumbered sections (here: the bibliography).

\documentclass[twoside]{article}
\usepackage{titlesec}
\titleformat{\section}[block]{\large\scshape\centering{\Roman{section}.}}{}{1em}{}
\titleformat{name=\section,numberless}[block]{\large\scshape\centering}{}{0pt}{}

\begin{document}

\section{Introduction}
\subsection{Problem description}

Blah blah blah.
\subsection{Another section}

Another section.
\begin{thebibliography}{9}

\bibitem{ref}
  some reference.
\end{thebibliography}

\end{document}

enter image description here

  • Hey, cool output image. How did you do that, just a screenshot or can StackExchange interpret LaTeX? – Maarten Dec 6 '12 at 12:36
  • @Maarten Just a cropped screenshot. – lockstep Dec 6 '12 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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