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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Post Reply