File: fancychap.sty

package info (click to toggle)
swi-prolog 5.0.0-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,048 kB
  • ctags: 6,747
  • sloc: ansic: 52,452; perl: 13,276; sh: 2,646; makefile: 516; awk: 14
file content (43 lines) | stat: -rw-r--r-- 1,571 bytes parent folder | download | duplicates (29)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\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.
 }}