I want each section title to be underlined, with the section number on the right. Furthermore I want to use parskip
. This is what I did to get that:
\documentclass[12pt,a4paper]{article}
\usepackage[explicit]{titlesec}
\titleformat{name=\section}[block]{\normalfont\Large}{}{0pt}{\makebox[\textwidth]{#1 \hfill \thesection}}[\vspace{1ex}\titlerule]
\usepackage[parfill]{parskip}
\begin{document}
\section{Introduction}
\end{document}
However, now I get an error:
Overfull \hbox (30.0pt too wide) in paragraph at lines 9--9
|[]|
I turned on \usepackage{showframe}
, but visually everything is within the borders.
How can I fix this, or hide the warning?
%
after the final braces in lines 2 and 4.Overfull \hbox (3.1333pt too wide)
which is to be expected because of the two spaces. The 30pt is quite large and can't be explained only by your code snippet.