I know other people have asked this question but having scanned through the answers there seems to be two solutions: compiling 3 or 4 times and trying out some snippets of code involving the \markboth command. I have tried both and can't seem to fix it.

It seems to me (with my superficial understanding of Latex) that this is a problem of forward referencing and the more you compile the more accurate the pointers become. I re-compiled up to 7 times and couldn't get this problem to go away.

Here's my master file where I call every other component:

\documentclass[12pt, a4paper,twoside]{./a4LaTex/tesi_upf}
\usepackage{textgreek} %%%%% greek letters in text mode
\usepackage{fixltx2e} %%%%%% sub/superscript type face in text mode
\usepackage{graphicx}%%%%% including figures
\usepackage[Bjarne]{fncychap}%%%%% fancy chapter names
\pagestyle{plain} %UPF DONT CHANGE

\usepackage{hyperref}%%%%% for links to references
\usepackage{natbib}%%%%% for bibliography
\usepackage[LGR,OT1]{fontenc}%%%%% font
\usepackage{epigrafica}%%%%% font
\usepackage{lettrine} % for the beginning of chapters
\usepackage{hyphenat} %%%making life easier with hyphenation
\usepackage{amsmath}  %%%making life easier writing math equations
\usepackage{pdfpages}  % for inserting PDF files into Latex

%%%%% Colors of the links


\frontmatter % UPF
\clearpage % UPF

% sets line spacing

\chapter*{Glossary} % top level followed by section, subsection


%Here is the caption, the stuff in [] is the table of contents entry
\caption{List of abbreviations} \label{gloss} \\

%This is the header for the first page of the table...
\hline \hline \\[-2ex]
\multicolumn{1}{l}{\textbf{Abbreviation}} &
\multicolumn{1}{l}{\textbf{Description}} \\[0.5ex] \hline

%This is the header for the remaining page(s) of the table...
\multicolumn{2}{c}{{\tablename} \thetable{} -- Continued} \\[0.5ex]
\hline \hline \\[-2ex]
\multicolumn{1}{l}{\textbf{Abbreviation}} &
\multicolumn{1}{l}{\textbf{Description}} \\[0.5ex] \hline

%This is the footer for the last page of the table...
\\[-1.8ex] \hline \hline

% now the data
AF &  affinity purification\\
AP2 &  apetala 2\\
ARNTL &  aryl hydrocarbon receptor nuclear translocator-like\\
BMAL1 & brain and muscle ARNT-like 1\\
BMP & bone morphogenetic protein\\
BrdU & bromodeoxyuridine\\
C/EBP & CCAAT/enhancer binding protein\\
CLOCK & circadian locomoter output cycles protein kaput\\
ECM & extracellular matrix\\
EGF & epidermal growth factor\\
FGF & fibroblast growth factor\\
GRHL3 & grainyhead-like 3\\
HF & hair follicle\\
HT & high-throughput\\
HPLC & high-pressure liquid chromatogrphy\\
IEX-HPLC & ion exchange high-pressure liquid chromatography\\
IF & interfollicular\\
IFE & interfollicular epidermis\\

%%%%% List of Figures
\addcontentsline{toc}{chapter}{List of Figures}

%%%%% List Of Tables
\addcontentsline{toc}{chapter}{List of Tables}

% Define what levels to number in the TOC
\setcounter{secnumdepth}{3} % organisational level that receives a number
\setcounter{tocdepth}{2}    % print table of contents for level 3vb e

%%%%% Table of Contents UPF

%%%%% no indentation



%%%%% Bibliography
  • 1
    The \phantomsection is missing before each \addcontentsline command, try that
    – user31729
    Jul 20 '14 at 19:02
  • Besides that: Due to the \include statements, your document is not compilable for users here, since content of this included files is not available.
    – user31729
    Jul 20 '14 at 19:04
  • Just for information, except in some very specific cases, compiling twice is enough for references. Once to create the .aux file (containing a sort of index for references and so on) and a second one to read this index and "write" the proper information in the output.
    – Ludovic C.
    Jul 20 '14 at 19:41
  • I'll try to edit it into a minimal working example now.
    – spork
    Jul 20 '14 at 20:54

With your code the number of the last page of the \listoffigures and the last page of the \listoftables will be shown in the \tableofcontents.

Change the order of the commands to

\addcontentsline{toc}{chapter}{List fo Tables}

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.