Text FormattingBox around the title is broken

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

Box around the title is broken

Post by latexforever »

Hello,

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

Here is a MWE:

Code: Select all

\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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

Box around the title is broken

Post by gmedina »

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:

Code: Select all

\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:

Code: Select all

\documentclass[10pt,a4paper,twoside,final,makeidx,openright]{book}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10320
Joined: Mon Mar 10, 2008 9:44 pm

Box around the title is broken

Post by Stefan Kottwitz »

Just in case, if you really want to use the landscape environment you could use this workaround after loading fncychap:

Code: Select all

\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
LaTeX.org admin
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Box around the title is broken

Post by gmedina »

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:

Code: Select all

\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

Box around the title is broken

Post by latexforever »

Thanks for all your answers. My problem is now solved. I used

Code: Select all

    \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.)
Post Reply