/[escript]/trunk/doc/user/guide_defs.tex
ViewVC logotype

Annotation of /trunk/doc/user/guide_defs.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 593 - (hide annotations)
Tue Mar 14 02:50:27 2006 UTC (13 years, 8 months ago) by gross
File MIME type: application/x-tex
File size: 9771 byte(s)
updates on escript documentation (unfinished)
1 jgs 82 % $Id$
2    
3     \usepackage{epsfig}
4     \usepackage{graphicx,color}
5     \usepackage{makeidx} % handle the index properly
6     \usepackage{xspace} % handle spaces after commands more nicely
7     % use the ams math stuff, as it makes the maths easier to code, and
8     % nicer output than the standard LaTeX stuff
9     \usepackage{amsmath,amsfonts,amssymb} % this is handy for mathematicians and physicists
10     % see http://www.ams.org/tex/amslatex.html
11     \usepackage{alltt} % handy verbatim stuff
12    
13    
14     % define some handy commands for escript stuff
15 gross 565 \newcommand{\LINUX}{{\it Linux}\xspace}
16 jgs 107 \newcommand{\escript}{\module{esys.escript}\xspace}
17     \newcommand{\finley}{\module{esys.finley}\xspace}
18 gross 565 \newcommand{\pyvisi}{\module{esys.pyvisi}\xspace}
19     \newcommand{\bruce}{\module{esys.bruce}\xspace}
20    
21     \newcommand{\linearPDEs}{\module{esys.escript.linearPDEs}\xspace}
22 jgs 102 \newcommand{\LinearPDE}{\class{LinearPDE}\xspace}
23 jgs 121 \newcommand{\timeseries}{\module{esys.timeseries}\xspace}
24     \newcommand{\modelframe}{\module{esys.modelframe}\xspace}
25     \newcommand{\pdetools}{\module{esys.pdetools}\xspace}
26 gross 565
27 jgs 102 \newcommand{\AdvectivePDE}{\class{AdvectivePDE}\xspace}
28     \newcommand{\Poisson}{\class{Poisson}\xspace}
29 gross 568 \newcommand{\Helmholtz}{\class{Helmholtz}\xspace}
30 jgs 82 \newcommand{\Data}{\class{Data}\xspace}
31 jgs 102 \newcommand{\EmptyData}{empty \class{Data} \index{empty Data}\xspace}
32     \newcommand{\Domain}{\class{Domain}\xspace}
33 gross 565 \newcommand{\VTK}{{\it vtk} \index{visualization!vtk}\index{vtk}}
34     \newcommand{\mayavi}{{\it mayavi} \index{visualization!mayavi}\index{mayavi}}
35 jgs 102 \newcommand{\OpenDX}{{\it OpenDX}\xspace}
36     \newcommand{\finleyelement}[1]{{\it #1}\index{finley!#1}}
37     \newcommand{\False}{\constant{False}\xspace}
38     \newcommand{\True}{\constant{True}\xspace}
39     \newcommand{\PCG}{\constant{PCG}\index{linear solver!PCG}\index{PCG}}
40     \newcommand{\BiCGStab}{\constant{BICGSTAB}\index{linear solver!BiCGStab}\index{BiCGStab}}
41     \newcommand{\Direct}{\constant{DIRECT}\index{linear solver!Direct}\index{Direct solver}}
42     \newcommand{\GMRES}{\constant{GMRES}\index{linear solver!GMRES}\index{GMRES}}
43     \newcommand{\PRESTWENTY}{\constant{PRES20}\index{linear solver!PRES20}\index{PRES20}}
44 jgs 82
45 jgs 102 \newcommand{\FunctionSpace}{\class{FunctionSpace}\xspace}
46     \newcommand{\Operator}{\class{Operator}\xspace}
47     \newcommand{\SolutionFS}{solution \class{FunctionSpace}\index{solution}\xspace}
48     \newcommand{\ReducedSolutionFS}{reduced solution \class{FunctionSpace}\index{solution!reduced}\xspace}
49     \newcommand{\FunctionOnBoundary}{boundary \class{FunctionSpace}\xspace}
50     \newcommand{\Function}{general \class{FunctionSpace}\xspace}
51     \newcommand{\FunctionOnContactZero}{contact \class{FunctionSpace} on side 0\xspace}
52     \newcommand{\FunctionOnContactOne}{contact \class{FunctionSpace} on side 1\xspace}
53     \newcommand{\ContinuousFunction}{continuous \class{FunctionSpace}\xspace}
54 gross 565 \newcommand{\RankOne}{{rank-1 \Data object}\xspace}
55 jgs 102 \newcommand{\RankTwo}{{rank-2 \Data object}\xspace}
56     \newcommand{\RankThree}{{rank-3 \Data object}\xspace}
57     \newcommand{\RankFour}{{rank-4 \Data object}\xspace}
58     \newcommand{\Scalar}{{scalar \Data object}\xspace}
59     \newcommand{\DataSample}{{data sample} \index{data sample}\xspace}
60     \newcommand{\DataSamplePoints}{{data sample points} \index{data sample!points}\xspace}
61     \newcommand{\numarray}{\module{numarray}\xspace}
62     \newcommand{\Shape}{shape\xspace\index{shape}}
63 gross 565 \newcommand{\Rank}{rank\xspace\index{shape}}
64 jgs 102 \newcommand{\ExampleDirectory}{example directory\xspace}
65 gross 593 \newcommand{\ReferenceGuide}{\url{http://www.iservo.edu.au/esys/epydoc/index.html}}
66 jgs 102
67    
68    
69 gross 593
70 jgs 82 % default width for figures
71     \newcommand{\figwidth}{100mm}
72     % commands useful in cross-referencing
73     \newcommand {\Ref}[1] {Reference~\cite{#1}}
74     \newcommand {\Sec}[1] {Section~\ref{#1}}
75     \newcommand {\App}[1] {Appendix~\ref{#1}}
76     \newcommand {\Chap}[1] {Chapter~\ref{#1}}
77     \newcommand {\etal} {\emph{~et~al.}}
78     \newcommand {\fig}[1] {Figure~\ref{#1}}
79     \newcommand {\eqn}[1] {Equation~(\ref{#1})}
80     \newcommand {\tab}[1] {Table~\ref{#1}}
81    
82 jgs 102 % this stops one figure taking up a whole page and lets more text onto
83     % the one page when a figure exists
84     \renewcommand{\floatpagefraction}{0.8} % Default = 0.5
85    
86 jgs 82 % improved version of caption handling
87     \usepackage{ccaption}
88     \captionnamefont{\scshape}
89     \captionstyle{}
90     \makeatletter
91     \renewcommand{\fnum@figure}[1]{\quad\small\textsc{\figurename~\thefigure}:}
92     \renewcommand{\@makecaption}[2]{%
93     \vskip\abovecaptionskip
94     \sbox\@tempboxa{#1: #2}%
95     \ifdim \wd\@tempboxa >\hsize
96     \def\baselinestretch{1}\@normalsize
97     #1: #2\par
98     \def\baselinestretch{1.5}\@normalsize
99     \else
100     \global \@minipagefalse
101     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
102     \fi
103     \vskip\belowcaptionskip}
104     \makeatother
105    
106 gross 572 % \usepackage{fancyvrb} % fancy verbatim stuff. Needed so code below goes
107 jgs 82 %%% this code grabbed from the PyScript docs
108     %%% pyscript.sourceforge.net
109    
110     % --------------------------------------------------------------
111     % Code format within \Verb
112     % --------------------------------------------------------------
113    
114 gross 572 % \definecolor{pycolor}{rgb}{0,0.4,0}
115 jgs 82
116 jgs 102 %% \DefineVerbatimEnvironment{python}{Verbatim}
117     %% {frame=leftline,framerule=.5mm,rulecolor=\color{pycolor},
118     %% formatcom=\color{pycolor}\small,fontshape=rm}
119 jgs 82
120     %\DefineShortVerb[formatcom=\color{dgreen}\small,fontshape=sl]{\|}
121    
122 gross 572 % \RecustomVerbatimCommand{\Verb}{Verb}{formatcom=\color{pycolor}\small,fontshape=rm}
123 jgs 82
124     %%% end of grabbed code
125    
126     % this is for when one uses pdflatex and therefore needs to load pdf
127     % figures into \includegraphics
128     \ifpdf
129     \DeclareGraphicsExtensions{.pdf} % this command defined in graphicx
130     \pdfcompresslevel=9 % 0: no compression, 9: highest compression
131     % or, set compress_level 9 in file pdftex.cfg
132     \else
133     \DeclareGraphicsExtensions{.eps}
134     \fi
135 jgs 102
136     % defines the colour for the background of code examples
137     \definecolor{LightGrey}{gray}{0.9}
138    
139     % add the listings package to pretty print the code output
140     \usepackage{listings}
141    
142     \lstdefinestyle{myC++}{%
143     %\lstset{%
144     language=C++,
145     showstringspaces=false,
146     basicstyle=\small\ttfamily,
147     commentstyle=\color[named]{BrickRed}\ttfamily,
148     keywordstyle=\color[named]{Purple}\ttfamily,
149     %identifierstyle=\color[named]{Blue}\ttfamily,
150     %functionstyle=\color[named]{Blue}\ttfamily,
151     %typestyle=\color[named]{ForestGreen}\ttfamily,
152     stringstyle=\color[named]{Tan}\ttfamily,%
153     morekeywords={,complex,}%
154     frame=none,%
155     backgroundcolor=\color{LightGrey}%
156     }
157    
158     \lstdefinestyle{myMatlab}{%
159     %\lstset{%
160     language=Matlab,
161     showstringspaces=false,
162     basicstyle=\small\ttfamily,
163     commentstyle=\color[named]{BrickRed}\ttfamily,
164     keywordstyle=\color[named]{Purple}\ttfamily,
165     %identifierstyle=\color[named]{Blue}\ttfamily,
166     %functionstyle=\color[named]{Blue}\ttfamily,
167     %typestyle=\color[named]{ForestGreen}\ttfamily,
168     stringstyle=\color[named]{Tan}\ttfamily,%
169     frame=none,%
170     backgroundcolor=\color{LightGrey}%
171     }
172    
173     \lstdefinestyle{myScilab}{%
174     %\lstset{%
175     language=Scilab,
176     showstringspaces=false,
177     basicstyle=\small\ttfamily,
178     commentstyle=\color[named]{BrickRed}\ttfamily,
179     keywordstyle=\color[named]{Purple}\ttfamily,
180     %identifierstyle=\color[named]{Blue}\ttfamily,
181     %functionstyle=\color[named]{Blue}\ttfamily,
182     %typestyle=\color[named]{ForestGreen}\ttfamily,
183     stringstyle=\color[named]{Tan}\ttfamily,%
184     frame=none,%
185     backgroundcolor=\color{LightGrey}%
186     }
187    
188     \lstdefinestyle{myShell}{%
189     %\lstset{%
190     language=ksh,
191     showstringspaces=false,
192     basicstyle=\small\ttfamily,
193     commentstyle=\color[named]{Black}\ttfamily,
194     keywordstyle=\color[named]{Black}\ttfamily,
195     %identifierstyle=\color[named]{Blue}\ttfamily,
196     %functionstyle=\color[named]{Blue}\ttfamily,
197     %typestyle=\color[named]{ForestGreen}\ttfamily,
198     stringstyle=\color[named]{Black}\ttfamily,%
199     frame=none,%
200     backgroundcolor=\color{LightGrey}%
201     }
202    
203     \lstdefinestyle{myPython}{%
204     %\lstset{%
205     language=python,
206     showstringspaces=false,
207     basicstyle=\small\ttfamily,
208     commentstyle=\color[named]{BrickRed}\ttfamily,
209     keywordstyle=\color[named]{Purple}\ttfamily,
210     %identifierstyle=\color[named]{Blue}\ttfamily,
211     %functionstyle=\color[named]{Blue}\ttfamily,
212     %typestyle=\color[named]{ForestGreen}\ttfamily,
213     stringstyle=\color[named]{Tan}\ttfamily,%
214     frame=none,%
215     %backgroundcolor=\color{LightGrey}%
216     }
217    
218     \lstdefinestyle{myhtml}{%
219     %\lstset{%
220     language=xml,
221     showstringspaces=false,
222     basicstyle=\small\ttfamily,
223     commentstyle=\color[named]{BrickRed}\ttfamily,
224     keywordstyle=\color[named]{Purple}\ttfamily,
225     %identifierstyle=\color[named]{Blue}\ttfamily,
226     %functionstyle=\color[named]{Blue}\ttfamily,
227     %typestyle=\color[named]{ForestGreen}\ttfamily,
228     stringstyle=\color[named]{Tan}\ttfamily,
229     morekeywords={,simulation,prop_dim,error_check,stochastic,%
230     globals,field,dimensions,lattice,domains,samples,vector,%
231     components,fourier_space,sequence,integrate,algorithm,%
232     interval,k_operators,constant,operator_names,vectors,%
233     output,filename,group,sampling,moments,benchmark,use_double,%
234     use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
235     default_value,argv,arg,iterations,cross_propagation,%
236     use_mpi,paths,seed,noises,author,description,name,type,%
237     }
238     frame=none,%
239     %framerule=2pt,%
240     backgroundcolor=\color{LightGrey}%
241     }
242    
243     % this implements producing nice code blocks
244     % it also saves time, typing and
245     % *should* reduce errors in the text by removing doubling up of code
246     \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
247    
248     % this implements nicely formatted shell code
249     \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
250    
251     % this implements nicely formatted Perl code
252     \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
253    
254     % this implements nicely formatted Python code
255     \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
256    
257     % this implements nicely formatted C++ code
258     \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
259    
260     % this implements nicely formatted matlab code
261     \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
262    
263     % this implements nicely formatted scilab code
264     \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
265    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26