horrors2

Awful horror fiction
git clone https://git.woozle.org/neale/horrors2.git

cruft  ·  2009-07-27

chapauth.sty

 1\def\chapauth#1{\gdef\@chapauth{#1}}
 2\def\@chapauth{}
 3
 4\def\chapimg#1#2{\gdef\@chapartist{#1}\gdef\@chapimg{#2}}
 5\gdef\@chapimg{}
 6\gdef\@chapartist{\@empty}
 7
 8\def\@makechapterhead#1{%
 9  \ifx \@chapimg \@empty
10    \vspace*{50\p@}%
11      {\parindent \z@ \raggedright \normalfont
12      \ifnum \c@secnumdepth >\m@ne
13        \if@mainmatter
14          \huge\bfseries \@chapapp\space \thechapter
15          \par\nobreak
16          \vskip 20\p@
17        \fi
18      \fi
19      \interlinepenalty\@M
20      \Huge \bfseries #1\par\nobreak
21      \ifx\@chapauth\@empty
22        % Nothing
23      \else
24        \vskip 10\p@
25        \Large \bfseries by \@chapauth\par\nobreak
26      \fi
27      \vskip 40\p@
28      }
29  \else
30    \thispagestyle{empty}
31    \hbox{}\vfill
32    \noindent
33    \includegraphics[width=\textwidth]{\@chapimg}
34    \par\nobreak
35    \hfill Artwork by \@chapartist
36    \par\nobreak
37    \vfill\hbox{}
38    \addcontentsline{lof}{figure}{Chapter art by \@chapartist}
39  \fi
40  \chapauth{}
41  \chapimg{}{}
42}