PierreSenellart / apxproof

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

Appendix sectioning incompatibility with existing appendix #48

Closed ghost closed 2 years ago

ghost commented 2 years ago

I'm using theoremrep to put my proofs in the appendix, but I have other things in the appendix as well. The two don't seem to get along: my own appendix sections start with A, B, C, ..., and so on, but then the proof appendix starts with A, B, C, ... and so on. That is, I have two appendix sections A, two appendix section B, etc.

Is there any way I can force the proof sectioning to not start over at A? Or alternatively to put my own appendix after the proof appendices?

PierreSenellart commented 2 years ago

It should work if you use \begin{toappendix} ... \end{\toappendix} around your appendix material instead of using \appendix manually. Can you see if this behaves as you want it to? If not, can you please provide a minimal complete example?

ghost commented 2 years ago

Well, that's embarrassing: it works perfectly! Thanks.

ghost commented 2 years ago

Oops, perhaps I spoke too soon. When I use \begin{toappendix} ... \end{toappendix}, it makes appendix sections even for sections that do not have any proofs in them. The proof-less sections do not have any corresponding appendix section when using \appendix.

Here's an example. Replace \begin{toappendix} ... \end{toappendix} with\appendix (or merely comment out \begin{toappendix} ... \end{toappendix}) to see the difference (exhibits this behavior on Overleaf, anyway).

\documentclass[12pt]{article}

\usepackage{apxproof}
\newtheoremrep{prop}{Proposition}

\begin{document}

\section{Introduction to Goats} 
Goats are cool. Here's proof.
\begin{proprep}
    If a goat can float, then a goat has no need for a boat in a moat.
\end{proprep}
\begin{proof}
We find this proposition to be self-evident.
\end{proof}

\section{Conclusion}
Goats are pretty neat.

\begin{toappendix}
\end{toappendix}

\end{document}
PierreSenellart commented 2 years ago

Add \nosectionappendix before the \begin{toappendix}; alternatively, if the content of \begin{toappendix} starts with a \section command, there should not be an empty section created.

ghost commented 2 years ago

Thank you, both do the trick. (Even having an empty line between \begin{toappendix} and \section will lead to the creation of an appendix section for the proof-less section.)