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

Contents of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4205 - (show annotations)
Fri Feb 15 06:02:07 2013 UTC (6 years, 8 months ago) by caltinay
File size: 4399 byte(s)
Work on inversion cookbook. Also tweak to hyperref and a few more references.

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

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