File: fancychap.sty

package info (click to toggle)
swi-prolog 8.2.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 78,084 kB
  • sloc: ansic: 362,656; perl: 322,276; java: 5,451; cpp: 4,625; sh: 3,047; ruby: 1,594; javascript: 1,509; yacc: 845; xml: 317; makefile: 156; sed: 12; sql: 6
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.
 }}