0

I have a problem with the font size of the entries for List of figures and List of tables on the Contents index. If I change the fonts for the titles of LoF and LoT, the same changes are applied in their entries on Contents. How can I set the font size of the entries of LoF and LoT manually so as they look the same as the entries of the chapters?

I've used

\usepackage{tocloft}
\usepackage[nottoc]{tocbibind}
\renewcommand{\contentsname}{\fontsize{40}{0}{\selectfont{Contents}}}
\renewcommand\cftsecfont{\LARGE\bfseries}
\renewcommand\cftsecpagefont{\LARGE\bfseries}

\renewcommand\cftsubsecfont{\Large\bfseries}
\renewcommand\cftsubsecpagefont{\Large\bfseries}
\renewcommand\cftloftitlefont{\normalsize\bfseries}


\renewcommand{\listfigurename}{\fontsize{40}{0}{\selectfont{List of figures}}}
\renewcommand{\listtablename}{\fontsize{40}{0}{\selectfont{List of tables}}}
  • 2
    the \xxxname commands should only ever expand to text never font settings, but also \fontsize{40}{0}{\selectfont{List of tables}} is wrong, the \selectfont should not be inside a group, this leaves \fontsize{40}{0} in effect after this text and it will apply at the next \selectfont forcing a baselineskip of 0pt??? – David Carlisle Apr 22 '19 at 11:55
1

It would have been helpful to provide an MWE. Instead I had to waste time creating one to try and answer your, rather unclear, question. Here is a brief one (less any typos) that you should consider as I think that it might be helpful to you.

% tocloftprob.tex  
\documentclass{report}
\usepackage{lipsum}
\usepackage{comment}

\usepackage{tocloft}
\usepackage[nottoc]{tocbibind}
\begin{comment} % ignore your code
\renewcommand{\contentsname}{\fontsize{40}{0}{\selectfont{Contents}}}
\renewcommand\cftsecfont{\LARGE\bfseries}
\renewcommand\cftsecpagefont{\LARGE\bfseries}

\renewcommand\cftsubsecfont{\Large\bfseries}
\renewcommand\cftsubsecpagefont{\Large\bfseries}
\renewcommand\cftloftitlefont{\normalsize\bfseries}

\renewcommand{\listfigurename}{\fontsize{40}{0}{\selectfont{List of figures}}}
\renewcommand{\listtablename}{\fontsize{40}{0}{\selectfont{List of tables}}}
\end{comment} % end of your code

\renewcommand{\cfttoctitlefont}{\hfill\Large\itshape} % Change the font (and  position) of the titles
\renewcommand{\cftloftitlefont}{\hfill\Large\itshape} % and for the LoF and Lot
\renewcommand{\cftlottitlefont}{\hfill\Large\itshape}
\renewcommand{\cftfigfont}{\bfseries} % change the font for figure entries
\renewcommand{\cftfigpagefont}{\bfseries} % change the font for figure caption pages

\begin{document}

\tableofcontents
\listoffigures
\listoftables

\chapter{One}
\section{One}
\lipsum[1]
\begin{figure}
\centering
\caption{A Figure}
\end{figure}
\lipsum[2]
\begin{table}
\centering
\caption{A Table}
\end{table}

\chapter{Two}
\section{Two}
\lipsum[1]
\begin{figure}
\centering
\caption{Another Figure}
\end{figure}
\lipsum[2]
\begin{table}
\centering
\caption{Another Table}
\end{table}

\end{document}

I suggest you read the tocloft documentation for further information (> texdoc tocloft).

GOM

| improve this answer | |

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.