# \titlespacing causes Overfull \hbox

This is my document:

\documentclass{article}
\usepackage{titlesec}
\titlespacing{\section}{0pt}{6pt}{6pt}[2.5in]
\begin{document}
\section{Lorem ipsum dolor sit amet, consectetur adipisicing elit}
\end{document}


I'm just trying to make my section titles narrower. Now I'm getting:

Overfull \hbox (5.1815pt too wide) in paragraph at lines 5--5
\OT1/cmr/bx/n/14.4 sit amet, con-secte-tur


And the document looks correct. How to get rid of this warning?

• although there's not enough information here to be definitive, i suspect that somehow paragraph indentation is being included; that would give a uniform additional width to all. – barbara beeton Apr 23 '17 at 16:52

With such a narrow measure, you should use \raggedright for the titles.

\documentclass{article}

\usepackage[raggedright]{titlesec}

\titlespacing{\section}{0pt}{6pt}{6pt}[2.5in]

\begin{document}

\section{Lorem ipsum dolor sit amet, consectetur adipisicing elit}

\end{document}