Graphics, Figures & TablesUneven spacing for list of figures and tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
kunkevin
Posts: 2
Joined: Fri Nov 02, 2012 9:59 pm

Uneven spacing for list of figures and tables

Post by kunkevin »

There is a big problem for my thesis latex compilation. There are uneven spacing for the list of figures and tables. I have attached the pictures for them. In the list of figures, the spacing between 1.1 and 4.1 is too small, while the space between 4.1 and 4.2 is too large. The other spacing is normal. In the list of tables, the spacing between 4.1 and 4.2 is too small. The other spacing is also normal. I am very frustrated by this bug. If anyone could help or give some hint, I will be very thankful.

In the template, part of the coding for listoffigures and listoftables is:

Code: Select all

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           lIST OF FIGURES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\phantomsection
\addcontentsline{toc}{chapter}{LIST OF FIGURES}

\renewcommand{\cftloftitlefont}{\center\normalfont\MakeUppercase}

\setlength{\cftbeforeloftitleskip}{-12pt} %% Positions the LOF title vertically to match the chapter titles

\renewcommand{\cftafterloftitleskip}{12pt}
%\renewcommand{\cftafterloftitle}{%
%\\[\baselineskip]\mbox{}\hfill{\normalfont Page}}

\renewcommand{\cftafterloftitle}{%
%\\[\vspace{4em}]\mbox{}\hspace{2pt}FIGURE\hfill{\normalfont Page}}%\vskip\baselineskip}
\\[3.0\baselineskip]\mbox{}\hspace{4pt}TABLE\hfill{\normalfont Page}}
%\\[3.0\baselineskip]\mbox{}\hspace{2pt}FIGURE\hfill{\normalfont Page}\vskip\baselineskip}
\begingroup


\begin{center}
\begin{singlespace}
%% These values make the lof table entries appear double spaced between.
\setlength{\cftbeforechapskip}{0.4cm}
\setlength{\cftbeforesecskip}{0.30cm}
\setlength{\cftbeforesubsecskip}{0.30cm}
\setlength{\cftbeforefigskip}{0.4cm}
\setlength{\cftbeforetabskip}{0.4cm}
%\setlength{\cftfignumwidth}{30em} 

\listoffigures

\end{singlespace}
\end{center}
\pagebreak{}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           lIST OF TABLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\phantomsection
\addcontentsline{toc}{chapter}{LIST OF TABLES}  % Needs to be set to part, so the TOC doesnt add 'CHAPTER ' prefix in the TOC.

\renewcommand{\cftlottitlefont}{\center\normalfont\MakeUppercase}

\setlength{\cftbeforelottitleskip}{-12pt} %% Positions the LOT title vertically to match the chapter titles

\renewcommand{\cftafterlottitleskip}{12pt}

\renewcommand{\cftafterlottitle}{%
%\\[\vspace{4em}]\mbox{}\hspace{4pt}TABLE\hfill{\normalfont Page}}
\\[3.0\baselineskip]\mbox{}\hspace{4pt}TABLE\hfill{\normalfont Page}}

\begin{center}
\begin{singlespace}

%% These values make the lot table entries appear double spaced between.
\setlength{\cftbeforechapskip}{0.4cm}
\setlength{\cftbeforesecskip}{0.30cm}
\setlength{\cftbeforesubsecskip}{0.30cm}
\setlength{\cftbeforefigskip}{0.4cm}
\setlength{\cftbeforetabskip}{0.4cm}


\listoftables

\end{singlespace}
\end{center}
\endgroup
\pagebreak{}  % Need this for the pagenumbering to be correct.
uneven spacing for list of tables.jpg
uneven spacing for list of tables.jpg (25.44 KiB) Viewed 12245 times
uneven spacing for list of figures.jpg
uneven spacing for list of figures.jpg (19.08 KiB) Viewed 12245 times
Last edited by cgnieder on Sat Nov 03, 2012 3:03 pm, edited 4 times in total.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Uneven spacing for list of figures and tables

Post by Stefan Kottwitz »

Hi,

welcome to the board!

Nice that you posted a part of the output, so we can see there's a problem. However, the cause remains unknown if you don't post the corresponding code, such as a very reduced copy of your thesis, which is compilable and shows the problem, i.e. a Infominimal working example.

Post something we can test, then I'm sure we can fix it.

Stefan
LaTeX.org admin
kunkevin
Posts: 2
Joined: Fri Nov 02, 2012 9:59 pm

Re: Uneven spacing for list of figures and tables

Post by kunkevin »

Hi Stefan,

Since you asked me to put the minimal part of the latex coding, I was trying to post the original template here. Comparing the original one with my current latex coding, I suddenly found the part I am missing in the coding for generating the figure. I changed that part, and now everything works very well. Anyway, I still thank you for your help.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Uneven spacing for list of figures and tables

Post by Stefan Kottwitz »

No problem. Trying to pin down the problem often leads to the solution. If not, we are usually able to find it in the reduced code.

Stefan
LaTeX.org admin
solodon
Posts: 2
Joined: Tue Aug 06, 2013 7:56 am

Re: Uneven spacing for list of figures and tables

Post by solodon »

So what was the problem in your code Kevin? I have exactly the same issue but can't figure out why some of them are shown properly while others are not. Thank you!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Uneven spacing for list of figures and tables

Post by Stefan Kottwitz »

Hi solodon,

welcome to the forum!

Perhaps describe your problem with code, see my question to Kevin above. It's possible that it's a different cause.

Stefan
LaTeX.org admin
solodon
Posts: 2
Joined: Tue Aug 06, 2013 7:56 am

Re: Uneven spacing for list of figures and tables

Post by solodon »

I played around with what could possibly cause it and found the itemize lists way before the figures in text somehow affect this spacing issue. In particular, if itemize had 2 or more items, it was causing the problem. Any ideas on how to workaround this?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Uneven spacing for list of figures and tables

Post by Johannes_B »

As Stefan already said, we need to see a little code. Please read about minimal working examples. Right now we all could do more but guess. With code we can spot the erronous part and can directly test possible solutions.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply