1

I am writing my thesis and the form for List of Figures and List of Tables is to be a TABLE like the following:

enter image description here

I couldn't find any package help me edit the style of LoF and LoT to have a table style.

Can I use the entries in files .lof and .lot to generate the form I need?

2

Here is a solution using etoc package.

\documentclass{book}
\usepackage{etoc}
\usepackage{etoolbox}
\usepackage{longtable,array}

\makeatletter 
\patchcmd\@caption{\csname ext@#1\endcsname}{toc}{}{}
\makeatother
\etocsetlevel{figure}{6}
\etocsetlevel{table}{6}

\newcommand{\listof}[1]{%
\begingroup
\etocglobaldefs
\etocsetlevel{figure}{0}
\etocsetlevel{table}{0}
\etocsetlevel{part}{0}
\etocsetlevel{#1}{-2}
\etocsetstyle{#1}
{}{\\\hline}{\csname #1name\endcsname\space\etocnumber: \etocname &\etocpage }{}
\etocsettocstyle
{\cleardoublepage% or \par
\begingroup
\centering\Large\bfseries\csname list#1name\endcsname
\par\endgroup
\begin{longtable}{|p{8cm}|c|}
\hline
\centering\bfseries\csname #1name\endcsname & \bfseries Page number
}
{\\\hline\end{longtable}}
\etocsetnexttocdepth{-1}
\tableofcontents
\endgroup}
\renewcommand{\listoffigures}{\listof{figure}}
\renewcommand{\listoftables}{\listof{table}}

\begin{document}
\tableofcontents
\listoffigures
\listoftables
\chapter{One}
\section{One one}
\begin{figure}
\centering
\rule{5cm}{1.5cm}
\caption{Foo caption}
\end{figure}
\section{One two}
\begin{table}
\centering
\rule{5cm}{1.5cm}
\caption{Foo table}
\end{table}
\begin{figure}
\centering
\rule{5cm}{1.5cm}
\caption{Foo bar}
\end{figure}
\chapter{Two}
\section{Two one}
\begin{figure}
\centering
\rule{5cm}{1.5cm}
\caption{Foo caption two}
\end{figure}
\section{Two two}
\begin{table}
\centering
\rule{5cm}{1.5cm}
\caption{Foo table two}
\end{table}
\begin{figure}
\centering
\rule{5cm}{1.5cm}
\caption{Foo bar two}
\end{figure}
\end{document} 
| improve this answer | |

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.