TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change the alignment of chapter headings and quotes in quotchap without modifying the .sty file? More specifically, I would like left-align the chapter headings and right-align the quotes.

share|improve this question
up vote 3 down vote accepted

This can be done by redefining some of quotchap's internal macros. (Note that my solution somewhat increases the vertical space required by the chapter heading.)

\documentclass{book}

\usepackage{quotchap}

\makeatletter
\renewcommand\chapter{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \thispagestyle{plain}%
  \global\@topnum\z@
%   \@printcites% DELETED
  \null\hfill\@printcites\par% NEW
  \@afterindentfalse
  \secdef\@chapter\@schapter
}
\renewcommand{\@makechapterhead}[1]{%
  \chapterheadstartvskip%
%   {\size@chapter{\sectfont\raggedleft% DELETED
  {\size@chapter{\sectfont\raggedright% NEW
    {\chapnumfont
      \ifnum \c@secnumdepth >\m@ne%
      \if@mainmatter\thechapter%
      \fi\fi
      \par\nobreak}%
%     {\raggedleft\advance\leftmargin10em\interlinepenalty\@M #1\par}}% DELETED
    {\raggedright\advance\leftmargin10em\interlinepenalty\@M #1\par}}% NEW
  \nobreak\chapterheadendvskip}}
\makeatother

\begin{document}

\begin{savequote}[5cm]
A quote.
\qauthor{The author}
\end{savequote}

\chapter{foo}

Some text.

\end{document}
share|improve this answer
    
This worked perfectly. Thank you so much for your help :) – somealias Apr 5 '11 at 17:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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