PierreSenellart / apxproof

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

Incompatibility with tocbibind #47

Closed a3nm closed 3 years ago

a3nm commented 3 years ago

Hi Pierre,

Some people use the tocbibind package to ensure that the "References" section created by Bibtex shows up in the table of contents. See for instance https://tex.stackexchange.com/a/8459.

However, this causes a cryptic compilation error together with apxproof unless using bibliography=common. Here is a MWE:

\documentclass{article}

\usepackage{tocbibind}
\usepackage{apxproof}

\begin{document}

\bibliographystyle{plain}
\bibliography{biblio}

\end{document}

Running latexmk -pdf gives the error:

) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./main.axp)
(./bu1.aux) (./bu1.bbl

! LaTeX Error: \begin{thebibliography} on input line 1 ended by \end{thebibitem
list}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.3 \end{thebibliography}

This compiles fine without tocbibind or with bibliography=common.

Could this be fixed? I guess you would ideally want the effect of tocbibind without bibliography=common to add the "References for the appendix" section to the ToC, in the same way that the "References" section is.

Thanks!

PierreSenellart commented 3 years ago

I'm only able to reproduce the issue when the appendix has no bibliography references, do you have an example of case where the appendix includes bibliography references and the document still does not compile? In the mean time, I'll look for a fix for that case.

PierreSenellart commented 3 years ago

Should be fixed in 484fab4, please try with the latest apxproof.sty from the develop branch.

a3nm commented 3 years ago

I checked and indeed it seems like the issue does not trigger when the appendix does not contain any references. I tested and the fix seems to work, thanks a lot Pierre! As far as I'm concerned you can merge this with master and close the issue. :)

PierreSenellart commented 3 years ago

Thanks, closing the issue. Will be merged into master at the next release.

PierreSenellart commented 3 years ago

Integrated into release v1.2.3.