Text Formatting ⇒ Italicising entries in content page
Italicising entries in content page
I'm new to these forums, and fairly new to LaTeX and thus, experiencing some problems. So far, I've been able to solve pretty much any problem, except for what I am now going to describe! I've searched these forums and elsewhere, but to no avail. If the solution was in front of my eyes the whole time, then I apologise for taking your time.
Basically, I want to italicise the 3rd-level entries on my table of contents. So the chapter (X) appears normal, the section (X.X) appears normal, but the subsection (X.X.X) needs to be in italic. I want this to be the case in my contents only, and not anywhere else in the doc. Any suggestions? Thank you in advance.
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
Italicising entries in content page
the tocloft package can do the job; a little example:
Code: Select all
\documentclass{book}
\usepackage{tocloft}
\renewcommand\cftsubsecfont{\itshape}
\begin{document}
\tableofcontents
\chapter{Test chapter one}
\section{Test section one one}
\subsection{Test subsection one one one}
\subsection{Test subsection one one two}
\section{Test section one two}
\subsection{Test subsection one two one}
\chapter{Test chapter two}
\section{Test section two one}
\subsection{Test subsection two one one}
\end{document}
Re: Italicising entries in content page
On another note, to what extent is LaTeX used beyond academia? I enjoy using it and love the output LaTeX gives, but have nearly finished my report so I can't see where or when I would be using this again...
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Italicising entries in content page
There's almost no document leaving my machine that isn't done with LaTeX (application, CV, letter, ...). Some inspiration might come from the TeX Catalogue [1]. It lists many classes and packages that help you to prepare documents beyond science.-Z-MAN wrote:[...] On another note, to what extent is LaTeX used beyond academia? I enjoy using it and love the output LaTeX gives, but have nearly finished my report so I can't see where or when I would be using this again [...]
As soon as your problem is solved, lease mark the topic accordingly by editing your initial post and choosing the green checkmark from the icon list.
[1] The TeX Catalogue Online, Topic Index
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Italicising entries in content page
Just like localghost, I write everything (academic or not) using LaTeX. For a nice collection of Humanities books typeset with TeX, you can take a look at this site:-Z-MAN wrote:...On another note, to what extent is LaTeX used beyond academia? I enjoy using it and love the output LaTeX gives, but have nearly finished my report so I can't see where or when I would be using this again...
http://www.tsengbooks.com/