I have a problem with List of Tables. It doesn't appear in my document.
The .cls
file is HERE.
Document:
\documentclass[thesis=B,czech]{FITthesis}[2012/06/26]
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{longtable}
\department{text}
\title{text}
\authorGN{text}
\authorFN{text}
\authorWithDegrees{text}
\supervisor{text}
\acknowledgements{text}
\abstractCS{text}
\abstractEN{text}
\placeForDeclarationOfAuthenticity{text}
\declarationOfAuthenticityOption{1}
\keywordsCS{text}
\keywordsEN{text}
\usepackage{chngcntr}
\AtBeginDocument{
\counterwithout{figure}{chapter}
\counterwithout{table}{chapter}
\renewcommand\thefigure{\arabic{figure}}
\renewcommand\thetable{\arabic{table}}
}
\begin{document}
\begin{introduction}
%
\end{introduction}
\chapter {First}
text
\begin{figure}[h]
\caption{Function.}
\label{fig:function}
\end{figure}
\begin{center}
\begin{longtable}{ c | c | c }
$1$ & $2$ & 3 \\ \hline
\caption{tab}
\label{tab:tab}
\end{longtable}
\end{center}
\begin{conclusion}
%
\end{conclusion}
\appendix
\end{document}
Best Answer
The class
FITthesis.cls
doesn't require an explicit use of\listoftables
, since it tries to detect whether the list should be automatically generated or not.The problem is that the mechanism used to do the automatic detection is not very good, since it's based on the detection of the environment and not on the caption type. If the
table
environment was used in the document, then the LoT will be produced; otherwise, no list is generated.This is clearly wrong, since one can have tables with captions not associated with the
table
environment (one could havelongtable
, orthreeparttable
, or\captionof{table}{...}
).For the list of tables, one finds in
FITthesis.cls
:and this means, as I said before, that the LoT will only be generated if
table
was used in the document.Since in the MWE
table
was not used, the LoT is not produced, even thoughlongtable
was present. This is clearly a bad design choice that should be corrected by the author/maintainer of the class. If automatic generation is to be done, then the mechanism must be base on the captions, not on specific environments.One could explicitly invoke
\listoftables
in the document, but the, as soon astable
is used one will end up having two lists of tables.The best solution here, while the author/maintainer of the class corrects the issue, is to register also
longtable
for the automatic generation of the LoT, using:A complete example: