# Add a dot after chapter and section/figure/table number in ToC/LoF/LoT using tocstyle

I am using package tocstyle package to format my ToC/LoF/LoT lists. I saw already some answers using other packages, but none with tocstyle. And the use of tocstyle is "mandatory". I want to have a dot after chapter and section/figure/table number in ToC/LoF/LoT, but I was not able to achieve that trying to use \settocfeature{}{}. For example (notice the dot after the number and before the text itself).

ToC
1. Chapter 1 ............................................................ 4

LoF
1.1. Figure 1 ........................................................... 7

LoT
1.1. Table 1 ............................................................ 8


My MWE is below:

\documentclass{report}

\usepackage{tocstyle}

\begin{document}

\tableofcontents

\chapter{Chapter 1}

\end{document}


\newcommand{\autodot}{.}


to your preamble, which will insert a . after all numbers in the ToC.

\documentclass{report}

\usepackage{tocstyle}
\newcommand{\autodot}{.}

\begin{document}

\tableofcontents

\chapter{Chapter 1}

\end{document}

• I wasn't unable to get this to compile...is \autodot defined in report or tocstyle? – Guho Oct 21 '15 at 17:30
• @Guho: Sorry, fixed. – Werner Oct 21 '15 at 17:40
• @cacamailg: Thanks; I blame it on my debugging skills. – Werner Oct 21 '15 at 17:40
• Now I'm confused. Setting \autodot to . results in the dot being included in the TOC output/formatting, hence, \autodot is already used in the respective command. However, \autodot is not defined until \newcommand{autodot}{.}. How does the unmodified code not throw an Undefined control sequence error? I didn't see anything in tocstyle that checked if \autodot was defined. – Guho Oct 21 '15 at 17:56

You can redefine tocstyle's version of \numberline to add the dot:

\makeatletter
\let\oldtocstyle@numberline\tocstyle@numberline
\def\tocstyle@numberline#1{\oldtocstyle@numberline{#1.}}
\makeatother