/[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 3292 by jfenwick, Thu Oct 21 05:02:49 2010 UTC trunk/doc/esysdoc.cls revision 3305 by jfenwick, Mon Oct 25 05:04:22 2010 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    
14  %\usepackage{avant}  %\usepackage{avant}
15  \renewcommand{\familydefault}{\sfdefault}   % Switch to san seriff  %\renewcommand{\familydefault}{\sfdefault}  % Switch to san seriff
16  \usepackage{url}  \usepackage{url}
17  \usepackage{xspace}  \usepackage{xspace}
18  \usepackage{graphics}  \usepackage{graphicx,color}
19  \usepackage{amsmath}    %For equation*  \usepackage{amsmath}    %For equation*
20  \usepackage{amsfonts,amssymb} % see http://www.ams.org/tex/amslatex.html  \usepackage{amsfonts,amssymb} % see http://www.ams.org/tex/amslatex.html
21  \usepackage[nohyphen, strings]{underscore}  \usepackage[nohyphen, strings]{underscore}
 \usepackage[colorlinks=false,pdfborder={0 0 0},pdfdisplaydoctitle=true,linktocpage=true]{hyperref}  
22    
23  %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
24  \providecommand{\RepVersion}{Unknown\xspace}  \usepackage[pdfborder={0 0 0},pdfdisplaydoctitle=true,linktocpage=false, colorlinks=true,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
25    
26    
27    \usepackage{fancyhdr}
28    \renewcommand{\footrulewidth}{0.4pt}
29    \renewcommand{\headrulewidth}{0pt}
30    
31  %This is FAR from perfect for one thing it doesn't allow underscores to be used in filenames  \fancypagestyle{plain}{%
32    \fancyhead{}
33  %Now we mess with the underscore char  \cfoot{}
34  % {  \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages
35  % \catcode`|=8   % Since we will be redefining _ we need another way to indicate subscript in math mode  \fancyfoot[RE]{\nouppercase{\rightmark}}
36  %                % This change only holds for the definition since it disappears at the close brace  \fancyfoot[LO]{\nouppercase{\leftmark}}
37  % \catcode`_=\active    % define _ as a char which triggers a macro (which is what active means)  }
38  % \gdef\_{%     % A global definition (persists after } ) for _ when it is a macro  \pagestyle{plain}
 % \ifmmode |        % If we are in math mode, then output subscript char  
 % \else  
 % \textunderscore       % else output underscore symbol  
 % \fi  
 % }  
 % }  
 % \catcode`_=\active    % Set _ to active at the top level  
39    
40    \usepackage[Bjarne]{fncychap}
41    % \ChRuleWidth{1pt}
42    \ChNameVar{\raggedleft\large\sffamily}  % The word chapter
43    \ChNumVar{\raggedleft\bfseries\Large}   % The number of the chapter
44    \ChTitleVar{\raggedleft \Huge\sffamily} % title of the chapter
45    \ChTitleAsIs
46    
47  % \newcommand*{\module}[1]{\texttt{#1}}  %Ensures that latex doesn't have an error if we don't specify the version
48  % \newcommand*{\class}[1]{\texttt{#1}}  \providecommand{\RepVersion}{Unknown\xspace}
 % \newcommand*{\var}[1]{\textsl{#1}}  
 % \newcommand*{\method}[1]{\texttt{#1}}  
49    
50    \DeclareUrlCommand\email{}
51    
52  %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{}  
53    
54  % \DeclareUrlCommand\umodule{}  \newcommand*{\optional}[1]{[ #1 ]}
55  % \DeclareUrlCommand\class{}  %This should be converted into a two arg form so we can have different fonts for different parts
56  % \DeclareUrlCommand\method{}  \newcommand*{\programopt}[1]{#1}
 \DeclareUrlCommand\email{}  
 % \DeclareUrlCommand\program{}  
 % \DeclareUrlCommand\env{}  
57    
58    \newenvironment{bigdef}[1]{%
59    
60  % \DeclareUrlCommand\member{}  \noindent
61  % \DeclareUrlCommand\file{}  \setlength{\hangindent}{2cm}
62    \textbf{#1}
63    
64    \setlength{\hangindent}{1cm}%
65    \setlength{\hangafter}{0}%
66    \noindent%
67    }%
68    {%
69    
70  % \DeclareUrlCommand\kbd{}  \vspace{0.5cm}
71    }
72    
73  % \DeclareUrlCommand\usafe{}    %intended as a wrapper to make stuff underscrore safe  \newenvironment{classdesc}[2]{%
74  % \DeclareUrlCommand\constant{}  \begin{bigdef}{class #1}}{\end{bigdef}}
75    
76  %To safely deal with a module that has _ in its name do this:  \newenvironment{methoddesc}[3][{}]{%
77  % \urldef{\rMATPLOTLIB}\umodule{matplotlib}  \begin{bigdef}{#2(#3)}}{\end{bigdef}}
78  % \newcommand{\MATPLOTLIB}{\rMATPLOTLIB\index{visualization!matplotlib}\index{matplotlib}\xspace}  \newenvironment{funcdesc}[2]{%
79    \begin{bigdef}{#1(#2)}%
80    }
81    {%
82    \end{bigdef}
83    }
84    
85  \newcommand{\module}[1]{\mbox{\texttt{#1}}}  % {
86    % \begin{bigdef}[#1(#2)]
87    % \noindent
88    % \setlength{\hangindent}{2cm}
89    % \textbf{#1(#2)}
90    %
91    % }
92    % \setlength{\hangindent}{1cm}
93    % \setlength{\hangafter}{0}
94    % \noindent
95    % }%
96    % {%
97    %
98    % \mbox{}\\
99    % }
100    
101  \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}  
102    
 \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}}  
103  \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}  \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
104  \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}  \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
105    
# Line 97  Line 113 
113  \newcommand{\constant}[1]{\textsl{#1}}  \newcommand{\constant}[1]{\textsl{#1}}
114  \newcommand{\method}[1]{\texttt{#1}}  \newcommand{\method}[1]{\texttt{#1}}
115  \newcommand{\member}[1]{\texttt{#1}}  \newcommand{\member}[1]{\texttt{#1}}
116  \newcommand{\code}[1]{\mbox{\texttt{#1}}}   % Because people try to put code in maths mode  \newcommand{\code}[1]{%
117    \ifmmode%
118    \mbox{\texttt{#1}}%
119    \else%
120    \texttt{#1}%
121    \fi    % Because people try to put code in maths mode
122    }
123    
124  \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}
125    
# Line 112  Line 133 
133    
134  \renewcommand{\maketitle}{  \renewcommand{\maketitle}{
135  \begin{titlepage}  \begin{titlepage}
136    \textsf{
137  \begin{raggedleft}  \begin{raggedleft}
138  \Huge  \Huge
139  \hrule  \hrule
# Line 132  Line 154 
154  \vfill  \vfill
155  \@authoraddress\mbox{}\\  \@authoraddress\mbox{}\\
156  \end{raggedleft}  \end{raggedleft}
157    }
158  \end{titlepage}}  \end{titlepage}}
159    
160    \newcommand{\esysappendix}{%
161  %Please do not use this one  \appendix%
162  \newcommand*{\strong}{}  \renewcommand*{\theHchapter}{\Alph{chapter}}    %How latex generates chapters
163    \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}}  
164  }  }
 \pagestyle{plain}  
165    
166  \usepackage[Bjarne]{fncychap}  
167    

Legend:
Removed from v.3292  
changed lines
  Added in v.3305

  ViewVC Help
Powered by ViewVC 1.1.26