General ⇒ Need help with table of figures formatting
Need help with table of figures formatting
My list of figures needs to be double space between entries, but single spaced within entries.
For example:
Figure
1.1 Stuff................................................5
1.2 More stuff but really big line so it should
continue here....................................6
1.3 Another short entry...............................8
The page numbers as well as the first letter of each entry should line up, unlike my post. I've tried to us the TOCLOFT package, but couldn't figure it out. I just stated using Latex and I'm not very familiar with it.
Thanks ahead of time for any help you may be able to provide me.
Ariel
For example:
Figure
1.1 Stuff................................................5
1.2 More stuff but really big line so it should
continue here....................................6
1.3 Another short entry...............................8
The page numbers as well as the first letter of each entry should line up, unlike my post. I've tried to us the TOCLOFT package, but couldn't figure it out. I just stated using Latex and I'm not very familiar with it.
Thanks ahead of time for any help you may be able to provide me.
Ariel
NEW: TikZ book now 40% off at Amazon.com for a short time.

Need help with table of figures formatting
Your post misses relevant information, as the document class you use and packages you load. The missalignment you describe is not the normal behaviour in the standard LaTeX classes. Anyway, the following code, I think, does what you need: between two entries, there is an additional blank space. Try it:
The relevant lines are those between \makeatletter and \makeatother, which you should copy as they are in the preamble of your document, and the \addtocontents command before \listoffigures. You can replace both occurrences of \baselineskip by a different lenght, such as 5ex, 1in or 2cm.
Code: Select all
\documentclass{book}
\makeatletter
\let\l@figureOLD \l@figure
\renewcommand{\l@figure}{\vspace*{\baselineskip}\l@figureOLD}
\makeatother
\begin{document}
\addtocontents{lof}{\vspace*{-\baselineskip}}
\listoffigures
\chapter{First chapter}
\begin{figure}[h]
\caption{A very, very, very, very long caption comes here. Will this cause a problem in the List of Figures?}
\end{figure}
\begin{figure}[h]
\caption{This is other very, very, very, very long caption. So, once more, let's see what happens in the List of Figures}
\end{figure}
\begin{figure}[h]
\caption{However, this is a short one}
\end{figure}
\begin{figure}[!h]
\caption{A very, very, very, very long caption once again. How will this affect to the List of Figures?}
\end{figure}
\end{document}
Re: Need help with table of figures formatting
Thanks for the help.
Your suggestion sort of worked. I get the right formatting on the entries, but now I get page breaks between figures from different chapters and the pages for chapters with lots of figures ignore the bottom margin and go off the page (entries do not make a new page).
Here is the beginning of my main document:
\documentclass[12pt]{report}
\usepackage{amsmath,amsthm,amsfonts,amscd}
\usepackage{eucal}
\usepackage{verbatim}
\usepackage{setspace}
\usepackage[usenames]{color}
\usepackage{colortbl}
\usepackage{hhline}
\usepackage{longtable}
\usepackage{graphicx}
\usepackage[square]{natbib}
Your suggestion sort of worked. I get the right formatting on the entries, but now I get page breaks between figures from different chapters and the pages for chapters with lots of figures ignore the bottom margin and go off the page (entries do not make a new page).
Here is the beginning of my main document:
\documentclass[12pt]{report}
\usepackage{amsmath,amsthm,amsfonts,amscd}
\usepackage{eucal}
\usepackage{verbatim}
\usepackage{setspace}
\usepackage[usenames]{color}
\usepackage{colortbl}
\usepackage{hhline}
\usepackage{longtable}
\usepackage{graphicx}
\usepackage[square]{natbib}
Re: Need help with table of figures formatting
Excuse me, in the re-definition of \l@figure, replace \vspace* by just \vspace. Does everything run smoothly now?
Re: Need help with table of figures formatting
thanks. that worked.
Now to search for answers on formatting the TOC.
Now to search for answers on formatting the TOC.
Re: Need help with table of figures formatting
How can you force 2 spaces between the figure number and the start of the caption in the List of Figures and still maintain the left justify in the caption?
For example
4.1 A figure.................................... 6
.
.
.
5.10 Another figure with a really long
_____title........................................... 17
(Sorry the underscores are only place holders because the spaces were stripped from my post)
Thanks,
Jared
For example
4.1 A figure.................................... 6
.
.
.
5.10 Another figure with a really long
_____title........................................... 17
(Sorry the underscores are only place holders because the spaces were stripped from my post)
Thanks,
Jared
Need help with table of figures formatting
If you compile the code I gave above, you'll see that what you search is just the default behaviour of the book class. I conjecture that you are using a different document class or a package that redefines the formatting of the list of figures. To get more help, you should provide more information or even a minimal working example.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
Re: Need help with table of figures formatting
This is my main document. I understand that it's using style files instead of class files, but it's what my University gave me to work with
. At any rate, here is my main .tex file that includes my preamble:
\documentstyle[12pt,amsmath,graphicx,float,epstopdf]{thesis95}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\rect}{rect}
\makeatletter
\let\l@figureOLD \l@figure
\renewcommand{\l@figure}{\vspace{12pt plus 2pt}\l@figureOLD}
\let\l@table\l@figure
\makeatother
\begin{document}
\baselineskip24pt plus 2pt
\include{title}
\pagenumbering{roman}
\setcounter{page}{2}
\pagestyle{plain}
\include{copy_permission}
\include{approval}
\include{abs}
\include{ack}
\tableofcontents
\baselineskip12pt plus 2pt
\listoffigures
\listoftables
\baselineskip24pt plus 2pt
\include{sym}
\pagestyle{empty}
\include{dedication}
\addtocounter{page}{-1}
\pagestyle {plain}
\setcounter{page}{1}
\pagenumbering{arabic}
\include{intro}
\include{gps_signal}
\include{adaptive_noise_canceling}
\include{adaptive_noise_cancellation_implementation}
\include{simulation_results}
\include{conclusion}
\appendix
\include{ltiapproxderivation}
\include{psdOfGPSL1}
\bibliographystyle{ieeetran}
\bibliography{thesisreferences}
\end{document}

\documentstyle[12pt,amsmath,graphicx,float,epstopdf]{thesis95}
\DeclareMathOperator{\sinc}{sinc}
\DeclareMathOperator{\rect}{rect}
\makeatletter
\let\l@figureOLD \l@figure
\renewcommand{\l@figure}{\vspace{12pt plus 2pt}\l@figureOLD}
\let\l@table\l@figure
\makeatother
\begin{document}
\baselineskip24pt plus 2pt
\include{title}
\pagenumbering{roman}
\setcounter{page}{2}
\pagestyle{plain}
\include{copy_permission}
\include{approval}
\include{abs}
\include{ack}
\tableofcontents
\baselineskip12pt plus 2pt
\listoffigures
\listoftables
\baselineskip24pt plus 2pt
\include{sym}
\pagestyle{empty}
\include{dedication}
\addtocounter{page}{-1}
\pagestyle {plain}
\setcounter{page}{1}
\pagenumbering{arabic}
\include{intro}
\include{gps_signal}
\include{adaptive_noise_canceling}
\include{adaptive_noise_cancellation_implementation}
\include{simulation_results}
\include{conclusion}
\appendix
\include{ltiapproxderivation}
\include{psdOfGPSL1}
\bibliographystyle{ieeetran}
\bibliography{thesisreferences}
\end{document}
Re: Need help with table of figures formatting
Have you read the link I gave? You haven't provided a MWE, since your code can't be compiled. You should attach any relevant file (of course, thesis95.cls, which is not a standard class) and remove any line irrelevant to the problem. Please, do so.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Need help with table of figures formatting
May I ask why you are working in LaTeX2.09 compatibility mode?
You should better work in LaTeX2e mode. To get quick help, follow the advices of Juanjo.
Best regards and welcome to the board
Thorsten¹
Code: Select all
\documentstyle[12pt,amsmath,graphicx,float,epstopdf]{thesis95}
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10