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

Diff of /trunk/doc/esysdoc.cls

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/doc/user/esysdoc.cls revision 3293 by caltinay, Thu Oct 21 23:18:32 2010 UTC trunk/doc/esysdoc.cls revision 3675 by jfenwick, Thu Nov 17 00:53:38 2011 UTC
# Line 6  Line 6 
6  \ProvidesClass{esysdoc}  \ProvidesClass{esysdoc}
7  \LoadClass[a4paper, twoside]{book}  \LoadClass[a4paper, twoside]{book}
8    
9  \usepackage[a4paper, left=2.5cm, right=2.5cm]{geometry}  \usepackage[a4paper, left=2.5cm, right=2.5cm, nohead, vcentering, scale=0.8]{geometry}
10  \usepackage{times}  \usepackage{times}
 % \usepackage{fancyvrb} % Hopefully this will give us our code environments  
11  \usepackage{listings}  \usepackage{listings}
12    \usepackage{ifpdf}
13    \usepackage{makeidx}
14    
15  %\usepackage{avant}  %\usepackage{avant}
16  \renewcommand{\familydefault}{\sfdefault}   % Switch to san seriff  %\renewcommand{\familydefault}{\sfdefault}  % Switch to san seriff
17  \usepackage{url}  \usepackage{url}
18  \usepackage{xspace}  \usepackage{xspace}
19  \usepackage{graphicx,color}  \usepackage{graphicx}
20  \usepackage{amsmath}    %For equation*  \usepackage{amsmath}    %For equation*
21  \usepackage{amsfonts,amssymb} % see http://www.ams.org/tex/amslatex.html  \usepackage{amsfonts,amssymb} % see http://www.ams.org/tex/amslatex.html
22  \usepackage[nohyphen, strings]{underscore}  \usepackage[nohyphen, strings]{underscore}
 \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  %Blue was chosen here because it looks ok when printed
25  \providecommand{\RepVersion}{Unknown\xspace}  \usepackage[pdfborder={0 0 0},pdfdisplaydoctitle=true,linktocpage=false, colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{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  %This is FAR from perfect for one thing it doesn't allow underscores to be used in filenames  \usepackage{fancyhdr}
34    \renewcommand{\footrulewidth}{0.4pt}
35    \renewcommand{\headrulewidth}{0pt}
36    
37  %Now we mess with the underscore char  \fancypagestyle{plain}{%
38  % {  \fancyhead{}
39  % \catcode`|=8   % Since we will be redefining _ we need another way to indicate subscript in math mode  \cfoot{}
40  %                % This change only holds for the definition since it disappears at the close brace  \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages
41  % \catcode`_=\active    % define _ as a char which triggers a macro (which is what active means)  \fancyfoot[RE]{\nouppercase{\rightmark}}
42  % \gdef\_{%     % A global definition (persists after } ) for _ when it is a macro  \fancyfoot[LO]{\nouppercase{\leftmark}}
43  % \ifmmode |        % If we are in math mode, then output subscript char  }
44  % \else  \pagestyle{plain}
 % \textunderscore       % else output underscore symbol  
 % \fi  
 % }  
 % }  
 % \catcode`_=\active    % Set _ to active at the top level  
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  % \newcommand*{\module}[1]{\texttt{#1}}  %Ensures that latex doesn't have an error if we don't specify the version
54  % \newcommand*{\class}[1]{\texttt{#1}}  \providecommand{\RepVersion}{Unknown\xspace}
 % \newcommand*{\var}[1]{\textsl{#1}}  
 % \newcommand*{\method}[1]{\texttt{#1}}  
55    
56    \DeclareUrlCommand\email{}
57    
58  %Use the \Var form if you need to include % in the URL  \newcommand{\module}[1]{\mbox{\texttt{#1}}}
 %Please note that the \Var form does not work in maths mode  
 % \DeclareUrlCommand\Var{}  
 %Same here with \function except \Function is already in use for a FunctionSpace  
 % \DeclareUrlCommand\FunctionName{}  
59    
60  % \DeclareUrlCommand\umodule{}  \newcommand*{\optional}[1]{[ #1 ]}
61  % \DeclareUrlCommand\class{}  %This should be converted into a two arg form so we can have different fonts for different parts
62  % \DeclareUrlCommand\method{}  \newcommand*{\programopt}[1]{#1}
 \DeclareUrlCommand\email{}  
 % \DeclareUrlCommand\program{}  
 % \DeclareUrlCommand\env{}  
63    
64    \newenvironment{bigdef}[1]{%
65    
66  % \DeclareUrlCommand\member{}  \noindent
67  % \DeclareUrlCommand\file{}  \setlength{\hangindent}{2cm}
68    \textbf{#1}
69    
70    \setlength{\hangindent}{1cm}%
71    \setlength{\hangafter}{0}%
72    \noindent%
73    }%
74    {%
75    
76  % \DeclareUrlCommand\kbd{}  \vspace{0.5cm}
77    }
78    
79  % \DeclareUrlCommand\usafe{}    %intended as a wrapper to make stuff underscrore safe  \newenvironment{classdesc}[2]{%
80  % \DeclareUrlCommand\constant{}  \begin{bigdef}{class #1(#2)}}{\end{bigdef}}
81    
82  %To safely deal with a module that has _ in its name do this:  \newenvironment{methoddesc}[3][{}]{%
83  % \urldef{\rMATPLOTLIB}\umodule{matplotlib}  \begin{bigdef}{#2(#3)}}{\end{bigdef}}
84  % \newcommand{\MATPLOTLIB}{\rMATPLOTLIB\index{visualization!matplotlib}\index{matplotlib}\xspace}  \newenvironment{funcdesc}[2]{%
85    \begin{bigdef}{#1(#2)}%
86    }
87    {%
88    \end{bigdef}
89    }
90    
91  \newcommand{\module}[1]{\mbox{\texttt{#1}}}  % {
92    % \begin{bigdef}[#1(#2)]
93    % \noindent
94    % \setlength{\hangindent}{2cm}
95    % \textbf{#1(#2)}
96    %
97    % }
98    % \setlength{\hangindent}{1cm}
99    % \setlength{\hangafter}{0}
100    % \noindent
101    % }%
102    % {%
103    %
104    % \mbox{}\\
105    % }
106    
107  \newcommand*{\optional}[1]{[ #1 ]}  \setlength{\itemindent}{-1cm}\setlength{\leftmargin}{1cm}
 %This should be converted into a two arg form so we can have different fonts for different parts  
 \newcommand*{\programopt}[1]{#1}  
108    
 \newenvironment{classdesc}[3]{\begin{description}\item[class #1]\mbox{}\\}{\end{description}}  
 \newenvironment{methoddesc}[3][{}]{\begin{description}\item[\textbf{#2}(#3)]\mbox{}\\}{\end{description}}  
 \newenvironment{funcdesc}[2]{\begin{description}\item[\textbf{#1}(#2)]\mbox{}\\}{\end{description}}  
109  \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}  \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
110  \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}  \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
111    
# Line 97  Line 119 
119  \newcommand{\constant}[1]{\textsl{#1}}  \newcommand{\constant}[1]{\textsl{#1}}
120  \newcommand{\method}[1]{\texttt{#1}}  \newcommand{\method}[1]{\texttt{#1}}
121  \newcommand{\member}[1]{\texttt{#1}}  \newcommand{\member}[1]{\texttt{#1}}
122  \newcommand{\code}[1]{\mbox{\texttt{#1}}}   % Because people try to put code in maths mode  \newcommand{\code}[1]{%
123    \ifmmode%
124    \mbox{\texttt{#1}}%
125    \else%
126    \texttt{#1}%
127    \fi    % Because people try to put code in maths mode
128    }
129    
130  \newenvironment{abstract}{\newpage\mbox{}\vfill\begin{center}\textbf{Abstract}\end{center}}{\vfill\newpage}  \newenvironment{abstract}{\newpage\mbox{}\vfill\begin{center}\textbf{Abstract}\end{center}}{\vfill\newpage}
131    
# Line 112  Line 139 
139    
140  \renewcommand{\maketitle}{  \renewcommand{\maketitle}{
141  \begin{titlepage}  \begin{titlepage}
142    \pdfbookmark[0]{Title page}{title}
143    \textsf{
144  \begin{raggedleft}  \begin{raggedleft}
145  \Huge  \Huge
146  \hrule  \hrule
# Line 132  Line 161 
161  \vfill  \vfill
162  \@authoraddress\mbox{}\\  \@authoraddress\mbox{}\\
163  \end{raggedleft}  \end{raggedleft}
164    }
165  \end{titlepage}}  \end{titlepage}}
166    
167    \newcommand{\esysappendix}{%
168  %Please do not use this one  \appendix%
169  \newcommand*{\strong}{}  \renewcommand*{\theHchapter}{\Alph{chapter}}    %How latex generates chapters
170    \renewcommand*{\thechapter}{\Alph{chapter}} %How hyperref generates chapters
 \usepackage{fancyhdr}  
 \renewcommand{\footrulewidth}{0.4pt}  
 \renewcommand{\headrulewidth}{0pt}  
   
 \fancypagestyle{plain}{%  
 \fancyhead{}  
 \cfoot{}  
 \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages  
 \fancyfoot[RE]{\nouppercase{\rightmark}}  
 \fancyfoot[LO]{\nouppercase{\leftmark}}  
171  }  }
 \pagestyle{plain}  
   
 \usepackage[Bjarne]{fncychap}  
172    

Legend:
Removed from v.3293  
changed lines
  Added in v.3675

  ViewVC Help
Powered by ViewVC 1.1.26