GeneralMerging list of tables and list of figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ralfmeermeier
Posts: 8
Joined: Mon Jul 21, 2008 7:23 pm

Merging list of tables and list of figures

Post by ralfmeermeier »

Hall,
My Document contains just two tables; besides I have a a table of figures which is much richer; the problem is that the list of tables takes a hole page, and after this blank page comes the list of figures, which doesnt look nice; I would like to let the list of figures to start at the same page of the list of tables, any help?

Ralf

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Merging list of tables and list of figures

Post by gmedina »

Hi ralfmeermeier,

one quick solution could be to load the tocloft package, since with this package the ToC, LoF and LoT not necessarily begin in a new page. The following example illustrates this approach (I used \rule to simulate actual figures and tables):

Code: Select all

\documentclass{book}
\usepackage{tocloft}

\begin{document}
\tableofcontents
\clearpage
\listoftables
\listoffigures
\clearpage

\chapter{Test 1}
\begin{table}
  \rule{5cm}{2cm}
  \caption{test table 1.}
  \label{tab:testt1}
\end{table}

\chapter{Test 2}
\begin{figure}
  \rule{5cm}{2cm}
  \caption{test figure 1.}
  \label{fig:test1}
\end{figure}

\begin{table}
  \rule{5cm}{2cm}
  \caption{test table 1.}
  \label{tab:testt2}
\end{table}

\end{document}
By the way, I think that this post belongs to the LaTeX->General
subforum.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ralfmeermeier
Posts: 8
Joined: Mon Jul 21, 2008 7:23 pm

Re: Merging list of tables and list of figures

Post by ralfmeermeier »

Thank you very much! I appreciate it
ralfmeermeier
Posts: 8
Joined: Mon Jul 21, 2008 7:23 pm

Merging list of tables and list of figures

Post by ralfmeermeier »

I have just this little Problem:
I generate the pdf file, then I go to the table of contecnts; if I press Table List or Figure List or Literature then I will be taken to the last section (calles Ausblick) of my document, not to the List of Tables or List of Figures or Literature:

Code: Select all







\documentclass{book}
\usepackage{tocloft}

anothe packages

\begin{document}
\tableofcontents
\clearpage


\chapter{Test 1}
\begin{table}
  \rule{5cm}{2cm}
  \caption{test table 1.}
  \label{tab:testt1}
\end{table}

\chapter{Test 2}
\begin{figure}
  \rule{5cm}{2cm}
  \caption{test figure 1.}
  \label{fig:test1}
\end{figure}

\begin{table}
  \rule{5cm}{2cm}
  \caption{test table 1.}
  \label{tab:testt2}
\end{table}

\section{Ausblick} 
\newpage
\addcontentsline{toc}{chapter}{Tabellenverzeichnis}
\listoftables  
\addcontentsline{toc}{chapter}{Abbildungsverzeichnis}
\listoffigures
\clearpage
\end{document
Besides that how can this annoying empty page of the table of contents be eliminated?

Thank you in advance

Ralf
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Merging list of tables and list of figures

Post by gmedina »

Code: Select all

\documentclass[openany]{book}
\usepackage{tocloft}
\usepackage{hyperref}

\begin{document}
\tableofcontents
\clearpage

\chapter{Test 1}
\begin{table}
  \rule{5cm}{2cm}
  \caption{test table 1.}
  \label{tab:testt1}
\end{table}

\chapter{Test 2}
\begin{figure}
  \rule{5cm}{2cm}
  \caption{test figure 1.}
  \label{fig:test1}
\end{figure}

\begin{table}
  \rule{5cm}{2cm}
  \caption{test table 1.}
  \label{tab:testt2}
\end{table}

\section{Ausblick}
\newpage
\phantomsection
\listoftables 
\addcontentsline{toc}{chapter}{Tabellenverzeichnis}
\listoffigures
\addcontentsline{toc}{chapter}{Abbildungsverzeichnis}
\clearpage
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ralfmeermeier
Posts: 8
Joined: Mon Jul 21, 2008 7:23 pm

Re: Merging list of tables and list of figures

Post by ralfmeermeier »

danke
Post Reply