Text FormattingChange LOC,LOT,LOF title size using /tocloft

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
koba8791
Posts: 8
Joined: Thu Apr 15, 2021 10:39 pm

Change LOC,LOT,LOF title size using /tocloft

Post by koba8791 »

Hey all!

I am using /tocloft package and want to change my List of Contents, List of Tables and List of Figures titles to normal size font, bold, and centred but am having troubles.

Help please!

Code below:

Code: Select all

\documentclass[a4paper,12pt]{article}

\usepackage{graphicx}
\usepackage{graphicx,subfigure}
\usepackage{hyperref}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{blindtext}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{placeins}
\usepackage{tocloft}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\fancyhf{}
\fancyfoot[R]{\thepage}

\usepackage{mathptmx}
\usepackage{sectsty}
\sectionfont{\fontsize{12}{14}\selectfont}
\subsectionfont{\fontsize{12}{14}\selectfont}
\subsubsectionfont{\fontsize{12}{14}\selectfont}

\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{courier}
\usepackage{setspace}
\usepackage[table,svgnames]{xcolor}
\usepackage{fancyvrb} 
\usepackage{listings}

\usepackage[labelsep=period]{caption}
\usepackage[justification=centering]{caption}
\usepackage[labelfont=bf]{caption}
\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
\DeclareCaptionFont{mysize}{\fontsize{11}{13}\selectfont}
\captionsetup{font=mysize, singlelinecheck=off}

\renewcommand{\cftfigfont}{Fig. }
\renewcommand{\cfttabfont}{Table }
\renewcommand{\cftfigaftersnum}{.}
\renewcommand{\cfttabaftersnum}{.}
\setlength{\cfttabindent}{0pt}
\setlength{\cftfigindent}{0pt}
\renewcommand{\cfttabaftersnumb}{\hspace{-1em}}
\addto\captionsenglish{
\renewcommand*\contentsname{\hfill List of Contents \hfill}
}
Last edited by Stefan Kottwitz on Tue Apr 20, 2021 1:17 am, edited 1 time in total.
Reason: Code marked

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

Post Reply