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

Annotation of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


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

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 3310 \usepackage{makeidx}
14 jfenwick 3292
15     %\usepackage{avant}
16 jfenwick 3294 %\renewcommand{\familydefault}{\sfdefault} % Switch to san seriff
17 jfenwick 3292 \usepackage{url}
18     \usepackage{xspace}
19 caltinay 3306 \usepackage{graphicx}
20 jfenwick 3292 \usepackage{amsmath} %For equation*
21     \usepackage{amsfonts,amssymb} % see http://www.ams.org/tex/amslatex.html
22     \usepackage[nohyphen, strings]{underscore}
23    
24 jfenwick 3294 %Blue was chosen here because it looks ok when printed
25 caltinay 4057 \usepackage[pdfborder={0 0 0},pdfdisplaydoctitle=true,linktocpage=false, colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pdfusetitle]{hyperref}
26 jfenwick 3292
27 caltinay 4205 % links to figures point to captions without this:
28     \usepackage[all]{hypcap}
29    
30 jfenwick 3310 %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 jfenwick 3302
35 jfenwick 3310
36 jfenwick 3294 \usepackage{fancyhdr}
37     \renewcommand{\footrulewidth}{0.4pt}
38     \renewcommand{\headrulewidth}{0pt}
39 jfenwick 3292
40 jfenwick 3294 \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 jfenwick 3292
49 jfenwick 3294 \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 jfenwick 3295 \ChTitleAsIs
55 jfenwick 3292
56 jfenwick 3294 %Ensures that latex doesn't have an error if we don't specify the version
57     \providecommand{\RepVersion}{Unknown\xspace}
58 jfenwick 3292
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 jfenwick 3301 \newenvironment{bigdef}[1]{%
68 jfenwick 3305
69 caltinay 4095 \vspace{1em}
70     \setlength{\hangindent}{2cm}%
71     \raggedright\textbf{#1}
72 jfenwick 3301
73     \setlength{\hangindent}{1cm}%
74     \setlength{\hangafter}{0}%
75 jfenwick 3300 }%
76     {%
77 jfenwick 3301
78 jfenwick 3300 }
79    
80 jfenwick 3301 \newenvironment{classdesc}[2]{%
81 caltinay 3306 \begin{bigdef}{class #1(#2)}}{\end{bigdef}}
82 gross 4131 \newenvironment{classdesc*}[1]{%
83     \begin{bigdef}{class #1}}{\end{bigdef}}
84 jfenwick 3301
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 jfenwick 3300 \setlength{\itemindent}{-1cm}\setlength{\leftmargin}{1cm}
111    
112 jfenwick 3292 \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 gross 4131 \newcommand{\exception}[1]{\texttt{#1}}
123 jfenwick 3292 \newcommand{\constant}[1]{\textsl{#1}}
124     \newcommand{\method}[1]{\texttt{#1}}
125     \newcommand{\member}[1]{\texttt{#1}}
126 jfenwick 3295 \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 jfenwick 3292
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 jfenwick 3310 \pdfbookmark[0]{Title page}{title}
147 jfenwick 3294 \textsf{
148 jfenwick 3292 \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 jfenwick 3294 }
169 jfenwick 3292 \end{titlepage}}
170    
171 jfenwick 3302 \newcommand{\esysappendix}{%
172     \appendix%
173     \renewcommand*{\theHchapter}{\Alph{chapter}} %How latex generates chapters
174     \renewcommand*{\thechapter}{\Alph{chapter}} %How hyperref generates chapters
175     }
176 jfenwick 3292

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