2

I'd like to remove the vertical line next to the chapter number, but I don't know how to do it. Any suggestion?

Next to Chapter Number there's a vertical line which I don't want and I don't know how to remove it

  • 2
    Welcome to TeX.SX! Remove the draft option from the \documentclass line. The fncychap style you're using makes an overfull box. Please add minimal code that reproduces the issue. – egreg Sep 12 '13 at 22:47
2

The Bjornstrup option for fncychap implements the shifting of the number in the wrong way, producing an overfull box (if the draft option for the class is active, this overfull box will be marked by the black line showed in the image in the question).

You can correct the problem by redefining \DOCH and using \rlap instead of the default \hbox used in the Bjornstrup style:

\documentclass[draft]{book}
\usepackage[Bjornstrup]{fncychap}

\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-\py\raise20pt%
    \rlap{\color[gray]{.5}\CNoV\thechapter}\\%
  }

\begin{document}

\chapter{Test chapter}

\end{document}

enter image description here

I just left the draft option to show that the overfull box warning is now avoided.

As a final personal suggestion, have you considered using another style for your chapter titles?

  • Thank you for your suggestion! No, I didn't consider another style for the chapter titles, do you think it is not the best one? Or do you think there's some other style better to use? Thanks! – Steve Sep 13 '13 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.