[Tex/LaTex] Add dot after the figure number in List of Figure (LoF)

table of contents

I'm trying to add a dot after the number of figures in the LoF. I searched for solutions and the only workable one was to add the following to the preamble:

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

But this code affect my ToC style since it add dots to the sections which I don't want

My code for the ToC:

\usepackage{tocloft}

% Rename the contents title
\renewcommand*\contentsname{Table of Content}

%Add dot after the section number
\renewcommand{\cftsecaftersnum}{.}%

ToC

My List of Figures:

LoF

The document class is article.

Now how can I add a dot after the figure number without affecting my ToC.

Thanks

Best Answer

f505AticleToc

\documentclass{article}
\usepackage{blindtext}
\usepackage{tocstyle}
\usepackage{capt-of}
\usetocstyle{standard}
\begin{document}
\tableofcontents
\newcommand{\autodot}{.}
\usetocstyle{allwithdot}
\listoffigures
\captionof{figure}{Wombat}
\blinddocument
\blinddocument
\end{document}

If you want a dot after the section number in the toc, move the autodot line to the preamble.