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

Diff of /trunk/doc/user/esysdoc.cls

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

revision 3293 by caltinay, Thu Oct 21 23:18:32 2010 UTC revision 3301 by jfenwick, Mon Oct 25 01:27:54 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{graphicx,color}  \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}
   
   
   
 %This is FAR from perfect for one thing it doesn't allow underscores to be used in filenames  
   
 %Now we mess with the underscore char  
 % {  
 % \catcode`|=8   % Since we will be redefining _ we need another way to indicate subscript in math mode  
 %                % This change only holds for the definition since it disappears at the close brace  
 % \catcode`_=\active    % define _ as a char which triggers a macro (which is what active means)  
 % \gdef\_{%     % A global definition (persists after } ) for _ when it is a macro  
 % \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  
25    
26    \usepackage{fancyhdr}
27    \renewcommand{\footrulewidth}{0.4pt}
28    \renewcommand{\headrulewidth}{0pt}
29    
30  % \newcommand*{\module}[1]{\texttt{#1}}  \fancypagestyle{plain}{%
31  % \newcommand*{\class}[1]{\texttt{#1}}  \fancyhead{}
32  % \newcommand*{\var}[1]{\textsl{#1}}  \cfoot{}
33  % \newcommand*{\method}[1]{\texttt{#1}}  \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    
39    \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    \ChTitleAsIs
45    
46  %Use the \Var form if you need to include % in the URL  %Ensures that latex doesn't have an error if we don't specify the version
47  %Please note that the \Var form does not work in maths mode  \providecommand{\RepVersion}{Unknown\xspace}
 % \DeclareUrlCommand\Var{}  
 %Same here with \function except \Function is already in use for a FunctionSpace  
 % \DeclareUrlCommand\FunctionName{}  
48    
 % \DeclareUrlCommand\umodule{}  
 % \DeclareUrlCommand\class{}  
 % \DeclareUrlCommand\method{}  
49  \DeclareUrlCommand\email{}  \DeclareUrlCommand\email{}
 % \DeclareUrlCommand\program{}  
 % \DeclareUrlCommand\env{}  
50    
51    \newcommand{\module}[1]{\mbox{\texttt{#1}}}
52    
53  % \DeclareUrlCommand\member{}  \newcommand*{\optional}[1]{[ #1 ]}
54  % \DeclareUrlCommand\file{}  %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  % \DeclareUrlCommand\kbd{}  \newenvironment{bigdef}[1]{%
58    \noindent
59    \setlength{\hangindent}{2cm}
60    \textbf{#1}
61    
62    \setlength{\hangindent}{1cm}%
63    \setlength{\hangafter}{0}%
64    \noindent%
65    }%
66    {%
67    
68  % \DeclareUrlCommand\usafe{}    %intended as a wrapper to make stuff underscrore safe  \vspace{0.5cm}
69  % \DeclareUrlCommand\constant{}  }
70    
71  %To safely deal with a module that has _ in its name do this:  \newenvironment{classdesc}[2]{%
72  % \urldef{\rMATPLOTLIB}\umodule{matplotlib}  \begin{bigdef}{class #1}}{\end{bigdef}}
 % \newcommand{\MATPLOTLIB}{\rMATPLOTLIB\index{visualization!matplotlib}\index{matplotlib}\xspace}  
73    
74  \newcommand{\module}[1]{\mbox{\texttt{#1}}}  \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  \newcommand*{\optional}[1]{[ #1 ]}  % {
84  %This should be converted into a two arg form so we can have different fonts for different parts  % \begin{bigdef}[#1(#2)]
85  \newcommand*{\programopt}[1]{#1}  % \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    \setlength{\itemindent}{-1cm}\setlength{\leftmargin}{1cm}
100    
 \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}}  
101  \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}  \newenvironment{memberdesc}[2][{}]{\begin{description}\item[\textbf{#2}]\mbox{}\\}{\end{description}}
102  \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}  \newenvironment{datadesc}[1]{\begin{description}\item[\textbf{#1}]\mbox{}\\}{\end{description}}
103    
# Line 97  Line 111 
111  \newcommand{\constant}[1]{\textsl{#1}}  \newcommand{\constant}[1]{\textsl{#1}}
112  \newcommand{\method}[1]{\texttt{#1}}  \newcommand{\method}[1]{\texttt{#1}}
113  \newcommand{\member}[1]{\texttt{#1}}  \newcommand{\member}[1]{\texttt{#1}}
114  \newcommand{\code}[1]{\mbox{\texttt{#1}}}   % Because people try to put code in maths mode  \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    
122  \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}
123    
# Line 112  Line 131 
131    
132  \renewcommand{\maketitle}{  \renewcommand{\maketitle}{
133  \begin{titlepage}  \begin{titlepage}
134    \textsf{
135  \begin{raggedleft}  \begin{raggedleft}
136  \Huge  \Huge
137  \hrule  \hrule
# Line 132  Line 152 
152  \vfill  \vfill
153  \@authoraddress\mbox{}\\  \@authoraddress\mbox{}\\
154  \end{raggedleft}  \end{raggedleft}
155    }
156  \end{titlepage}}  \end{titlepage}}
157    
158    
159  %Please do not use this one  %Please do not use this one
160  \newcommand*{\strong}{}  \newcommand*{\strong}{}
161    
 \usepackage{fancyhdr}  
 \renewcommand{\footrulewidth}{0.4pt}  
 \renewcommand{\headrulewidth}{0pt}  
162    
 \fancypagestyle{plain}{%  
 \fancyhead{}  
 \cfoot{}  
 \fancyfoot[LE,RO]{\thepage} %left on even pages right on odd pages  
 \fancyfoot[RE]{\nouppercase{\rightmark}}  
 \fancyfoot[LO]{\nouppercase{\leftmark}}  
 }  
 \pagestyle{plain}  
   
 \usepackage[Bjarne]{fncychap}  
163    

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

  ViewVC Help
Powered by ViewVC 1.1.26