## LaTeX forum ⇒ BibTeX, biblatex and biber ⇒ Extra blank page before References when the last page is full - APA6 A4 template, Xetex

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
ocoolio
Posts: 3
Joined: Fri Aug 31, 2018 10:56 am

### Extra blank page before References when the last page is full - APA6 A4 template, Xetex

I badly need your expert help, tried to find solutions to no avail.

In a simple document when the last line of the last page is full, LaTeX will render a blank page before inserting the references. If the last page is not full, there is no blank page.

I think I haven't used anything special so I have no idea what this is and how to fix it.

Command used for PDF generation: latexmk -pdf -xelatex

\documentclass[a4paper,man,floatsintext,biblatex-apa,oneside]{apa6}    \usepackage[american]{babel}    \usepackage{csquotes}    \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}    \usepackage[colorlinks,citecolor=blue,urlcolor=blue,linkcolor=blue]{hyperref}    \DeclareLanguageMapping{american}{american-apa}     \usepackage{fontspec}    \setmainfont{Times New Roman}     \addbibresource{a.bib}     \title{Title}    \shorttitle{shortTitle}    \author{Me}    \affiliation{Piglet}     \begin{document}     \maketitle     \parencite{vanmerrienboerTransferParadoxEffects1997} word word word     word word word word word word word word word word word word word word     ... until the page fills up ...    word word word word word word word word word word word word word word     \printbibliography    \end{document}

Tags:

Stefan Kottwitz
Posts: 9403
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

A quick solution would be adding heading=bibnumbered:

\printbibliography[heading=bibnumbered]

Stefan

ocoolio
Posts: 3
Joined: Fri Aug 31, 2018 10:56 am
hey Stefan, thanks heaps for such a quick response!

Your solution is almost perfect but it changes the "Refereces" heading to bold and that is not APA compliant.

Any other suggestions perhaps?

Thanks!

EDIT: meanwhile, it seems I got the perfect response on the Stackexchange forum, in case someone finds this thread.
https://tex.stackexchange.com/questions/448619/extra-blank-page-before-references-when-the-last-page-is-full-apa6-a4-template

Stefan Kottwitz
Posts: 9403
Joined: Mon Mar 10, 2008 9:44 pm
That's easy to change too. Anyway, I guess that's the best (of moewe):

\AtEndPreamble{%  \defbibheading{bibliography}{\clearpage\section*{\normalfont\refname}}%}

Or, after \begin{document} but before the bibliography

\defbibheading{bibliography}{\clearpage\section*{\normalfont\refname}}%

Especially because \clearpage forces printing the remaining figures and tables before the bibliography starts. That's desirable.

Stefan

ocoolio
Posts: 3
Joined: Fri Aug 31, 2018 10:56 am
Can you please explain the difference between the AtEndPreamble and the other approach? I think it's a noob question but I'm really interested
Thanks again Stefan!

Stefan Kottwitz
\AtEndPreamble is hook command for executing code right at the end of the preamble, so one can override document class definitions. But I think it's from the etoolbox package, so it's required to load etoolbox. The other quick approach is simply placing that definition yourself. I guess apa6.cls already loads etoolbox implicitly, my remark was for the case it won't or it's not installed or another reader stumbles across it later.