[Tex/LaTex] How to add dot after \section number in headline and ToC, without adding dot to \ref command


I need \section (\subsection, \subsubsection …) titles printed with dot after numbering.


  1. My Title

For this purpose i use:

\renewcommand\thesection{\normalfont \arabic{section}.}




But this method also adds extra dot to \ref{} commands. So code "Look at section \ref{section:label}." produces string "Look at section 3.."

Is there any way to add dot only to headlines and ToC, but not to references?

Best Answer

Here is how to do with titlesec/titletoc. The dot after the label is added by \titleformat, not by \thesection. As for the dot in the table of contents, it is an option in titletoc. In addition, I use cleveref for a simpler writing of cross-references.


\titleformat{\section}[hang]{\bfseries\large}{Section \thesection.}{0.4em}{}




\section{Another section}
See \Cref{sec:prelim}.


enter image description here