0

I am using fncychap with the following configuration in a document:

\usepackage[Bjornstrup]{fncychap}
\ChTitleVar{\raggedleft\Large\rm\bfseries}

When I create a new chapter without a title, e.g. Dedication, a half-empty gray box is drawn on the page.

\newcommand{\dedication}{
\pagestyle{plain}
        \chapter*{}
        \addcontentsline{toc}{chapter}{Dedication}
}

\dedication {
    \begin{quote}
        \raggedleft {\em to ...}
    \end{quote}
}

enter image description here

I have looked at different parameters provided in the documentation but none of them seems to be related to removing this box on chapter*{}.

I was wondering if I can modify the definition of dedication or modify some configurations of fncychap to remove this box on certain chapters.

P.S. I prefer the text to be written where it is normally written and not moved up to where the gray box is.

1 Answer 1

1

Copy the following lines before the chapters where you want to header gone:

% Remove the gray box for chapter* with empty titles
\makeatletter
  \renewcommand{\DOTIS}[1]{%
    \vskip 40\p@%
}
\makeatother

And copy the following lines after the chapter is finished.

% Bring the gray box back for chapter* with titles
\makeatletter
  \renewcommand{\DOTIS}[1]{%
    \fboxsep=0pt
    \colorbox[gray]{.85}{\rule{0pt}{40pt}\parbox[b]{\textwidth}{\hfill}}\\%
    \nointerlineskip\raggedright%
    \fboxsep=\myhi%
    \colorbox[gray]{.85}{\parbox[t]{\mylen}{\CTV\FmTi{#1}}}\par\nobreak%
    \vskip 40\p@%
}
\makeatother

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .