[Tex/LaTex] List of Figures and Tables in same page

table of contents

I would like to have my list of figures and my list of tables in the same page. I don't want only one list, the numberings must be independent. Now I have

\documentclass[12pt,twoside,titlepage,headinclude]{scrreprt}

\usepackage[Bjornstrup]{fncychap}
\usepackage{tocbibind}
\newcounter{dummy}
\begin{document}

\tableofcontents
\listoffigures
\begingroup
\let\clearpage\relax
\listoftables
\endgroup
\end{document}

It works well with the numbering but it preserve two different headings for each list. I would like an output like this in the same page:

List of Figures and Tables

Figure 1 …. Page 4

Figure n …. Page n

Table 1 …. Page 2

Table n …. Page n+1

Best Answer

Here's a solution that uses the titletoc package to help with the formatting.

screenshot

There are a couple of important things in the code below:

\begingroup
\makeatletter
%\listoffigures
\chapter*{List of Figures and Tables}
\@starttoc{lof}
\let\clearpage\relax
%\listoftables
\@starttoc{lot}
\makeatother
\endgroup

This enables us to use our own title for the combined list of figures and tables by using the \@starttoc command; note that it is used twice, one for each of the lof and lot.

The customization of each entry is achieved using

\titlecontents{figure}
[0pt]                                  % left margin
{\addvspace{.5cm}}%                    % above code (e.g vertical space)
{\contentsmargin{0pt}                  % numbered entry format
    Figure~\thecontentslabel%
    \large}
{\contentsmargin{0pt}\large}           % unnumbered entry format
{\titlerule*[.5pc]{.}\contentspage}    % filler-page format (e.g dots)
%[\addvspace{.5pc}]                 

You can tweak this as you see fit.

% arara: pdflatex
% arara: pdflatex
% !arara: indent: {overwrite: on}
\documentclass[12pt,twoside,titlepage,headinclude]{scrreprt}
\usepackage{titletoc}
\titlecontents{table}
[0pt]                                  % left margin
{\addvspace{.5cm}}%                    % above code (e.g vertical space)
{\contentsmargin{0pt}                  % numbered entry format
    Table~\thecontentslabel%
    \large}
{\contentsmargin{0pt}\large}           % unnumbered entry format
{\titlerule*[.5pc]{.}\contentspage}    % filler-page format (e.g dots)
%[\addvspace{.5pc}]                    % below code (e.g vertical space)

\titlecontents{figure}
[0pt]                                  % left margin
{\addvspace{.5cm}}%                    % above code (e.g vertical space)
{\contentsmargin{0pt}                  % numbered entry format
    Figure~\thecontentslabel%
    \large}
{\contentsmargin{0pt}\large}           % unnumbered entry format
{\titlerule*[.5pc]{.}\contentspage}    % filler-page format (e.g dots)
%[\addvspace{.5pc}]                    % below code (e.g vertical space)


\begin{document}

\begingroup
\makeatletter
%\listoffigures
\chapter*{List of Figures and Tables}
\@starttoc{lof}
\let\clearpage\relax
%\listoftables
\@starttoc{lot}
\makeatother
\endgroup

\newcount\tmp
\tmp=0
\loop
\advance\tmp by 1
\begin{table}[!htb]\caption{}\end{table}
\begin{figure}[!htb]\caption{}\end{figure}
\ifnum\tmp<5 \repeat
\end{document}