2

I'm using the fncychap package, option Sonny, which sets rules above and below the chapter title. Because of the way I set section headings, I'd like to extend the rules 1in to the left to align with those headings. Is this possible? enter image description here

Here is an MWE:

\documentclass{book}

\usepackage[Sonny]{fncychap}
\usepackage{kantlipsum}

\usepackage[calcwidth]{titlesec}

\setlength{\textwidth}{5.0in}
\setlength{\oddsidemargin}{1.5in}
\setlength{\evensidemargin}{1.5in}

\titleformat{\section}
  {\Large\bfseries}{\hspace*{-1in}\thesection}{1em}{}


\begin{document}
\chapter{Chapter One}
\section{Section One}
\kant[1-2]
\end{document}
1

Since you are using titlesec, it would make sense to style the chapter this way, too. The following approximates the style you are using, although you may wish to adjust it slightly for an exact match.

I also use geometry rather than setting the page dimensions manually. As I mentioned when answering an earlier question, setting them manually is not advisable.

\documentclass{book}
\usepackage{fancyhdr}
\usepackage[calcwidth]{titlesec}
\usepackage{geometry}
% Don't set layout manually
\geometry{letterpaper,width=5in,left=2.5in,asymmetric,verbose}
\usepackage{kantlipsum}

\titleformat{\section}
  {\Large\bfseries}{\thesection}{1em}{}
\titleformat{\chapter}[display]{\Large\sffamily}{\filleft
  \MakeUppercase{\chaptername}\quad{\Huge\thechapter}}{40pt}{\titlerule[.5pt]\vspace{10pt}\filleft
  \MakeUppercase}[\vspace{10pt}{\titlerule[.5pt]}]
\titlespacing*{\section}{-25.4mm}{*4}{*1.5}
\titlespacing*{\chapter}{-25.4mm}{*6}{*10}
\pagestyle{fancy}
\fancyhf{}

\renewcommand{\sectionmark}[1]{\markright{{\itshape #1}}}% \it ought not be used with LaTeX 2e!!
\fancyhead[LE,RO]{\thepage}
\fancyhead[CE]{\leftmark}
\fancyhead[CO]{\rightmark}
\fancyheadoffset[lh]{25.4mm}

\begin{document}
\chapter{Chapter One}
\section{Section One}
\kant[1]
\section{Section Two}
\kant[2]
\section{Section Three}
\kant[3]
\section{Section Four}
\kant[4-8]
\end{document}

mangling titles for special effects

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.