I would greatly prefer sticking with using the apxproof package as otherwise I would be forced to migrate all of my proofs in my document manually. If I can redefine the numbering somehow to add the word 'Appendix' it would be much easier. There is a \appendixsectionformat command that can be redefined but this only changes what happens after the "A." part of the appendix section headings. I.e., "A. [Changes the text here]".

For example, the following code

\usepackage[bibliography = common]{apxproof}
\usepackage{amsmath, amsthm}




\begin{theorem} \label{theorem:label} This is an example theorem.
\begin{toappendix} % This is from the apxproof package
\begin{proof}[\hypertarget{proof:theorem:label}{Proof of Theorem \ref{theorem:label}}] 

The proof goes here.



will generate a document that creates sections "1. Introduction", "2. Main", and then "A. Proofs for Section 2 (Main)". The Theorem statement appears in section 2 but its proof appears in the appendix A. My goal is for the appendix section heading to instead state "Appendix A. Proofs for Section 2 (Main)".

From the apxproof documentation, the current appearance might look like as follows (replace the word 'Usage' with 'Main' and 'Foobar' with 'Theorem'): enter image description here

If relevant, I found this in the .sty file for apxproof:

        \expandonce{\csname axp@protectref@\roman{axp@seccounter}\endcsname}{%
            \expandonce{\csname axp@protectref@\roman{axp@seccounter}\endcsname}%

I'm wondering if this is where the modification can be done, and how I can modify this part of the code if so.

  • 1
    Welcome to TeX.SE! Please show us a short compilable TeX code resulting in your issue and mark in an screenshot of the result what you want to change. Then we do not have to guess what you are doing ...
    – Mensch
    Jan 27 at 22:57
  • @Mensch Thanks for the suggestion, I have added sample code + screenshot that should make the issue clearer. Jan 27 at 23:32

1 Answer 1


Here is one fix:

For each section that has a corresponding appendix section, you can insert the following code.

\section{My first section with proofs}\label{first:section}

   \section*{Appendix A. Proofs for Section \ref{first:section}}
   % This version removes the numbering from the table of contents/document outline

% Your theorems/proofs go here

\section{My second section with proofs}\label{second:section}

   \section*{Appendix B. Proofs for Section \ref{second:section}}
   \addcontentsline{toc}{section}{\protect\numberline{}Appendix B. Proofs for Section \ref{second:section} (My second section with proofs)} 
   % This version adds back in the numbering to the table of contents / document outline, as well as sets equation numbering

It is important you use \section* otherwise the apxproof package will append its own numbering, e.g., 'A. Appendix A.' However, this means you will lose the numbering and appearance in the table of contents. To solve this, use the second example, where \addcontentsline allows you to manually reinsert in the numbering into the table of contents. Moreover, you will also lose the section part of the equation numbering. For example, in appendix A, your equation labels will look like (.1), (.2) instead of (A.1), (A.2). The \renewcommand{\theequation}{B.\arabic{equation}} line added in the second appendix section above will give equation labels the proper numbering (B.1), (B.2), and so-on..

This is a somewhat manual solution, but you only have to do this once per appendix required. If you just have proofs in one section, for example, you only need to manually add this code once. There may be a way to get the actual section heading text when using the \addcontentsline but I am unaware of such a solution. But most importantly, this lets you leave the location of the theorems/proofs in the text untouched.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .