I create lots of LaTeX documents and put all my declarations into a header.tex
that I use with \input{header.tex}
at the beginning. However, I am migrated that into a header.sty
and just use \usepackage{header}
now.
Either way, my document always contains the same last lines that include a bibliography. I would like to move that into my header.sty
as well. Is there some way to add end-of-document content into the preamble somehow?
The code that I have in mind is:
\IfFileExists{\bibliographyfile}{
\printbibliography
}{}
The \bibliographyfile
is defined in the preamble already.
\AtEndDocument{your code}
should do, but this 'fixes' probably to the same bibliography?\printbibliography
of biblatex, so that does not really fix too much.