# overfull hbox in the chapter

What is the preferred way of fixing an overfull hbox problem when it complains about the chapter title.

MWE (complains about the \chapter{Chapter title} line):

\documentclass[12pt,twoside]{book}
\textwidth 150mm
\usepackage[Bjornstrup]{fncychap}

\oddsidemargin 5mm
\evensidemargin 5mm
\topmargin 0mm
\textheight 225mm

\begin{document}
\chapter{Chapter title}
lorem impsum.

\end{document}


Looking at the different threads on TeX.se I could not find the answer. Since I have many chapters, I would appreciate a more general solution.

-

Looks like a bug in fncychap It is always 10pt too much,

\documentclass[12pt,twoside]{book}
\textwidth 150mm

\usepackage[Bjornstrup]{fncychap}
\makeatletter
\renewcommand{\DOCH}{%
\settowidth{\py}{\CNoV\thechapter}%
\addtolength{\py}{-10pt}%     % Amount of space by which the
%                                  % number is shifted right
\fboxsep=0pt%
\colorbox[gray]{.85}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}%
\kern-\myhi
\kern-\py\raise20pt%
\hbox{\color[gray]{.5}\CNoV\thechapter}%
%\kern-\myhi
\\%
}
\makeatother
\oddsidemargin 5mm
\evensidemargin 5mm
\topmargin 0mm
\textheight 225mm

\begin{document}
\chapter{Chapter title}
lorem impsum.

\end{document}


You can add a -10pt kern to fix it, I show a couple of places (one commented out, depending on the look you prefer)

-
Thanks, but I am still getting the error msg: "Overfull \hbox (10.0pt too wide) in paragraph at lines 27--27" – user3232 Jan 8 '13 at 12:12
I just re-copied the code in my answer and ran it through pdftex and no overfull box. Are you sure you are picking up the modified version? – David Carlisle Jan 8 '13 at 12:17
Hmm, yes I did run your code. But, I cleaned the temporary files and recompiled and it works. – user3232 Jan 8 '13 at 13:06