TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For my work I'm using scrreprt and biblatex with the custom citation command from this answer. With the one-sided layout everything works fine but if I use twoside option then sometimes references in footnotes appear not on the same page as the footnote mark but move to the next page or further.

Here is an MWE which shows the problem:

%twoside%<- uncomment this
\hypersetup{pdfborder={0 0 0},colorlinks=true,unicode}


% user-level citation command
        \iffieldundef{prenote}{}{\BibliographyWarning{Ignoring prenote}}%
        \iffieldundef{postnote}{}{\BibliographyWarning{Ignoring postnote}}}

% initialize or save last instcount, save key if seen first on page

% citation output
    \mkbibsuperscript{#1}% Footnote's superscript in lining figures


% prints footnotes if last reference on page
    \ifboolexpr{ test {\ifsamepage{\value{instcount}}{\value{instcount}+1}}
              or test {\ifdefempty{\cbx@savelist}} }

% list handler that prints footnotes in order

% internal list of sorted entry keys
            {blx@slists@\the\c@refsection @entry@\blx@sorting}}% Biber
        {\global\letcs{\cbx@sortlist}{blx@sort@\the\c@refsection}}}% BibTeX

\chapter{First Chapter}






If I uncomment twoside in the MWE and run pdflatex, biber, pdflatex then all footnote references appear in the right place but I need to run pdflatex one more time to get Bibliography in the Table of Contents of the pdf file. And after this run references 6 and 7 move to the next page.

The question is why it happens and how to fix this.

share|improve this question
up vote 6 down vote accepted

Enable the page tracker with pagetracker=page. With two-sided documents pagetracker becomes pagetracker=spread. So \ifsamepage becomes an if "same spread"/"facing pages" test.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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