%%
%% This is file `quotchap.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% quotchap.dtx 
%% 
%% This file is part of the QUOTCHAP package, a package a package for
%% creating decorative chapter headings with quotations, a postscript
%% output device is needed.
%% Copyright (C) 1998 - 2010 by Karsten Tinnefeld.
%% Copyright (C) 2011 - 2012 by Jan Klever.
%% 
%% This file is NOT part of the LaTeX2e system, but intended for use with
%% it.
%% 
%% This file is free software; you can redistribute it and/or modify it
%% under the terms of the GNU Library General Public License as published
%% by the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%% 
%% This document is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%% General Public License for more details.
%% 
%% You should have received a copy of the GNU General Public License
%% somehow; if not, write to the Free Software Foundation, Inc., 675 Mass
%% Ave, Cambridge, MA 02139, USA.
%% 
%% Error Reports in case of UNCHANGED versions to
%% 
%%              Jan Klever
%%              Kleiststr. 2
%%              D-22089 Hamburg
%%              Germany
%%       Email: jasa.klever@gmx.de
%% 
%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1996/12/01]
\ProvidesPackage{quotchap}
  [2019/07/09 v1.2 Decorative Chapter Headings with Quotes]
\newif\if@usecolor\@usecolortrue
\DeclareOption{grey}{\@usecolortrue}
\DeclareOption{nogrey}{\@usecolorfalse}
\newcommand*{\@newfontcmd}{\@ifundefined{@defaultcnfont}{\newcommand*}{%
    \PackageWarning{quotchap}{%
      You have tried to specify more than one font to be\MessageBreak
      used for the chapter numbers. I ignore the font\MessageBreak
      `\CurrentOption'}
    \providecommand*}}
\DeclareOption{avantgarde}{\@newfontcmd{\@defaultcnfont}{pag}}
\DeclareOption{beramono}{\@newfontcmd{\@defaultcnfont}{fvm}}
\DeclareOption{berasans}{\@newfontcmd{\@defaultcnfont}{fvs}}
\DeclareOption{beraserif}{\@newfontcmd{\@defaultcnfont}{fve}}
\DeclareOption{biolinum}{\@newfontcmd{\@defaultcnfont}{LinuxBiolinumO-LF}}
\DeclareOption{bookman}{\@newfontcmd{\@defaultcnfont}{pbk}}
\DeclareOption{charter}{\@newfontcmd{\@defaultcnfont}{bch}}
\DeclareOption{courier}{\@newfontcmd{\@defaultcnfont}{pcr}}
\DeclareOption{helvetica}{\@newfontcmd{\@defaultcnfont}{phv}}
\DeclareOption{kpfonts}{\@newfontcmd{\@defaultcnfont}{jkp}}
\DeclareOption{libertine}{\@newfontcmd{\@defaultcnfont}{LinuxLibertineO-LF}}
\DeclareOption{lmodern}{\@newfontcmd{\@defaultcnfont}{lmr}}
\DeclareOption{newcentury}{\@newfontcmd{\@defaultcnfont}{pnc}}
\DeclareOption{palatino}{\@newfontcmd{\@defaultcnfont}{ppl}}
\DeclareOption{times}{\@newfontcmd{\@defaultcnfont}{ptm}}
\DeclareOption{utopia}{\@newfontcmd{\@defaultcnfont}{put}}
\ProcessOptions\relax
\providecommand*{\@defaultcnfont}{pbk}
\if@usecolor
  \IfFileExists{color.sty}{%
    \RequirePackage{color}
    \definecolor{chaptergrey}{rgb}{0.6,0.6,0.6}}{%
    \PackageError{quotchap}{%
      The color package is apparently unavailable.\MessageBreak
      Turn off the `grey' option and come back again}{%
      Since you did not say `nogrey', quotchap defined chapter
      numbers to appear\MessageBreak grey. You do not need a color
      printer, since most printing devices can cope\MessageBreak with
      grey scales, but you need the color package coming with the
      graphics\MessageBreak bundle available from CTAN.}}
\else
  \providecommand*{\color}[1]{}
\fi
\AtEndOfPackage{%
  \newcommand*{\chapnumfont}{%
    \usefont{T1}{\@defaultcnfont}{b}{n}\fontsize{100}{130}\selectfont%
    \color{chaptergrey}}
  \let\size@chapter\huge
  \providecommand*{\chapterheadstartvskip}{\vspace*{2.3\baselineskip}}
  \providecommand*{\chapterheadendvskip}{\vspace{1.7\baselineskip}}
  \providecommand*{\sectfont}{\relax}
  \providecommand*{\quotefont}{\slshape}
  \providecommand*{\qauthorfont}{\upshape}
  \@ifundefined{@mainmattertrue}{\newif\if@mainmatter\@mainmattertrue}{}}
\newenvironment{savequote}[1][10cm]{%
  \begin{lrbox}{\@quotebox}
    \begin{minipage}[t]{#1}\footnotesize\quotefont
      \ignorespaces}{%
      \unskip\end{minipage}\end{lrbox}
  \global\setbox\@quotebox\copy\@quotebox
  \global\let\@printcites\@iprintcites
  \ignorespacesafterend}
\newcommand{\qauthor}[1]{%
  \par\smallskip
  {\raggedleft\qauthorfont #1\qquad\hbox{}\par}\bigskip}
\newcommand{\qsetcnfont}[1]{%
    \renewcommand*{\@defaultcnfont}{#1}}
\newsavebox{\@quotebox}
\let\@printcites\relax
\renewcommand\chapter{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \thispagestyle{plain}%
  \global\@topnum\z@
  \@printcites
  \@afterindentfalse
  \secdef\@chapter\@schapter}
\renewcommand{\@makechapterhead}[1]{\chapterheadstartvskip%
  {\size@chapter{\sectfont\raggedleft
      {\chapnumfont
        \ifnum \c@secnumdepth >\m@ne%
        \if@mainmatter\thechapter%
        \fi\fi
        \par\nobreak}%
      {\raggedleft\advance\leftmargin10em\interlinepenalty\@M #1\par}}
    \nobreak\chapterheadendvskip}}
\renewcommand{\@makeschapterhead}[1]{%
  {\let\c@secnumdepth\m@ne\@makechapterhead{#1}}}
\newcommand*{\@iprintcites}{%
  \vbox to\z@{\copy\@quotebox\vss}
  \global\let\@printcites\relax}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\endinput
%%
%% End of file `quotchap.sty'.
