4

The MWE is pretty much as small as I can get it and replicate the problem. I \include chapters of my thesis (using a template based on book}. Immediately after the last chapter I have a list of publications. But if the chapter finishes on an even page, rather than the publications list starting on the next odd page, I get a blank odd, a blank even, than the publications list. You can guess where it finishes now I've written the last chapter!

\documentclass{book}
\usepackage{showkeys}
\usepackage[
    firstinits=true,
    maxbibnames=100,
    style=numeric-comp,
    sortcites=true,
    sorting=none,
    backend=biber,
    defernumbers=true,
    natbib
]{biblatex}
\begin{filecontents}{\jobname.bib}
@misc{me_poster,
    title="a poster",
    author="Me",
    keywords="me",
    year=2013
}
@article{me_article,
    title="a journal article",
    author="Me",
    journal="journal of stuff",
    year="2012",
    keywords="me"
}
@article{AuthorA_article,
    title="An Article",
    journal ="journal of applied stuff",
    author="Author, A",
    year="1999"
}
@book{AuthorB_book,
    title="A book",
    author="Author, B",
    year="1666"
}
\end{filecontents}
\begin{filecontents}{\jobname_c1.tex}
        \chapter{Body}
        Some people said some stuff.\supercite{AuthorA_article}

        This is on an odd page.\supercite{AuthorB_book}
        \clearpage
        \dots and this is on an even page.
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\include{\jobname_c1}%
\begin{refsection}%
    \begingroup
        \defbibenvironment{myrefs}
              {\DeclareFieldFormat{labelnumberwidth}{}\list{}{%
                 \leftmargin\bibhang
                 \itemindent-\leftmargin
                 \itemsep\bibitemsep
                 \parsep\bibparsep}}
              {\endlist}
              {\item}
              \nocite{*}%
        \printbibliography[sorting=ynt,omitnumbers=true,env=myrefs,keyword=me,title={Publications and presentations},heading=bibintoc]%     
    \endgroup%
\end{refsection}%       
\end{document}

output of the above code -- 5 pages overlapped Sorry about the big image - if I make it smaller it's not clear.

Notes:

  • I've left showkeys on as it shows where the \refsection starts

  • I think this has something to do with the fact that \refsection uses a chapter in book-based classes, if I use article (and make the \chapter in the include into a \section) the problem goes away.

  • I've seen the answer at Blank bibliography page getting created, but that makes the publications list start on page 4, not 3, where it should go (unsurprisingly).
  • It feels like an extra \clear(double)page is being issued somewhere within the \refsection but I don't know where.
3
  • 2
    The blank pages go if you remove showkeys I'd blame the author of that package if I were you. – David Carlisle May 30 '14 at 12:11
  • @DavidCarlisle: I have heard the author of showkeys is a very peculiar fellow... ;-) – user31729 May 30 '14 at 12:23
  • @DavidCarlisle if only they were all that easy. The "final" package option (or class option) works as well. I seem to remember it tells the package to do nothing at all. Presumably the presence of something in the body of the page at the \refsection causes the page to not be empty when \printbibliography starts a new chapter. Thanks. – Chris H May 30 '14 at 12:53
4

The blank pages go if you remove showkeys (or disable it with final)

The package tries to find "safe" places to print its markers but it is hard especially in generated content as here where you can not directly control the label. Two \cleardoublepage in a row normally do not generate multiple blank pages but here the label display is causing the page not to be blank so a second \cleardoublepage is throwing two extra pages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.