This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[ira/wip.git] / docs / docbook / xslt / latex / sambadoc.cls
1 %%---------------------------------------------------
2 %%-- RC Thesis 
3 %%---------------------------------------------------
4 \NeedsTeXFormat{LaTeX2e}
5 \ProvidesClass{xslt/latex/sambadoc}
6
7 %%---------------------------------------------------
8 %%-- Load the base class and modify current macros.
9 %%---------------------------------------------------
10
11 \newif\if@usecppsyntax \@usecppsyntaxfalse
12
13 \DeclareOption{cpp}{\@usecppsyntaxtrue}
14 \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrreprt}}
15 \ProcessOptions
16 %\PassOptionsToClass{12pt}{scrreprt}
17
18 \LoadClass{scrreprt}
19
20 %%--Set the section number depth.
21 \setcounter{secnumdepth}{3}
22 \setcounter{tocdepth}{4}
23
24 %\setcounter{page}{2}
25
26 %%--Create a vertical skip for the distance between the title and
27 %%--the first line of text on the prolog pages.
28 \newskip\thesisvskip
29 \thesisvskip 36pt
30
31 %%--Set the margins. %\headheight6pt \headsep12pt
32 \usepackage[margin=20pt,head=20pt,headsep=20pt,foot=20pt]{geometry}
33
34 %%--Use typehtml for better specification of tables
35 \usepackage{typehtml}
36
37 %%--Change the marginpar.
38 \reversemarginpar
39 \let\old@marginpar=\marginpar
40 \def\marginpar#1{
41         \old@marginpar{\def\baselinestretch{1}\em\small #1}}
42
43 %%--Parameters that can be set by the user.
44 \def\samba@listtables{y}
45 \def\samba@listfigures{y}
46
47 \newcommand{\notablelist}{\gdef\samba@listtables{n}}
48 \newcommand{\nofigurelist}{\gdef\samba@listfigures{n}}
49
50
51 %%--Modify behavior of the figure and table environment.
52 \def\fps@figure{hbt}
53 \def\fnum@figure{{\bf \figurename~\thefigure}}
54 \def\fps@table{htb}
55 \def\fnum@table{{\bf \tablename~\thetable}}
56
57 \def\mathfigure{\thesisfiguretrue\figure}
58 \def\endmathfigure{\endfigure\thesisfigurefalse}
59
60
61
62 %%-----------------------------------------------
63 %%-- Modify the displayed math environments.
64 %%-----------------------------------------------
65
66 \newif\ifthesisfigure
67 \thesisfigurefalse
68
69
70
71 %%--------------------------------------------
72 %%-- Miscellaneous commands.
73 %%--------------------------------------------
74
75 %%--Commands to simplify font changing.
76 \newcommand{\sfup}{\sffamily\mdseries\upshape}
77 \newcommand{\sfsc}{\ttfamily\mdseries\scshape}
78 \newcommand{\sfit}{\sffamily\mdseries\itshape}
79 \newcommand{\rmup}{\rmfamily\mdseries\upshape}
80 \newcommand{\rmbf}{\rmfamily\bfseries\upshape}
81 \newcommand{\rmit}{\rmfamily\mdseries\itshape}
82 \newcommand{\ttup}{\ttfamily\mdseries\upshape}
83
84
85 \endinput
86
87 %%--The \tableofcontents.
88 \renewcommand\tableofcontents{%
89    \renewcommand{\contentsname}{Table of Contents}
90     \if@twocolumn
91       \@restonecoltrue\onecolumn
92     \else
93       \@restonecolfalse
94     \fi
95     \oldchapter*{\contentsname
96         \@mkboth{\uppercase{\contentsname}}{\uppercase{\contentsname}}}%
97     \@starttoc{toc}%
98     \if@restonecol\twocolumn\fi}
99
100 %%--The \listoffigures command.
101 \renewcommand\listoffigures{%
102     \if@twocolumn
103       \@restonecoltrue\onecolumn
104     \else
105       \@restonecolfalse
106     \fi
107     \oldchapter*{\listfigurename
108       \@mkboth{\uppercase{\listfigurename}}{\uppercase{\listfigurename}}}%
109     \@starttoc{lof}%
110     \if@restonecol\twocolumn\fi}
111
112 %%--The \listoftables command.
113 \renewcommand\listoftables{%
114     \if@twocolumn%
115       \@restonecoltrue\onecolumn%
116     \else%
117       \@restonecolfalse%
118     \fi%
119     \oldchapter*{\listtablename%
120       \@mkboth{\uppercase{\listtablename}}{\uppercase{\listtablename}}}%
121     \@starttoc{lot}%
122     \if@restonecol\twocolumn\fi}
123
124 \endinput