In my LaTex paper, I need to produce such a table of contents, list of figures and list of tables, all of which have the title being centered and capitalized, and other special additions (such as inserting lines with words "Chapters", "Figure", and "Table"). My elaborations on this project so far produced this latex code (see below).

However, the only thing that does not work for me is centering the title of the table of contents, which is labelled as one word "Contents." See the picture of the pdf output file below. What should I fix in my code? For my manipulations I used two packages: titlesec and tocloft.

% Set the page margins as required
\usepackage{graphicx}     % Required for inserting images
\usepackage{setspace}\doublespacing % Double space 
\usepackage{endnotes}     % All notes 2b place at a separate section 'Endnotes'
\usepackage{acro}         % Acronyms/abbreviations
\include{00-Acronyms}     % List of acronyms, 2b updated
%--> acro manual: https://mirror2.sandyriver.net/pub/ctan/macros/latex/contrib/acro/acro-manual.pdf
% Managing sections
\usepackage{titlesec}     % To modify the section titles
\renewcommand\thesection{\arabic{section}} % CHAPTER 1 [New Line] TITLE
\titleformat{\section}[display]            % each chapter has two lines...
% Capitalizing the titles of the respective sections:
\renewcommand{\notesname}{\centering \MakeUppercase{Endnotes}}
\renewcommand{\contentsname}{\centering \MakeUppercase{Contents}}
\renewcommand{\refname}{\centering \MakeUppercase{References}}
\renewcommand{\listfigurename}{\centering \MakeUppercase{List of Illustrations}}
\renewcommand{\listtablename}{\centering \MakeUppercase{List of Tables}}
\usepackage{tocloft}      % <-- ...to modify ToC, LoF, and LoT
\renewcommand{\cfttoctitlefont}{\hfill\Large} % ToC = Table of Contents
\renewcommand{\cftloftitlefont}{\hfill\Large} % LoF = List of Figures
\renewcommand{\cftlottitlefont}{\hfill\Large} % LoT = List of Tables
\usepackage{natbib}       % Bibliography management
% My info
\date{October 14th, 2023}

% ----- Start of the document --------------------------------------------------
% All notes to be in the separate section 'Endnotes'

% Table of Contents + making TOC not in bold font
{\let\bfseries\mdseries \tableofcontents} \newpage

% List of Figures/Illustrations
\addtocontents{lof}{{~Figure}~\hfill{Page}\par} % <- inserting a line w/"Figure"
\addcontentsline{toc}{section}{\uppercase{List of Illustrations}}

% List of Tables
\addtocontents{lot}{{~Table}~\hfill{Page}\par} % <- inserting a line w/ "Table"
\addcontentsline{toc}{section}{\uppercase{List of Tables}}

% List of Acronyms/Abbreviations
\printacronyms[pages = {display=all,seq/use=false},
           name  = \uppercase{List of Acronyms}]
\addcontentsline{toc}{section}{\uppercase{List of Acronyms}}

% ... some latex code

% ----- End of the document ----------------------------------------------------

enter image description here

  • Use \usepackage[titles]{tocloft} Commented Oct 19, 2023 at 16:34
  • @SimonDispa thanks very much! It works.
    – Alex
    Commented Oct 19, 2023 at 17:16
  • You can add it as an answer to your question to help other readers. (And accept the answer yourself) Commented Oct 19, 2023 at 17:47
  • Like this? See below @SimonDispa
    – Alex
    Commented Oct 19, 2023 at 17:58
  • x-post stackoverflow.com/q/77325346/2777074 Commented Oct 22, 2023 at 19:15

1 Answer 1


The answer to my question was to change this line of the code above:


And it works just fine!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .