/[escript]/trunk/doc/esysdoc.cls
ViewVC logotype

Contents of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3301 - (show annotations)
Mon Oct 25 01:27:54 2010 UTC (9 years ago) by jfenwick
Original Path: trunk/doc/user/esysdoc.cls
File size: 3827 byte(s)
Modified layout of descriptions.
Fixed some overfull hboxes
1 %
2 % A class for ESSCC documentation
3 %
4
5 \NeedsTeXFormat{LaTeX2e}
6 \ProvidesClass{esysdoc}
7 \LoadClass[a4paper, twoside]{book}
8
9 \usepackage[a4paper, left=2.5cm, right=2.5cm, nohead, vcentering, scale=0.8]{geometry}
10 \usepackage{times}
11 \usepackage{listings}
12 \usepackage{ifpdf}
13
14 %\usepackage{avant}
15 %\renewcommand{\familydefault}{\sfdefault} % Switch to san seriff
16 \usepackage{url}
17 \usepackage{xspace}
18 \usepackage{graphicx,color}
19 \usepackage{amsmath} %For equation*
20 \usepackage{amsfonts,amssymb} % see http://www.ams.org/tex/amslatex.html
21 \usepackage[nohyphen, strings]{underscore}
22
23 %Blue was chosen here because it looks ok when printed
24 \usepackage[pdfborder={0 0 0},pdfdisplaydoctitle=true,linktocpage=false, colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
25
26 \usepackage{fancyhdr}
27 \renewcommand{\footrulewidth}{0.4pt}
28 \renewcommand{\headrulewidth}{0pt}
29
30 \fancypagestyle{plain}{%
31 \fancyhead{}
32 \cfoot{}
33 \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages
34 \fancyfoot[RE]{\nouppercase{\rightmark}}
35 \fancyfoot[LO]{\nouppercase{\leftmark}}
36 }
37 \pagestyle{plain}
38
39 \usepackage[Bjarne]{fncychap}
40 % \ChRuleWidth{1pt}
41 \ChNameVar{\raggedleft\large\sffamily} % The word chapter
42 \ChNumVar{\raggedleft\bfseries\Large} % The number of the chapter
43 \ChTitleVar{\raggedleft \Huge\sffamily} % title of the chapter
44 \ChTitleAsIs
45
46 %Ensures that latex doesn't have an error if we don't specify the version
47 \providecommand{\RepVersion}{Unknown\xspace}
48
49 \DeclareUrlCommand\email{}
50
51 \newcommand{\module}[1]{\mbox{\texttt{#1}}}
52
53 \newcommand*{\optional}[1]{[ #1 ]}
54 %This should be converted into a two arg form so we can have different fonts for different parts
55 \newcommand*{\programopt}[1]{#1}
56
57 \newenvironment{bigdef}[1]{%
58 \noindent
59 \setlength{\hangindent}{2cm}
60 \textbf{#1}
61
62 \setlength{\hangindent}{1cm}%
63 \setlength{\hangafter}{0}%
64 \noindent%
65 }%
66 {%
67
68 \vspace{0.5cm}
69 }
70
71 \newenvironment{classdesc}[2]{%
72 \begin{bigdef}{class #1}}{\end{bigdef}}
73
74 \newenvironment{methoddesc}[3][{}]{%
75 \begin{bigdef}{#2(#3)}}{\end{bigdef}}
76 \newenvironment{funcdesc}[2]{%
77 \begin{bigdef}{#1(#2)}%
78 }
79 {%
80 \end{bigdef}
81 }
82
83 % {
84 % \begin{bigdef}[#1(#2)]
85 % \noindent
86 % \setlength{\hangindent}{2cm}
87 % \textbf{#1(#2)}
88 %
89 % }
90 % \setlength{\hangindent}{1cm}
91 % \setlength{\hangafter}{0}
92 % \noindent
93 % }%
94 % {%
95 %
96 % \mbox{}\\
97 % }
98
99 \setlength{\itemindent}{-1cm}\setlength{\leftmargin}{1cm}
100
101 \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
102 \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
103
104 \newcommand{\file}[1]{\texttt{#1}\xspace}
105 \newcommand{\program}[1]{\textbf{\texttt{#1}}\xspace}
106 % \newcommand{\env}[1]{\texttt{#1}\xspace}
107 \newcommand{\var}[1]{\texttt{#1}\xspace}
108 \newcommand{\kbd}[1]{\texttt{#1}}
109 \newcommand{\function}[1]{\texttt{#1}}
110 \newcommand{\class}[1]{\texttt{#1}}
111 \newcommand{\constant}[1]{\textsl{#1}}
112 \newcommand{\method}[1]{\texttt{#1}}
113 \newcommand{\member}[1]{\texttt{#1}}
114 \newcommand{\code}[1]{%
115 \ifmmode%
116 \mbox{\texttt{#1}}%
117 \else%
118 \texttt{#1}%
119 \fi % Because people try to put code in maths mode
120 }
121
122 \newenvironment{abstract}{\newpage\mbox{}\vfill\begin{center}\textbf{Abstract}\end{center}}{\vfill\newpage}
123
124 \newcommand{\authoraddress}[1]{\gdef \@authoraddress {#1}}
125
126 \newcommand{\release}[1]{\gdef \@ESreleasename {#1}}
127 \release{nightly} %Just so we have a default
128
129 \newcommand*{\subtitleLineOne}{\textsl{Release - \@ESreleasename}}
130 \newcommand*{\subtitleLineTwo}{\textsl{(r\RepVersion)}}
131
132 \renewcommand{\maketitle}{
133 \begin{titlepage}
134 \textsf{
135 \begin{raggedleft}
136 \Huge
137 \hrule
138 \mbox{}\\
139 \mbox{}\\
140 \@title
141 \mbox{}\\
142 \LARGE
143 \mbox{}\\
144 \subtitleLineOne\\
145 \subtitleLineTwo\\
146 \vfill
147 \@author
148 \vfill
149 \vfill
150 \large
151 \@date\\
152 \vfill
153 \@authoraddress\mbox{}\\
154 \end{raggedleft}
155 }
156 \end{titlepage}}
157
158
159 %Please do not use this one
160 \newcommand*{\strong}{}
161
162
163

  ViewVC Help
Powered by ViewVC 1.1.26