summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/archive-version/faq.cls
blob: a5ae3cdf54ef8ec3a33070f35b1f9e9a365ac6a9 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
% simple class to format the UK TeX FAQ in two columns

\ProvidesClass{faq}[2002/03/11 v2.0 UK TeX FAQ]

\NeedsTeXFormat{LaTeX2e}[1995/12/01]

\newif\if@patchversion
\@patchversionfalse
\DeclareOption{patch}{\@patchversiontrue}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions

\LoadClass{article}

\RequirePackage[hyphens,obeyspaces]{url}
\RequirePackage{multicol,faq}

% now, hack at page layout, taking account of whether we're in a
% single-column version...

%  ****************************************
%  *            PAGE LAYOUT               *
%  ****************************************
%
% (This stuff is hacked from SPQR (et al) in baskerv.cls)
%
% SIDE MARGINS: (as is for single column)
\ifsinglecolumn\else
\oddsidemargin -2.5pc \evensidemargin -2.5pc
\marginparwidth      4pc       % don't use marginal notes...
\marginparsep      0.5pc       % ...in the UK TUG newsletter
\fi

% VERTICAL SPACING:
\topmargin  -0.5in             % allow half an inch border
\headheight 0\p@               % we don't bother with headers here ...
\headsep    0\p@               % ... this ain't a publication
\topskip    10\p@
\footskip   15\p@

% DIMENSION OF TEXT:

% vertical dimension
\textheight        \paperheight
\advance\textheight -1.5in
%\textheight       250mm       % height of text on a page (A4 paper)

% horizontal dimension: pro tem, as is for singlcolumn
\ifsinglecolumn\else
\textwidth         \paperwidth
\advance\textwidth -1in
%\textwidth        180mm       % total width of a page    (A4 paper)

\columnseprule     0.5\p@      % width of line in the inter-column gutter
\columnsep         10mm        % space between columns
\tolerance         9999        % make those columns justify
\fi

% FOOTNOTES:
\footnotesep 6\p@
\skip\footins 19.5\p@ plus 12\p@ \@minus \p@

% page footer: include date if patched version
\def\@twodigit#1{\ifnum#1<10\relax0\fi\number#1}
\def\faq@patched@date{\@arabic\year-\@twodigit\month-\@twodigit\day}
\if@patchversion
  \renewcommand\ps@plain{%
    \let\@mkboth\@gobbletwo
    \let\@evenhead\@empty
    \let\@oddhead\@empty
    \def\@oddfoot{%
      \reset@font
      \hfil
      \faq@patched@date\ : \thepage
      \hfil
    }%
    \let\@evenfoot\@oddfoot
  }
  \let\ps@myplain\ps@plain
  \pagestyle{myplain}
\fi
% little patch generated in investigating a request from a user here
% in cambridge
\let\FAQ@@tableofcontents\tableofcontents
\renewcommand\tableofcontents{{%
    \let\FAQ@@addvspace\addvspace
    \def\addvspace##1{%
      \@tempskipa##1\relax
      \FAQ@@addvspace{0.1\@tempskipa}%
    }%
    \FAQ@@tableofcontents
}}