Document ClassesFancy Chapter Headings

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
thedoctor818
Posts: 92
Joined: Fri Apr 24, 2009 8:02 pm

Fancy Chapter Headings

Post by thedoctor818 »

Hello all,

I am typing/editing a doc using the memoir class and "Bjornstrup" fancy chapter headings. Whenever I try to adjust (shrink) the margins using the geometry package, odd things happen: the bottom right corner of the grayed area in header which is 'behind' (for lack of a better word) the chapter number starts to disappear: bit-by-bit. Here is my attempt to reproduce a MWE:

Code: Select all

\documentclass[a4paper,12pt,twoside]{book}
\input{preamble}
\begin{document}
\include{chapter1}
\end{document}

Code: Select all

\usepackage{lmodern}
\usepackage{geometry}
\usepackage[dvipsnames]{xcolor}
\usepackage{amssymb}
\usepackage{framed}
\usepackage{indentfirst}
\usepackage{changes}
\usepackage[Bjornstrup]{fncychap}
\usepackage[pagestyles]{titlesec}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
\ChNumVar{\fontsize{76}{80}\usefont{OT1}{pzc}{m}{n}\selectfont}
\ChTitleVar{\raggedleft\Huge\sffamily\bfseries}
 
\titleformat{\section}[display]
 {\normalfont\Huge\scshape\mdseries\centering}{}{16pt}{\Large}
\titlespacing*{\section}
 {0pt}{20pt}{16pt}

\titleformat{\subsection}
 {\normalfont\Large\bfseries\centering}{}{1em}{}
\titlespacing*{\subsection}
 {0pt}{3.25ex plus 1.0ex minus 0.2ex}{1.5ex plus 0.2ex}
 
\titleformat{\subsubsection}
{\normalfont\large\scshape\mdseries\centering}{}{1em}{}
\titlespacing*{\subsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}

\titlespacing{\section}{0pt}{*2}{*2}
\titlespacing{\subsection}{0pt}{*2}{*2}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
\geometry{
  left=2.85cm,
  right=2.85cm,
  top=1.95cm,
  bottom=2.25cm
}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % 
\newpagestyle{main}{
  \headrule
  \sethead[\scshape\chaptertitle][][]{}{}{\slshape\chaptertitle}
  \setfoot[][\thepage][]{}{\thepage}{}
}
\pagestyle{main}

Code: Select all

\chapter{Saturday Evening Prayers}
  Towards evening, we stand before the holy icons (having lit a candle and maybe some incense), with reverence and fear of God; we gather our thoughts, make the Sign of the Cross, and say:
    
  In the Name of the Father, and of the Son, and of the Holy Spirit. Amen.
  
  \begin{framed}
    From St. Thomas Sunday until Ascension, instead of \textbf{O God, cleanse me, a sinner \ldots we say:}
    Christ is risen from the dead, trampling down death by death, and upon those in the tombs bestowing life.
    \begin{rub}
    \end{framed}

    Afterwards, we collect our thoughts, and make seven prostrations (or metanoias), saying:

\section*{The Seven--Bow Beginning}
I hope I have provided enough information without being too 'overly' detailed. Thank you to all for any help you are willing to provide.
-Michael D

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
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Fancy Chapter Headings

Post by localghost »

Fancy chapter headers for the memoir class are better done by structures provided by this class. The MemoirChapterStyles document is perhaps a good starting point. It contains some descriptive examples. So you try this method first to reproduce the desired chapter style.

If that doesn't help, please prepare a self-contained and minimal example instead of loosely code snippets to give an adequate problem description.


Remarks:
  • The memoir class has all aboard to set up the type area. So packages like geoemetry are not necessary.
  • The same applies to fancyhdr with regard to headers and footers.

Thorsten
Post Reply