This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/man/fancychap.sty
2011-06-12 22:26:04 +01:00

44 lines
1.5 KiB
TeX

\font\chapnum = cminch
\font\chaptitle = cmssbx10 scaled \magstep5
\def\booktitle{\mbox{}}
\newdimen\titlewidth
\newdimen\titlenumwidth
\titlewidth\textwidth
\titlenumwidth 3cm
\addtolength{\titlewidth}{-\titlenumwidth}
%----------------------------------------------------------------------
% Chapters
%----------------------------------------------------------------------
\def\breakit{\ } % allow linebreak in chapter title
\def\@makechapterhead#1{ % Heading for \chapter command
\vspace*{0pt} % Space at top of text page.
{ \parindent 0pt \raggedright
\ifnum \c@secnumdepth >\m@ne % IF secnumdepth > -1 THEN
\begin{minipage}{\headwidth}
\parbox[b]{\titlewidth}{%
\def\breakit{\par}\raggedright
\baselineskip .33in {\chaptitle #1}}\nobreak
\parbox[b]{\titlenumwidth}{\raggedleft {\chapnum \thechapter}}
\par\vskip 3pt
\rule[0pt]{\headwidth}{4pt}
\end{minipage}
\fi
\vskip 20pt
\nobreak % TeX penalty to prevent pagebreak.
} }
\def\@makeschapterhead#1{ % Heading for \chapter* command
\vspace*{0pt} % Space at top of page.
\markboth{\booktitle}{#1}
{ \parindent 0pt \raggedright
\begin{minipage}{\headwidth}
\parbox[b]{\titlewidth}{\raggedright {\chaptitle #1}}
\par\vskip 5pt
\rule[0pt]{\headwidth}{4pt}
\end{minipage}
\nobreak % TeX penalty to prevent page break.
\vskip 30pt % Space between title and text.
}}