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

Annotation of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26