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

Annotation of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3301 - (hide annotations)
Mon Oct 25 01:27:54 2010 UTC (8 years, 11 months ago) by jfenwick
Original Path: trunk/doc/user/esysdoc.cls
File size: 3827 byte(s)
Modified layout of descriptions.
Fixed some overfull hboxes
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 3294 \usepackage{fancyhdr}
27     \renewcommand{\footrulewidth}{0.4pt}
28     \renewcommand{\headrulewidth}{0pt}
29 jfenwick 3292
30 jfenwick 3294 \fancypagestyle{plain}{%
31     \fancyhead{}
32     \cfoot{}
33     \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages
34     \fancyfoot[RE]{\nouppercase{\rightmark}}
35     \fancyfoot[LO]{\nouppercase{\leftmark}}
36     }
37     \pagestyle{plain}
38 jfenwick 3292
39 jfenwick 3294 \usepackage[Bjarne]{fncychap}
40     % \ChRuleWidth{1pt}
41     \ChNameVar{\raggedleft\large\sffamily} % The word chapter
42     \ChNumVar{\raggedleft\bfseries\Large} % The number of the chapter
43     \ChTitleVar{\raggedleft \Huge\sffamily} % title of the chapter
44 jfenwick 3295 \ChTitleAsIs
45 jfenwick 3292
46 jfenwick 3294 %Ensures that latex doesn't have an error if we don't specify the version
47     \providecommand{\RepVersion}{Unknown\xspace}
48 jfenwick 3292
49     \DeclareUrlCommand\email{}
50    
51     \newcommand{\module}[1]{\mbox{\texttt{#1}}}
52    
53     \newcommand*{\optional}[1]{[ #1 ]}
54     %This should be converted into a two arg form so we can have different fonts for different parts
55     \newcommand*{\programopt}[1]{#1}
56    
57 jfenwick 3301 \newenvironment{bigdef}[1]{%
58 jfenwick 3300 \noindent
59 jfenwick 3301 \setlength{\hangindent}{2cm}
60     \textbf{#1}
61    
62     \setlength{\hangindent}{1cm}%
63     \setlength{\hangafter}{0}%
64     \noindent%
65 jfenwick 3300 }%
66     {%
67 jfenwick 3301
68     \vspace{0.5cm}
69 jfenwick 3300 }
70    
71 jfenwick 3301 \newenvironment{classdesc}[2]{%
72     \begin{bigdef}{class #1}}{\end{bigdef}}
73    
74     \newenvironment{methoddesc}[3][{}]{%
75     \begin{bigdef}{#2(#3)}}{\end{bigdef}}
76     \newenvironment{funcdesc}[2]{%
77     \begin{bigdef}{#1(#2)}%
78     }
79     {%
80     \end{bigdef}
81     }
82    
83     % {
84     % \begin{bigdef}[#1(#2)]
85     % \noindent
86     % \setlength{\hangindent}{2cm}
87     % \textbf{#1(#2)}
88     %
89     % }
90     % \setlength{\hangindent}{1cm}
91     % \setlength{\hangafter}{0}
92     % \noindent
93     % }%
94     % {%
95     %
96     % \mbox{}\\
97     % }
98    
99 jfenwick 3300 \setlength{\itemindent}{-1cm}\setlength{\leftmargin}{1cm}
100    
101 jfenwick 3292 \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
102     \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
103    
104     \newcommand{\file}[1]{\texttt{#1}\xspace}
105     \newcommand{\program}[1]{\textbf{\texttt{#1}}\xspace}
106     % \newcommand{\env}[1]{\texttt{#1}\xspace}
107     \newcommand{\var}[1]{\texttt{#1}\xspace}
108     \newcommand{\kbd}[1]{\texttt{#1}}
109     \newcommand{\function}[1]{\texttt{#1}}
110     \newcommand{\class}[1]{\texttt{#1}}
111     \newcommand{\constant}[1]{\textsl{#1}}
112     \newcommand{\method}[1]{\texttt{#1}}
113     \newcommand{\member}[1]{\texttt{#1}}
114 jfenwick 3295 \newcommand{\code}[1]{%
115     \ifmmode%
116     \mbox{\texttt{#1}}%
117     \else%
118     \texttt{#1}%
119     \fi % Because people try to put code in maths mode
120     }
121 jfenwick 3292
122     \newenvironment{abstract}{\newpage\mbox{}\vfill\begin{center}\textbf{Abstract}\end{center}}{\vfill\newpage}
123    
124     \newcommand{\authoraddress}[1]{\gdef \@authoraddress {#1}}
125    
126     \newcommand{\release}[1]{\gdef \@ESreleasename {#1}}
127     \release{nightly} %Just so we have a default
128    
129     \newcommand*{\subtitleLineOne}{\textsl{Release - \@ESreleasename}}
130     \newcommand*{\subtitleLineTwo}{\textsl{(r\RepVersion)}}
131    
132     \renewcommand{\maketitle}{
133     \begin{titlepage}
134 jfenwick 3294 \textsf{
135 jfenwick 3292 \begin{raggedleft}
136     \Huge
137     \hrule
138     \mbox{}\\
139     \mbox{}\\
140     \@title
141     \mbox{}\\
142     \LARGE
143     \mbox{}\\
144     \subtitleLineOne\\
145     \subtitleLineTwo\\
146     \vfill
147     \@author
148     \vfill
149     \vfill
150     \large
151     \@date\\
152     \vfill
153     \@authoraddress\mbox{}\\
154     \end{raggedleft}
155 jfenwick 3294 }
156 jfenwick 3292 \end{titlepage}}
157    
158    
159     %Please do not use this one
160     \newcommand*{\strong}{}
161    
162    
163    

  ViewVC Help
Powered by ViewVC 1.1.26