PierreSenellart / apxproof

LaTeX package for automatically putting proof environments in appendix
LaTeX Project Public License v1.3c
23 stars 8 forks source link

Feature request: add a hook after the appendix #51

Closed vikraman closed 1 year ago

vikraman commented 1 year ago

While submitting my thesis, I needed to add a CV after the appendix, and I had to modify apxproof to allow me to insert it after the generated appendix. It would be nice if such a hook was provided. What I did was add an \appendixpost similar to \appendixprelim, and then used it like this.

\renewcommand{\appendixpost}{
  \addtocontents{toc}{%
    \protect\contentsline{chapter}{Curriculum Vitae}{}{}{}}
  \includepdf[pages=-]{cv.pdf}
}
PierreSenellart commented 1 year ago

There is also the option of putting the content in question within a toappendix environment at the end of the document. Anything wrong with this option?

vikraman commented 1 year ago

I did try toappendix but that automatically generates a new section.

PierreSenellart commented 1 year ago

Sorry for the late answer. You can use \nosectionappendix before the toappendix environment to prevent the generation of a new section.

jacob-roth commented 1 year ago

Similarly, is there a way to \label{} the apxproof-generated appendix so that it can be \cref{}ed? For example, I asked a question here

PierreSenellart commented 1 year ago

You can use:

\begin{toappendix}
  \label{apx:delayed_proofs}
\end{toappendix}

at any location that will be put in the corresponding section (in your example, for instance, you could put it just after the \section{Test} line). Just tested it, the interaction with cleveref works fine.

PierreSenellart commented 1 year ago

Closing this issue, as an \appendixpost hook can be simulated just by using the toappendix environment at the apprioriate location.

vikraman commented 1 year ago

Apologies for not responding sooner, I can confirm that using toappendix with \nosectionappendix does indeed solve my problem (though I had already submitted my thesis with the patched version).