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

Diff of /trunk/doc/user/user_defs.tex

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

revision 3307 by caltinay, Mon Oct 25 05:09:13 2010 UTC revision 3308 by jfenwick, Tue Oct 26 03:24:54 2010 UTC
# Line 214  Line 214 
214      \DeclareGraphicsExtensions{.eps}      \DeclareGraphicsExtensions{.eps}
215  \fi  \fi
216    
217  % defines the colour for the background of code examples  \include{elist}
 \definecolor{LightGrey}{gray}{0.9}  
218    
 %Some colour definitions added to keep pdflatex happy  
 %I make no claim that these values are particularly good  
 \definecolor{Purple}{rgb}{0.7, 0, 0.6}  
 \definecolor{Tan}{rgb}{0.5,0.5,0.5}  
 \definecolor{BrickRed}{rgb}{0.7, 0.2, 0.2}  
 \definecolor{Black}{rgb}{0, 0, 0}  
219    
 % All the \color{x} used to be \color[named]{x}  
 %end color defs  
   
 \lstdefinestyle{myC++}{%  
 language=C++,  
 showstringspaces=false,  
 basicstyle=\small\ttfamily,  
 commentstyle=\color{BrickRed}\ttfamily,  
 keywordstyle=\color{Purple}\ttfamily,  
 %identifierstyle=\color{Blue}\ttfamily,  
 %functionstyle=\color{Blue}\ttfamily,  
 %typestyle=\color{ForestGreen}\ttfamily,  
 stringstyle=\color{Tan}\ttfamily,%  
 morekeywords={,complex,}%  
 frame=none,%  
 backgroundcolor=\color{LightGrey}%  
 }  
   
 \lstdefinestyle{myMatlab}{%  
 language=Matlab,  
 showstringspaces=false,  
 basicstyle=\small\ttfamily,  
 commentstyle=\color{BrickRed}\ttfamily,  
 keywordstyle=\color{Purple}\ttfamily,  
 %identifierstyle=\color{Blue}\ttfamily,  
 %functionstyle=\color{Blue}\ttfamily,  
 %typestyle=\color{ForestGreen}\ttfamily,  
 stringstyle=\color{Tan}\ttfamily,%  
 frame=none,%  
 backgroundcolor=\color{LightGrey}%  
 }  
   
 \lstdefinestyle{myScilab}{%  
 language=Scilab,  
 showstringspaces=false,  
 basicstyle=\small\ttfamily,  
 commentstyle=\color{BrickRed}\ttfamily,  
 keywordstyle=\color{Purple}\ttfamily,  
 %identifierstyle=\color{Blue}\ttfamily,  
 %functionstyle=\color{Blue}\ttfamily,  
 %typestyle=\color{ForestGreen}\ttfamily,  
 stringstyle=\color{Tan}\ttfamily,%  
 frame=none,%  
 backgroundcolor=\color{LightGrey}%  
 }  
   
 \lstdefinestyle{myShell}{%  
 language=ksh,  
 showstringspaces=false,  
 basicstyle=\small\ttfamily,  
 commentstyle=\color{Black}\ttfamily,  
 keywordstyle=\color{Black}\ttfamily,  
 %identifierstyle=\color{Blue}\ttfamily,  
 %functionstyle=\color{Blue}\ttfamily,  
 %typestyle=\color{ForestGreen}\ttfamily,  
 stringstyle=\color{Black}\ttfamily,%  
 frame=none,%  
 backgroundcolor=\color{LightGrey}%  
 }  
   
 \lstdefinestyle{myPython}{%  
 language=python,  
 showstringspaces=false,  
 basicstyle=\small\ttfamily,  
 commentstyle=\color{BrickRed}\ttfamily,  
 keywordstyle=\color{Purple}\ttfamily,  
 %identifierstyle=\color{Blue}\ttfamily,  
 %functionstyle=\color{Blue}\ttfamily,  
 %typestyle=\color{ForestGreen}\ttfamily,  
 stringstyle=\color{Tan}\ttfamily,%  
 frame=none,%  
 %backgroundcolor=\color{LightGrey}%  
 }  
   
 \lstdefinestyle{myhtml}{%  
 language=xml,  
 showstringspaces=false,  
 basicstyle=\small\ttfamily,  
 commentstyle=\color{BrickRed}\ttfamily,  
 keywordstyle=\color{Purple}\ttfamily,  
 %identifierstyle=\color{Blue}\ttfamily,  
 %functionstyle=\color{Blue}\ttfamily,  
 %typestyle=\color{ForestGreen}\ttfamily,  
 stringstyle=\color{Tan}\ttfamily,  
 morekeywords={,simulation,prop_dim,error_check,stochastic,%  
   globals,field,dimensions,lattice,domains,samples,vector,%  
   components,fourier_space,sequence,integrate,algorithm,%  
   interval,k_operators,constant,operator_names,vectors,%  
   output,filename,group,sampling,moments,benchmark,use_double,%  
   use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%  
   default_value,argv,arg,iterations,cross_propagation,%  
   use_mpi,paths,seed,noises,author,description,name,type,%  
 }  
 frame=none,%  
 %framerule=2pt,%  
 backgroundcolor=\color{LightGrey}%  
 }  
   
 % this implements producing nice code blocks  
 % it also saves time, typing and  
 % *should* reduce errors in the text by removing doubling up of code  
 \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}  
   
 % this implements nicely formatted shell code  
 \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}  
   
 % this implements nicely formatted Perl code  
 \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}  
   
 % this implements nicely formatted Python code  
 \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}  
   
 % this implements nicely formatted C++ code  
 \lstnewenvironment{CCode}{\lstset{style=myC++}}{}  
   
 % this implements nicely formatted matlab code  
 \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}  
   
 % this implements nicely formatted scilab code  
 \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}  
220    
221  %Ensures that latex doesn't have an error if we don't specify the version  %Ensures that latex doesn't have an error if we don't specify the version
222  \providecommand{\RepVersion}{Unknown\xspace}  \providecommand{\RepVersion}{Unknown\xspace}

Legend:
Removed from v.3307  
changed lines
  Added in v.3308

  ViewVC Help
Powered by ViewVC 1.1.26