# How to change horizontal spacing before section number

How do i change the small horizontal spacing that is present before a section number?

I have used the command \titlespacing from package titlesec to set the left spacing to 0, but it is still present. Small example

\documentclass[12pt,a4paper,titlepage]{article}
\usepackage{titlesec}
\titleformat{\section}[display]{\normalfont \bfseries}{\hspace{0mm} \thesection}{1em}{}
\titlespacing{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\begin{document}
\section{Section title}

Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet

\end{document}


If you look at the output, "Section title" is aligned to the second line of text perfectly, whereas the section number "1" is slightly moved to the right.

• Use only \thesection, not \hspace{0mm} \thesection. – Werner Jun 2 '13 at 14:11

in your definition of \titleformat, the "real" space between
\hspace{0mm} \thesection}{1em}{}

\hspace{0mm}\thesection}{1em}{}

• \hspace{0mm} can also be deleted. – Gonzalo Medina Jun 2 '13 at 14:15