I am trying to achieve the following layout of the table of contents
But I'm a little lost on how to use the titlesec
package, because I do not know if this package is really for editing the table of contents or just for the titles…
I appreciate your help
Current advances:
\documentclass[letterpaper,12pt,oneside,onecolumn,final,openany]{report}
\usepackage[left=2.7cm,top=2.5cm,right=2.2cm,nohead,nofoot]{geometry}
\usepackage{titlesec}
\usepackage{tocloft}
\renewcommand{\cftaftertoctitle}{\hrulefill}
\begin{document}
\pagenumbering{roman}
\tableofcontents
\clearpage
\listoffigures
\clearpage
\listoftables
\clearpage
\pagenumbering{arabic}
\chapter{Introduction}
\label{chap:intro}
Lorem
\section{Lorem ipsum}
\label{sec:intro:lorem}
Pellentesque
\subsection{Ipsum}
\label{sec:intro:ipsum}
Etiam
Result:
Best Answer
Here's one possible option: the
titlesec
package was used to format the title for unnumbered sections; thetocloft
package was used to format the section entries in the ToC (only change was to typeset chapter entries in\normalfont
):Since the OP didn't provide any information regarding the formatting for titles of numbered chapters, my example code included a provisional definition in this case.
As a side note, I used that you need roman numbering for the frontmatter part of your document and then arabic numbering in the mainmatter part: this suggests that switching to the
book
document class might be a sensible choice, since now you can use\frontmatter
,\mainmatter
, and\backmatter
which will give you some automatic formatting for page numbering (amongst other things); I also used thetocbibind
package to easily include into the ToC entries for the LoF and LoT :