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

Contents of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4095 - (show annotations)
Wed Dec 5 05:32:22 2012 UTC (6 years, 9 months ago) by caltinay
File size: 4208 byte(s)
A bit of doco cleanup.

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

Properties

Name Value
svn:mergeinfo /branches/lapack2681/doc/user/esysdoc.cls:2682-2741 /branches/pasowrap/doc/esysdoc.cls:3661-3674 /branches/py3_attempt2/doc/esysdoc.cls:3871-3891 /branches/restext/doc/user/esysdoc.cls:2610-2624 /branches/ripleygmg_from_3668/doc/esysdoc.cls:3669-3791 /branches/stage3.0/doc/user/esysdoc.cls:2569-2590 /branches/symbolic_from_3470/doc/esysdoc.cls:3471-3974 /branches/symbolic_from_3470/ripley/test/python/doc/esysdoc.cls:3517-3974 /release/3.0/doc/user/esysdoc.cls:2591-2601 /trunk/ripley/test/python/doc/esysdoc.cls:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26