1

Am fightning for space in my thesis ;)

Have already been able to remove vertical space between chapter breaks in TOC, but trying to do the same thing with LoF and LoT

At present I am using the tocloft package. Using many of the custom spacings in that package I managed to play around with the TOC to my liking

However am not having the same success with the LoF and LoT. Found a bunch of solutions on this stack exchange that worked for other people but so far haven't worked for me.

Here's the preamble that I am using right now: (note there are a couple things commented out, because I thought they did nothing when I had the commands)

\documentclass[10pt, letterpaper, oneside]{book}

\renewcommand{\baselinestretch}{1.5} 


% ####################### PACKAGES TO USE
\usepackage{amsmath} % for equation labelling
\usepackage{amssymb} % for more fancy math symbols
\usepackage[font=footnotesize, labelfont=bf]{caption} % make captions smaller text and make them BOLD 
\usepackage[font=scriptsize,labelfont=bf]{caption}
%\captionsetup{font=scriptsize}
\usepackage[usenames,dvipsnames]{color} % for colOUred text (stupid american spelling...)
\usepackage{enumitem} % to control some lengths in itemized lists
\usepackage{etoolbox}  % various hacks, spacing stuff included
\usepackage{fancyhdr} % for headers on each page (and customization of them)
\usepackage[top=1 in, bottom=1 in, left=1 in, right=1 in]{geometry} % edit individual margins
\usepackage{graphicx} % for figures in general
\usepackage{hyperref} % for "clickable" links to figures/refs/(etc.)
\usepackage{lastpage} % for page __ of __
\usepackage{multicol} % for multiple column environments (in equations and tables)
\usepackage{multirow} % for multiple row environments (in equations and tables)
\usepackage{mdwlist}  % tighter packed bulleted lists
\usepackage[sort&compress,numbers]{natbib} % for getting rid of extra space in references section 
\usepackage{setspace} % for line spacing between lines and also for bibliography
\usepackage{siunitx} % for scientific units (add [scientific-notation=true] for scientific notation always)
\usepackage{tabularx} % to try and get variable-spacing columns
\usepackage{tabu}  % for some fancy table stuff (now with like thicker lines!!)
\usepackage{titlesec}  % for some heading customization (use [compact] option to get rid of white space after section headings)
\usepackage{tocloft} % some TOC customization
\usepackage{threeparttable}
\usepackage{arydshln} % provides dashed lines in tables and arrays



\titleformat{\chapter}[display] {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{10pt}{\huge}   
\titlespacing*{\chapter}{0pt}{-25pt}{30pt}

% TOC/LOF/LOT spacing changes (uses tocloft package)
\setlength{\cftbeforechapskip}{0.5 em} % space between chapters in TOC only
\setlength{\cftbeforetoctitleskip}{-1em} % space before the TOC title
\setlength{\cftaftertoctitleskip}{2em} % space after TOC title

%\setlength{\cftbeforefigskip}{0.5 em}
\setlength{\cftbeforeloftitleskip}{-1 em} % space before the LoF title
\setlength{\cftafterloftitleskip}{2 em} % space after the LoF title

\setlength{\cftbeforelottitleskip}{-1 em} % space before the LoT title 
\setlength{\cftafterlottitleskip}{2 em} % space after the LoT title



\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<succes>}{<failure>}
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}% LoF
\addtocontents{toc}{\protect\renewcommand*\protect\addvspace[1]{}}
%\patchcmd{\@chapter}{\addtocontents{lot}{\protect\addvspace{2\p@}}}{}{}{}% LoT
\makeatother


\setlength{\parindent}{2.5em} % first line indent size
\setlist[itemize]{leftmargin=*}
\setlist[enumerate]{leftmargin=*}



\graphicspath
{
    {./img/}
    {./img/chapter1/}
    {./img/chapter2/}
    {./img/chapter3and4/} % chapters 3 and 4 were once one chapter
    {./img/chapter5/}
    {./img/chapter6/}
    {./img/chapter7/}
    {./img/chapter8/}
    {./img/chapter9/}
}



\hypersetup
{
    colorlinks = true,
    citecolor = black,
    linkcolor = blue, % link colour for figure, equation, + table refs
    urlcolor = black, % link colour for websites (mainly in citations)
}


\makeatletter
\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}% LoF
\addtocontents{toc}{\protect\renewcommand*\protect\addvspace[1]{}}
\def\ttl@tocsep{}
\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}}
\def\@bstctlcite[#1]#2{\@bsphack
    \@for\@citeb:=#2\do{%
        \edef\@citeb{\expandafter\@firstofone\@citeb}%
        \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
    \@esphack}
\makeatother 


\renewcommand\chaptermark[1]{\markboth{\textsc{Chapter \thechapter:\ #1}}{}}
\fancyhf{}
\fancyhead[L]{\leftmark}
\renewcommand\headrulewidth{0pt}% suppress the header rule
%\fancyfoot[C]{\thepage}
\fancyhead[R]{\thepage}


\renewcommand{\bibname}{References} % ("biblography" is kinda boring)
\renewcommand{\contentsname}{Table of Contents}
1
  • To all still were watching this question... I managed to play around with the tocloft package to make it work to my liking. Best of luck to all LaTeX-ers :)
    – bsquared
    Jul 21, 2019 at 3:16

1 Answer 1

1

If you would use the memoir (covers the book class) class instead of book then the answer is simple. In the preamble put:

\renewcommand{\insertchapterspace}{}

which revises the \chapter macro to put no additional spaces into the LOF and ToC.

In your MWE you have a line along the lines of

\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{}{}{}

Why do you have two copies of this?

Perhaps if you changed this to ...\addvspace{0\p@}... like

\patchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{0\p@}}}{}{}{}

you would get what you want in the LoF.

For the ToC a similar macro, replacing {lof} by {lot}.

4
  • Hey! Sorry could you elaborate on that 2nd solution? Didn't get what you meant by that command.
    – bsquared
    Oct 13, 2018 at 20:47
  • @bsquared I have edited my answer to make it clearer Oct 14, 2018 at 17:35
  • Hmm I tried your suggestion and it didn't work out the way it was expected to. Also changing the thing to memoir brought about additional issues. I did manage to shave a couple pages off by reducing font size of the LoF/LoT sections. Maybe for next draft I'll play around with memoir class.
    – bsquared
    Oct 16, 2018 at 15:43
  • @bsquared I suggest you revise/minimise your MWE. (I didn't understand what you were trying to achieve.) Remove all duplicate code, remove all commented code, remove all packages that are not relevant to setting the LoF and ToC. Add in example text (between \begin{document} and \end{document}. Then try again with another question perhaps. Oct 16, 2018 at 18:19

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.