9

I am writing a paper in the "article" document class.

When it proceeds to my appendix, I would like the two sections to have titles to appear as "Appendix A. Some notation" and "Appendix B. Some more notation". So I trited

\appendix                                     
\section{Some notation}
\section{Some more notation}

However, I got "A Some notation" and "B Some more notation" as titles. How can I fix this problem?

I read through old relevant threads, but the answers do not seem to work well.

  • Please edit your post to provide a complete, small document people can copy-paste-compile. That is a lot more useful than a mere fragment. In what way didn't they work well? What specifically did you try? – cfr Feb 4 '15 at 13:42
15

The title option and the appendices environment of the appendix package can do that:

\documentclass{article}

\usepackage[title]{appendix}

\begin{document}

\section{title 1}
\section{title 2}

\begin{appendices}
\section{Some Notation}

\section{Some More Notation}
\end{appendices}

\end{document}

enter image description here

  • what if I want a period (as OP)? [Appendix A. Some notation] instead of [Appendix A Some notation]? – Seub Oct 16 at 23:37
  • You can add this, just after begin{appendices}: \makeatletter \def\@seccntformat{\appendixname\ % \csname thesection\endcsname. \quad} \makeatother. – Bernard Oct 17 at 0:49
  • Sorry, can you clarify, maybe in your answer or something? It doesn't quite work when I paste, I must do something wrong. Should there be a % there? – Seub Oct 17 at 2:40
  • @Seub: Indeed, in my code there is a % at the end of the line (to prevent some spurious space or any other side effects), and I didn't notice that in comments, line breaks disappeared. – Bernard Oct 17 at 9:43

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.