1

I have just discovered the apxproof package, and it is so useful, I cannot understand how I could write conference papers without it. But there is a problem: when I move citations to the appendix, they disappear. Here is an MWE file test.tex:

\documentclass{article} 
\usepackage{natbib}
\bibliographystyle{apalike}

\usepackage{apxproof}

\begin{document}

Citing \cite{Johnson1973} in the main paper.

\begin{toappendix}
Citing \cite{Johnson1973} in the appendix.
\end{toappendix}

\bibliography{test}
\end{document}

Here is test.bib:

@phdthesis{Johnson1973,
  author       = {D. S. Johnson},
  title        = {Near-optimal bin packing algorithms},
  school       = {Massachusetts Institute of Technology},
  year         = {1973},
  type         = {PhD thesis},
}

And here is the outcome in Overleaf:

enter image description here

enter image description here

As you can see, the citation text in the appendix disappears.

1
  • This seems to be a problem with natbib. Without natbib it works. It also works with package apalike instead of natbib. To use the same bibliography style for the main and the appendix reference, you can redefine \appendixbibliographystyle. But then is seem not to work with apalike. So there seem to be some strange incompatibilities. I would recommend to report an issue → github.com/PierreSenellart/apxproof/issues. But maybe this is just an incompatibility of bibunits package, which I never use.
    – cabohah
    Commented Aug 20 at 7:41

1 Answer 1

1

There seems to be a issue with the combination of natbib and the usage of package bibunits by apxproof. It works, when using, for example:

\begin{filecontents*}[force]{test.bib}
@phdthesis{Johnson1973,
  author       = {D. S. Johnson},
  title        = {Near-optimal bin packing algorithms},
  school       = {Massachusetts Institute of Technology},
  year         = {1973},
  type         = {PhD thesis},
}
\end{filecontents*}

\documentclass{article} 
\usepackage{natbib}
\bibliographystyle{apalike}

\usepackage[bibliography=common]{apxproof}

\begin{document}

Citing \cite{Johnson1973} in the main paper.

\begin{toappendix}
Citing \cite{Johnson1973} in the appendix.
\end{toappendix}

\bibliography{test}
\end{document}

with common instead of a separate references:

common references with correct citing

It also works for split references without natbib or package apalike instead of natbib:

\begin{filecontents*}[force]{test.bib}
@phdthesis{Johnson1973,
  author       = {D. S. Johnson},
  title        = {Near-optimal bin packing algorithms},
  school       = {Massachusetts Institute of Technology},
  year         = {1973},
  type         = {PhD thesis},
}
\end{filecontents*}

\documentclass{article} 
\usepackage{apalike}
\bibliographystyle{apalike}

\usepackage{apxproof}

\begin{document}

Citing \cite{Johnson1973} in the main paper.

\begin{toappendix}
Citing \cite{Johnson1973} in the appendix.
\end{toappendix}

\bibliography{test}
\end{document}

split references with correct citing

But not, when changing the bibliography style of the appendix also to apalike:

\begin{filecontents*}[force]{test.bib}
@phdthesis{Johnson1973,
  author       = {D. S. Johnson},
  title        = {Near-optimal bin packing algorithms},
  school       = {Massachusetts Institute of Technology},
  year         = {1973},
  type         = {PhD thesis},
}
\end{filecontents*}

\documentclass{article} 
\usepackage{apalike}
\bibliographystyle{apalike}

\usepackage{apxproof}
\renewcommand\appendixbibliographystyle{apalike}

\begin{document}

Citing \cite{Johnson1973} in the main paper.

\begin{toappendix}
Citing \cite{Johnson1973} in the appendix.
\end{toappendix}

\bibliography{test}
\end{document}

./bu1.bbl

! LaTeX Error: Lonely \item--perhaps a missing list environment.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.3 \bibitem[Johnson, 1973]{Johnson1973}
                                        
? 

I would suggestion another solution: Use of biblatex and the section of segment feature of biblatex. This would also need to use option bibliography=common, but nevertheless you can generate a separate bibliography for the appendix:

\begin{filecontents*}[force]{test.bib}
@phdthesis{Johnson1973,
  author       = {D. S. Johnson},
  title        = {Near-optimal bin packing algorithms},
  school       = {Massachusetts Institute of Technology},
  year         = {1973},
  type         = {PhD thesis},
}
\end{filecontents*}

\documentclass{article} 
\usepackage[style=authoryear]{biblatex}
\addbibresource{test.bib}
\addbibresource{biblatex-examples.bib}

\usepackage[bibliography=common]{apxproof}
\renewcommand*{\appendixprelim}{\newrefsegment}

\begin{document}

Citing \cite{Johnson1973} and \autocite{knuth:ct:a} in the main paper.


\begin{toappendix}
Citing \cite{Johnson1973}  and \autocite{knuth:ct:b} in the appendix.
\end{toappendix}

\printbibliography[segment=0]

% Add this at the end, to print the segment bibliography at the end of the appendix.
\nosectionappendix
\begin{toappendix}
  \printbibliography[title=References for the
  Appendix,segment=1]
\end{toappendix}

\end{document}

or

\begin{filecontents*}[force]{test.bib}
@phdthesis{Johnson1973,
  author       = {D. S. Johnson},
  title        = {Near-optimal bin packing algorithms},
  school       = {Massachusetts Institute of Technology},
  year         = {1973},
  type         = {PhD thesis},
}
\end{filecontents*}

\documentclass{article} 
\usepackage[style=authoryear]{biblatex}
\addbibresource{test.bib}
\addbibresource{biblatex-examples.bib}

\usepackage[bibliography=common]{apxproof}
\renewcommand*{\appendixprelim}{\newrefsegment}

\begin{document}

Citing \cite{Johnson1973} and \autocite{knuth:ct:a} in the main paper.


\begin{toappendix}
Citing \cite{Johnson1973}  and \autocite{knuth:ct:b} in the appendix.
\end{toappendix}

\printbibliography[segment=0,heading=subbibliography]

% Add this at the end, to print the segment bibliography at the end of the appendix.
\nosectionappendix
\begin{toappendix}
  \printbibliography[title=References for the
  Appendix,segment=1]
\end{toappendix}

\end{document}

Both result in:

correct citing and referencing using biblatex section or segment

You must log in to answer this question.

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