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

Contents of /trunk/doc/user/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3300 - (show annotations)
Mon Oct 25 00:22:14 2010 UTC (8 years, 10 months ago) by jfenwick
File size: 3594 byte(s)
Some text fixes

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{classdesc}[2]{\begin{description}\item[class #1]\mbox{}\\}{\end{description}}
58 \newenvironment{methoddesc}[3][{}]{\begin{description}\item[\textbf{#2}(#3)]\mbox{}\\}{\end{description}}
59 \newenvironment{funcdesc}[2]{%
60 \noindent
61 \begin{list}{}{\setlength{\labelwidth}{0cm}}
62 \item \textbf{#1(#2)}
63 \end{list}
64 \begin{list}{}{}
65 \item
66 }%
67 {%
68 \end{list}%
69 }
70
71 \setlength{\itemindent}{-1cm}\setlength{\leftmargin}{1cm}
72
73 \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
74 \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
75
76 \newcommand{\file}[1]{\texttt{#1}\xspace}
77 \newcommand{\program}[1]{\textbf{\texttt{#1}}\xspace}
78 % \newcommand{\env}[1]{\texttt{#1}\xspace}
79 \newcommand{\var}[1]{\texttt{#1}\xspace}
80 \newcommand{\kbd}[1]{\texttt{#1}}
81 \newcommand{\function}[1]{\texttt{#1}}
82 \newcommand{\class}[1]{\texttt{#1}}
83 \newcommand{\constant}[1]{\textsl{#1}}
84 \newcommand{\method}[1]{\texttt{#1}}
85 \newcommand{\member}[1]{\texttt{#1}}
86 \newcommand{\code}[1]{%
87 \ifmmode%
88 \mbox{\texttt{#1}}%
89 \else%
90 \texttt{#1}%
91 \fi % Because people try to put code in maths mode
92 }
93
94 \newenvironment{abstract}{\newpage\mbox{}\vfill\begin{center}\textbf{Abstract}\end{center}}{\vfill\newpage}
95
96 \newcommand{\authoraddress}[1]{\gdef \@authoraddress {#1}}
97
98 \newcommand{\release}[1]{\gdef \@ESreleasename {#1}}
99 \release{nightly} %Just so we have a default
100
101 \newcommand*{\subtitleLineOne}{\textsl{Release - \@ESreleasename}}
102 \newcommand*{\subtitleLineTwo}{\textsl{(r\RepVersion)}}
103
104 \renewcommand{\maketitle}{
105 \begin{titlepage}
106 \textsf{
107 \begin{raggedleft}
108 \Huge
109 \hrule
110 \mbox{}\\
111 \mbox{}\\
112 \@title
113 \mbox{}\\
114 \LARGE
115 \mbox{}\\
116 \subtitleLineOne\\
117 \subtitleLineTwo\\
118 \vfill
119 \@author
120 \vfill
121 \vfill
122 \large
123 \@date\\
124 \vfill
125 \@authoraddress\mbox{}\\
126 \end{raggedleft}
127 }
128 \end{titlepage}}
129
130
131 %Please do not use this one
132 \newcommand*{\strong}{}
133
134
135

  ViewVC Help
Powered by ViewVC 1.1.26