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

Contents of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3293 - (show annotations)
Thu Oct 21 23:18:32 2010 UTC (8 years, 11 months ago) by caltinay
Original Path: trunk/doc/user/esysdoc.cls
File size: 4815 byte(s)
user's guide builds again with new class file. The cleanup can commence...

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]{geometry}
10 \usepackage{times}
11 % \usepackage{fancyvrb} % Hopefully this will give us our code environments
12 \usepackage{listings}
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 \usepackage[colorlinks=false,pdfborder={0 0 0},pdfdisplaydoctitle=true,linktocpage=true]{hyperref}
23
24 %Ensures that latex doesn't have an error if we don't specify the version
25 \providecommand{\RepVersion}{Unknown\xspace}
26
27
28
29 %This is FAR from perfect for one thing it doesn't allow underscores to be used in filenames
30
31 %Now we mess with the underscore char
32 % {
33 % \catcode`|=8 % Since we will be redefining _ we need another way to indicate subscript in math mode
34 % % This change only holds for the definition since it disappears at the close brace
35 % \catcode`_=\active % define _ as a char which triggers a macro (which is what active means)
36 % \gdef\_{% % A global definition (persists after } ) for _ when it is a macro
37 % \ifmmode | % If we are in math mode, then output subscript char
38 % \else
39 % \textunderscore % else output underscore symbol
40 % \fi
41 % }
42 % }
43 % \catcode`_=\active % Set _ to active at the top level
44
45
46 % \newcommand*{\module}[1]{\texttt{#1}}
47 % \newcommand*{\class}[1]{\texttt{#1}}
48 % \newcommand*{\var}[1]{\textsl{#1}}
49 % \newcommand*{\method}[1]{\texttt{#1}}
50
51
52 %Use the \Var form if you need to include % in the URL
53 %Please note that the \Var form does not work in maths mode
54 % \DeclareUrlCommand\Var{}
55 %Same here with \function except \Function is already in use for a FunctionSpace
56 % \DeclareUrlCommand\FunctionName{}
57
58 % \DeclareUrlCommand\umodule{}
59 % \DeclareUrlCommand\class{}
60 % \DeclareUrlCommand\method{}
61 \DeclareUrlCommand\email{}
62 % \DeclareUrlCommand\program{}
63 % \DeclareUrlCommand\env{}
64
65
66 % \DeclareUrlCommand\member{}
67 % \DeclareUrlCommand\file{}
68
69 % \DeclareUrlCommand\kbd{}
70
71 % \DeclareUrlCommand\usafe{} %intended as a wrapper to make stuff underscrore safe
72 % \DeclareUrlCommand\constant{}
73
74 %To safely deal with a module that has _ in its name do this:
75 % \urldef{\rMATPLOTLIB}\umodule{matplotlib}
76 % \newcommand{\MATPLOTLIB}{\rMATPLOTLIB\index{visualization!matplotlib}\index{matplotlib}\xspace}
77
78 \newcommand{\module}[1]{\mbox{\texttt{#1}}}
79
80 \newcommand*{\optional}[1]{[ #1 ]}
81 %This should be converted into a two arg form so we can have different fonts for different parts
82 \newcommand*{\programopt}[1]{#1}
83
84 \newenvironment{classdesc}[3]{\begin{description}\item[class #1]\mbox{}\\}{\end{description}}
85 \newenvironment{methoddesc}[3][{}]{\begin{description}\item[\textbf{#2}(#3)]\mbox{}\\}{\end{description}}
86 \newenvironment{funcdesc}[2]{\begin{description}\item[\textbf{#1}(#2)]\mbox{}\\}{\end{description}}
87 \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
88 \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
89
90 \newcommand{\file}[1]{\texttt{#1}\xspace}
91 \newcommand{\program}[1]{\textbf{\texttt{#1}}\xspace}
92 % \newcommand{\env}[1]{\texttt{#1}\xspace}
93 \newcommand{\var}[1]{\texttt{#1}\xspace}
94 \newcommand{\kbd}[1]{\texttt{#1}}
95 \newcommand{\function}[1]{\texttt{#1}}
96 \newcommand{\class}[1]{\texttt{#1}}
97 \newcommand{\constant}[1]{\textsl{#1}}
98 \newcommand{\method}[1]{\texttt{#1}}
99 \newcommand{\member}[1]{\texttt{#1}}
100 \newcommand{\code}[1]{\mbox{\texttt{#1}}} % Because people try to put code in maths mode
101
102
103 \newenvironment{abstract}{\newpage\mbox{}\vfill\begin{center}\textbf{Abstract}\end{center}}{\vfill\newpage}
104
105 \newcommand{\authoraddress}[1]{\gdef \@authoraddress {#1}}
106
107 \newcommand{\release}[1]{\gdef \@ESreleasename {#1}}
108 \release{nightly} %Just so we have a default
109
110 \newcommand*{\subtitleLineOne}{\textsl{Release - \@ESreleasename}}
111 \newcommand*{\subtitleLineTwo}{\textsl{(r\RepVersion)}}
112
113 \renewcommand{\maketitle}{
114 \begin{titlepage}
115 \begin{raggedleft}
116 \Huge
117 \hrule
118 \mbox{}\\
119 \mbox{}\\
120 \@title
121 \mbox{}\\
122 \LARGE
123 \mbox{}\\
124 \subtitleLineOne\\
125 \subtitleLineTwo\\
126 \vfill
127 \@author
128 \vfill
129 \vfill
130 \large
131 \@date\\
132 \vfill
133 \@authoraddress\mbox{}\\
134 \end{raggedleft}
135
136 \end{titlepage}}
137
138
139 %Please do not use this one
140 \newcommand*{\strong}{}
141
142 \usepackage{fancyhdr}
143 \renewcommand{\footrulewidth}{0.4pt}
144 \renewcommand{\headrulewidth}{0pt}
145
146 \fancypagestyle{plain}{%
147 \fancyhead{}
148 \cfoot{}
149 \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages
150 \fancyfoot[RE]{\nouppercase{\rightmark}}
151 \fancyfoot[LO]{\nouppercase{\leftmark}}
152 }
153 \pagestyle{plain}
154
155 \usepackage[Bjarne]{fncychap}
156

  ViewVC Help
Powered by ViewVC 1.1.26