0

I am using the fncychap package to format my document with the Rejne option. However, the boxes' size differ when using the commands chapter* and chapter. The box is slightly wider with the chapter option (see picture below). Does anyone know how to correct this so that they have the same length ?

Text

These were generated by the following code.

\documentclass{book} 

\usepackage[Rejne]{fncychap} 
\usepackage[nonefgrulers]{fgruler}

\begin{document}

    \chapter*{Star}
        \vspace*{-34mm}\ruler{rightdown}{12.3cm}

    \chapter{No star}
        \vspace*{-19mm}\ruler{rightdown}{12.3cm}

\end{document}
2
  • 1
    Welcome to TeX.SE... Can you show your actual requirement by posting an image?
    – MadyYuvi
    Feb 18, 2021 at 3:42
  • The requirement would be that both boxes be of the same length. In the image above the first box is 123mm wide and the second one is 120mm.
    – Constentin
    Feb 18, 2021 at 13:48

1 Answer 1

2

The following code does the trick:

\makeatletter
 \renewcommand{\DOTIS}[1]{%
    \setlength{\py}{\fboxrule}
    \setlength{\fboxrule}{\RW}
    \setlength{\mylen}{\textwidth}
    \addtolength{\mylen}{-2\RW}
    \addtolength{\mylen}{-2\fboxsep} %%%%
    \fbox{\parbox{\mylen}{\vskip 2\baselineskip\CTV\FmTi{#1}\par\nobreak\vskip \baselineskip}} 
    \setlength{\fboxrule}{\py}
    \vskip 60\p@
    }
 \makeatother

You must log in to answer this question.

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