LaTeX forum ⇒ BibTeX, biblatex and biberExtra 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

Postby ocoolio » Fri Aug 31, 2018 10:59 am

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.

Help please!

Full sample on Overleaf https://www.overleaf.com/read/gxwqhdvwkfnv


Command used for PDF generation: latexmk -pdf -xelatex


  1. \documentclass[a4paper,man,floatsintext,biblatex-apa,oneside]{apa6}
  2. \usepackage[american]{babel}
  3. \usepackage{csquotes}
  4. \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}
  5. \usepackage[colorlinks,citecolor=blue,urlcolor=blue,linkcolor=blue]{hyperref}
  6. \DeclareLanguageMapping{american}{american-apa}
  7.  
  8. \usepackage{fontspec}
  9. \setmainfont{Times New Roman}
  10.  
  11. \addbibresource{a.bib}
  12.  
  13. \title{Title}
  14. \shorttitle{shortTitle}
  15. \author{Me}
  16. \affiliation{Piglet}
  17.  
  18. \begin{document}
  19.  
  20. \maketitle
  21.  
  22. \parencite{vanmerrienboerTransferParadoxEffects1997} word word word
  23. word word word word word word word word word word word word word word
  24. ... until the page fills up ...
  25. word word word word word word word word word word word word word word
  26. \printbibliography
  27. \end{document}


Image

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9328
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Aug 31, 2018 11:30 am

Welcome to the forum!

A quick solution would be adding heading=bibnumbered:

  1. \printbibliography[heading=bibnumbered]


Stefan
Site admin

ocoolio
Posts: 3
Joined: Fri Aug 31, 2018 10:56 am

Postby ocoolio » Fri Aug 31, 2018 12:49 pm

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 9328
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Aug 31, 2018 1:07 pm

That's easy to change too. Anyway, I guess that's the best (of moewe):

  1. \AtEndPreamble{%
  2. \defbibheading{bibliography}{\clearpage\section*{\normalfont\refname}}%
  3. }


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

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


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

Stefan
Site admin

ocoolio
Posts: 3
Joined: Fri Aug 31, 2018 10:56 am

Postby ocoolio » Fri Aug 31, 2018 1:40 pm

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!

User avatar
Stefan Kottwitz
Site Admin
Posts: 9328
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Fri Aug 31, 2018 3:03 pm

\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.

Stefan
Site admin


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 3 guests