## LaTeX forum ⇒ Text Formatting ⇒ Box around the title is broken

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm

### Box around the title is broken

Hello,

When using the Rejne fncychap's parameter, my \chapter boxes are partly broken.

Here is a MWE:

\documentclass[10pt,a4paper,twoside,final,makeidx,openright]{book} \usepackage[latin1]{inputenc}\usepackage[frenchb,english]{babel} \usepackage{rotating}\usepackage{lscape}\usepackage[Rejne]{fncychap}  \begin{document} \begin{landscape}\chapter{Dummy Chapter}Dummy text.\end{landscape} \end{document}

What can I do? Thanks.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Hi,

do you intend to write all your document in landscape format? If this is so, then you could load the geometry package with the landscape option:

\documentclass{book}\usepackage[landscape]{geometry}\usepackage[Rejne]{fncychap}  \begin{document} \chapter{Dummy Chapter}Dummy text. \end{document}

By the way, makeidx is not a class option; you can delete it from this line:

\documentclass[10pt,a4paper,twoside,final,makeidx,openright]{book}
1,1,2,3,5,8,13,21,34,55,89,144,233,...

Stefan Kottwitz
Posts: 9602
Joined: Mon Mar 10, 2008 9:44 pm
Just in case, if you really want to use the landscape environment you could use this workaround after loading fncychap:
\let\oldDOTI\DOTI\renewcommand*\DOTI[1]{\setlength{\textwidth}{\linewidth}\oldDOTI{#1}}

If the complete document should be in landscape format I agree with gmedina.

Stefan

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm
Another option, if the landscape environment must be used (i.e., if not the totality of the document shoud be in landscape format), is to use the titlesec package to imitate the Rejne style for chapters[1]. The code looks something like the following:

\documentclass{book}\usepackage{lscape}\usepackage{titlesec} \titleformat{\chapter}[frame]   {\normalfont}   {\filcenter\enspace{\Huge\thechapter}\enspace\filcenter}   {35pt}   {\Huge\filcenter}\titlespacing*{\chapter}    {0pt}{50pt}{65pt} \begin{document} \begin{landscape}\chapter{Dummy Chapter}Dummy text.\end{landscape} \end{document}

[1] In fact, the titlesec package allows the user to easily define the styles predefined by the fncychap package, and besides, you can create a wide variety of new styles.
1,1,2,3,5,8,13,21,34,55,89,144,233,...

latexforever
Posts: 120
Joined: Fri Nov 14, 2008 9:40 pm
Thanks for all your answers. My problem is now solved. I used
     \let\oldDOTI\DOTI     \renewcommand*\DOTI[1]{\setlength{\textwidth}{\linewidth}\oldDOTI{#1}}
, as suggested by Stefan. I saved the other solutions too.

(I did not want my whole document to be in landscape format.)