1

I have a strange problem where page number of the chapters starting from the second chapter are wrong. In the following example, the Introduction chapter (chapter 1) page will be 2, but the Related Work chapter (chapter 2) will be page 4 instead of 3. Following chapters (not on the example) will get +1 to their page numbers. I work on Windows and use TexWorks 0.6.1 (x64) with MikTex 2.9 and Biber that comes with the package. In order to build the script I execute following lines: miktex-pdftex.exe -synctex=1 -undump=pdflatex main.tex biber.exe main miktex-pdftex.exe -synctex=1 -undump=pdflatex main.tex I suspect that the problem lies in the length of the bibliographic entry label. The first pass (before biber substitutes references) produces PDF where chapter 1 ends on page 3. It is still unclear why the second pass does not rebuild ToC. This issue also influences the Table of Figures page numbering.

Any help is highly appreciated.

The minimal script example:

\documentclass[12pt,a4paper,oneside,openany,notitlepage]{book}
\usepackage[utf8]{inputenc}

%%% indent first paragraph in chapter
\usepackage{indentfirst}

%%% support setstrech command for line spacing
\usepackage{setspace}
%%% make numbering of figures continuous
\usepackage{chngcntr}
\counterwithout{figure}{chapter}

%%% support theorem/definition/lemme proof
\usepackage{amsthm}
\theoremstyle{definition}

%%% control chapter title template: eliminate 'Chapter'
\usepackage{titlesec}

% keep showing 'Appendix' in chapter while eliminating 'Chapter' (https://tex.stackexchange.com/questions/247035/adding-chapter-prefix-for-appendix)
\makeatletter
\newcommand{\setappendix}{Appendix~\thechapter.~}
\newcommand{\setchapter}{\thechapter.~}
\titleformat{\chapter}{\normalfont\huge\bf}{%
  \ifnum\pdfstrcmp{\@currenvir}{appendices}=0
    \setappendix
  \else
    \setchapter
  \fi}{20pt}{}
\makeatother
\titlespacing{\chapter}{0pt}{10pt}{30pt}

%%% define 'appendices' env
\usepackage[titletoc, title]{appendix}

%%% manage page number in footer
\usepackage{fancyhdr}
%%% support algorithms
\usepackage[boxed,noline,linesnumbered]{algorithm2e}
\SetKwComment{Comment}{$\triangleright$\ }{} % set style for algorithm comments
\SetAlCapSkip{1em} % set space between algorithm body and caption

%%% bibliography to support chicago style
\begin{filecontents}{references.bib}
@misc{VerylongBiblRef1,
  title        = {my life},
  howpublished = {on stone},
  month        = Feb,
  year         = 2017
}\end{filecontents}


\usepackage[backend=biber, style=ieee]{biblatex}
\addbibresource{references.bib}

\begin{document}

\tableofcontents

{\setstretch{1.5}
\chapter{Introduction}
\label{ch:intro}

functionalities are implemented in many cloud products: commercial cloud services like Amazon AWS or Microsoft Azure \parencite{VerylongBiblRef1}, the Open Source cloud environments like OpenStack \parencite{VerylongBiblRef1} and also in more specialized cloud computation platforms like E-Learning \parencite{VerylongBiblRef1} or Docker \parencite{VerylongBiblRef1}.

The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. 

The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. 

The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. 

The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. 

The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf.

\chapter{Related Work}
\label{ch:related_work}

The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. The quick onyx goblin jumps over the lazy dwarf. 

\end{document}

P.S. Mind that I need the packages that appear in the script for proper formatting of the document.

closed as unclear what you're asking by Johannes_B, Stefan Pinnow, Bobyandbob, user31729, Zarko Feb 4 '18 at 13:24

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 6
    I'd expect a third pass to fix this. biber provides the data for pdflatex to typeset in the second pass; only then can the length be determined. – Chris H Jun 23 '17 at 12:59
  • try using \newpage before \end{document}... – Kumaresh PS Jun 23 '17 at 15:07
0

The answer is indeed to add third pass as it was advised by Chris H in this comment. Thank you, Chris

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