I have a few regular tables in my document, as well as a longtable.
For some reason, the List of Tables leaves a space before the longtable and labels it "1" when, logically, it should be "4".
I can't figure out where the issue is!
Sorry for all the code, but better you got everything to help track the problem down.
Thank you.
Code: Select all
% PREAMBLE
\documentclass[a4paper,oneside,centered,noparindent,noparskip]{bookest}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{nicefrac}
\usepackage{palatino} % Font for document
\usepackage{hyperref} % Hyperlinks
\usepackage{titletoc} % Customization of TOC LOF LOT
\usepackage{tocloft} % Customization of TOC LOF LOT
\usepackage[table,xcdraw]{xcolor} % For shading in tables
\usepackage{color}
\usepackage{pdfcolmk}
\usepackage{multirow}
\usepackage{ltxtable} % Instead of Longtable package %\caption package is offered with \Longtable
\usepackage{textcomp}
\usepackage{array} % For long tables, to define width of columns
\usepackage{booktabs} % Nicer spacing in columns
\usepackage{siunitx} % To write Celsius, etc.
\usepackage{enumitem} % To create item lists
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{caption} % To change way captions are labelled
\usepackage{etoolbox} % To make table footnote font smaller
\appto\TPTnoteSettings{\footnotesize}
% To format the paragraphs
\setlength{\parindent}{4em} % For indentations
\setlength{\parskip}{1em} % For space between paragrpahs
% Defining how Celsius and Fahrenheit appear
\def\degC{$^\circ\kern-0.06em\rm{C}$}
\def\degF{$^\circ\kern-0.06em\rm{F}$}
% change the style of the caption numbering.
\renewcommand{\thetable}{\arabic{table}}
% Change footnotes from numbers to symbols
\makeatletter
\def\@xfootnote[#1]{%
\protected@xdef\@thefnmark{#1}%
\@footnotemark\@footnotetext}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
% FRONTMATTER STARTS
\tableofcontents
\clearpage
\listoftables
\clearpage
\thispagestyle{plain} % To not have "List of Tables appear" at the top of the "Preface" page
\section*{Preface}
\blindtext
\clearpage
\thispagestyle{plain} % To not have "List of Tables appear" at the top of the "Preface" page
\section*{Introduction}
\blindtext
\clearpage
% MAINMATTER STARTS
\chapter{Chapter}
\section{Section}
\begin{table}[]
\centering
\caption{Birds}\label{Birds}
\begin{threeparttable}
\begin{tabular}{rcl} \toprule
Color & Color & Color \\ \midrule
Color & Color & Color\tnote{*} \\
Color & Color & Color \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\item[*]Text.
\end{tablenotes}
\end{threeparttable}
\end{table}
\begin{table}[]
\centering
\caption{Planets}\label{Planets}
\begin{threeparttable}
\begin{tabular}{rcl} \toprule
Color & Color & Color \\ \midrule
Color & Color & Color\tnote{*} \\
Color & Color & Color \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\item[*]Text.
\end{tablenotes}
\end{threeparttable}
\end{table}
\section{Chapter}
\begin{table}[]
\centering
\caption{Flower.}
\begin{threeparttable}
\begin{tabular}{lllll}\toprule
Boots & Boots & Boots & Boots & Boots \\ \midrule
Boots\tnote{*} & Boots & Boots & Boots & Boots \\
Boots & Boots & Boots & \hspace{15pt}-- & Boots \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\item[*]text..
\end{tablenotes}
\end{threeparttable}
\end{table}
\chapter{Chapter}
\section{Section}
\begin{longtable}{r>{\raggedright\arraybackslash}p{4.5cm}p{2.6cm}>{\raggedright\arraybackslash}p{6.9cm}}
\caption{Kings \& Queens} \label{Kings Queens} \\
\toprule
No. & Name \& Title & Dates & Events \\
\midrule
\endfirsthead
\caption*{\autoref{Kings Queens}: \textit{Continued.}} \\
\toprule
No. & Name \& Title & Dates & Events \\
\midrule
\endhead
1& King Soandso III & 2234 -- to date & This is some text \\
2& King Smith ``The Fatty Pig Eater'' & 2234 -- 3456 & yryuryrtyryereyeryeryer\\
3& King Soandso III & 234 -- 134 (?)& This is some text \\
4&&& This is some text \\ \bottomrule
\end{longtable}
\end{document}