[Tex/LaTex] How to have Appendix A continue by Appendix B


I want to make Appendix A continue by Appendix B. This is the command I used:

\include{appendixA} \label{appendixprocedure}

\include{appendixB} \label{appendixlinearization}

But I got both in the naming Appendix A.

Best Answer

The only way I can reproduce this problem is by including the \appendix command inside your appendixA.tex and appendixB.tex. Here's an example that replicates this (even though it's an article without \includes, the principle remains the same):

enter image description here




\section{A section}

\section{An appendix}

\section{Another appendix}


If this is what you're doing, you're doing it wrong. \appendix resets appendix-specific counters (which may depend on your document class). Here's what \appendix does in book and report (comments added):

  \setcounter{chapter}{0}% <--- Reset chapter counter
  \setcounter{section}{0}% <--- Reset section counter

article does something similar, only one level down:

  \setcounter{section}{0}% <--- Reset section counter
  \setcounter{subsection}{0}% <--- Reset subsection counter

It is obvious that \appendix reset the main appendix counters, so including it as part of every appendix unit is incorrect. Only use it once to demarcate the end of your regular chapters and the start of the appendices.

In conclusion, remove \appendix from your appendixA.tex and appendixB.tex.

Some things to note in your code:

  • Your \labels might not reference the correct location within your document, as it is only called at the end of every appendix.

  • \newpage does not take an argument, so don't use \newpage{..}.

  • If you want a blank (no header/footer) page between your appendices, consider reading Really blank pages between chapters or creating a page break command.

Related Question