1

I need to include a LaTeX document in my appendices, but keeping his title page, outline and pages numbers. To do so, I naturally used \includepdf of the pdfpages package. But I read in the APA manual that there should be only one reference list in a document. How can I include my document in the appendix and keep his own title page, section numbering and outline but allows the references to be added to the main document?

\documentclass[a4paper,11pt,oneside,openany]{article} % 
\usepackage{pdfpages}
\usepackage{appendix}
\usepackage[backend=biber, style=ieee]{biblatex}  
\addbibresource{references.bib}
\begin{document}
\maketitle
\section{A section}
\printbibliography
\begin{appendices}
\renewcommand{\thesubsection}{\thesection\arabic{subsection}}
\renewcommand\thefigure{\thesubsection.\arabic{figure}}    
\renewcommand\thetable{\thesubsection.\arabic{table}}    
\includepdf[pages=-]{Document.pdf}
\end{appendices}
\end{document}

I'm asking before going the hard way, by including the title page as a pdf, setting all the counters to 0, and include the rest of the file in tex format.

Mico
  • 506,678
  • Welcome to TeX.SE! – Mico Jun 18 '19 at 14:07
  • You can't-ish (there is a way to re-use the bibliography of an external file even with biblatex, but that only works under very strict assumptions, see https://tex.stackexchange.com/q/426964/35864). I'm also sceptical about the idea in general. Presumably the included document has its own bibliography with a numbering and sorting that is largely independent of the current bibliography of your main document. Do you really want to merge the two just because the APA manual says so (you use style=ieee, so I assume you are not completely bound to APA style)? – moewe Jun 18 '19 at 18:28

1 Answers1

1

This is very tricky.

Obviously biblatex can't parse the included PDF file for bibliography information, so the bibliography and citation data of the included PDF would need to be present in a LaTeX-readable format, which would mean that you need the .bbl file.

In theory it is possible to import the .bbl file of an external document, see How to import / print a bibliography created from a separate / external document? and How to use refsection and xcite together?, but even this simple case comes with lots of caveats. Your use case would presumably be more complex: You want to be able to cite entries that occur only in one of the two documents in either direction. That means that you would really have to 'merge' the two .bbls. In general this comes with all sorts of problems. .bbl files not only contain the entry data as it is in the .bib file, they can also contain context-dependent additional information (labels, uniqueness info, sorting, ...). When two files from different sources are merged, one would need to make sure that all context-dependent info is compatible or would have to recalculate it. Given that your style is biblatex-ieee, which is numeric and sets sorting=none, that seems actually not too impossible, since that style relies on almost no additional backend-generated info. Still, even in this simple case I can only see LaTeX merge the.bbl files itself with considerable effort, but maybe it would be easier to do that externally (either manually or with a script?).

The biggest issue that I see for your setup is that the citation numbers would be messed up. biblatex-ieee is an unsorted style, which means that citations are numbered by order of occurrence. Presumably the included PDF has the same citation and bibliography style (otherwise there is no point in doing this in the first place, you can't merge citations and bibliographies in different styles in a meaningful way). That means that in the included PDF citations start at [1]. But the PDF is only included later in the document. Presumably you have already cited something by then and so the citation numbers should be different. This requires a change to the PDF itself, which is not really doable.

Also related: Add bbl file entries to latex document


If you insist on a combined list of references, it would probabyl be easiest just to \input the source of the external document (maybe after some changes to counters and the like), so that biblatex and Biber can process everything in one go.

On the other hand I'm not too sure if you really need a combined list of references. The rest of your document does not appear to follow what the APA says to the letter either, so I presume you are not forced to adhere to APA style. Including a complete copy of a different document is a special case anyway and I'm not sure if the APA had that in mind when they wrote that rule. I'm not clear about the precise situation you have in mind, but if it is clear that the included PDF is an entirely separate work (which seems to be the case, since want to keep its structure/sectioning and mention resetting counters) then it does not appear at all unnatural to me that it would have a separate bibliography.

moewe
  • 175,683
  • Thank you. i knew it was going to be very difficult, so I ended up adding the first page of my report in the appendix as pdf (to have the section title of the appendix on the first page of the report), and the rest as a tex file to sync the bibliography. – Romain Liechti Jul 07 '21 at 18:18