1 |
%!TEX root = report.tex |
%!TEX root = report.tex |
2 |
% |
% |
3 |
|
|
4 |
|
%BEGIN LATEX |
5 |
|
\setlength{\textwidth}{6in} |
6 |
|
\oddsidemargin 0.25in |
7 |
|
\evensidemargin 0.25in |
8 |
|
\addtolength{\textheight}{1.0in} |
9 |
|
\addtolength{\topmargin}{-0.5in} |
10 |
|
\parskip 5pt |
11 |
|
%END LATEX |
12 |
|
|
13 |
|
\usepackage{times} |
14 |
|
%BEGIN LATEX |
15 |
|
%------------------------- |
16 |
|
% the following magic makes the tt font in math mode be the same as the |
17 |
|
% normal tt font (i.e., Courier) |
18 |
|
% |
19 |
|
\SetMathAlphabet{\mathtt}{normal}{OT1}{pcr}{n}{n} |
20 |
|
\SetMathAlphabet{\mathtt}{bold}{OT1}{pcr}{bx}{n} |
21 |
|
%------------------------- |
22 |
|
%END LATEX |
23 |
|
|
24 |
|
%BEGIN LATEX |
25 |
|
\usepackage{hevea} |
26 |
|
\usepackage{grammar} |
27 |
|
\renewcommand{\term}[1]{\textsc{#1}} |
28 |
|
%END LATEX |
29 |
|
|
30 |
|
\usepackage{graphicx} |
31 |
|
\usepackage{color} |
32 |
|
\usepackage{amsmath} |
33 |
|
\usepackage{stmaryrd} |
34 |
|
|
35 |
|
\definecolor{Red}{rgb}{0.9,0.0,0.0} |
36 |
|
\definecolor{Green}{rgb}{0.0,0.4,0.0} |
37 |
|
\definecolor{Blue}{rgb}{0.0,0.0,0.9} |
38 |
|
\definecolor{Purple}{rgb}{0.5,0.0,0.4} |
39 |
|
\definecolor{Black}{rgb}{0.0,0.0,0.0} |
40 |
|
\definecolor{Yellow}{rgb}{1.0,1.0, 0.25} |
41 |
|
\definecolor{Cyan}{rgb}{0.25,1.0, 1.0} |
42 |
|
|
43 |
|
% Diderot listings |
44 |
|
% |
45 |
|
\usepackage{listings} |
46 |
|
\lstset{ |
47 |
|
basicstyle=\ttfamily\small\color{Blue}, |
48 |
|
keywordstyle=\bfseries\color{Purple}, |
49 |
|
commentstyle=\itshape\color{Red}} |
50 |
|
\lstdefinelanguage{Diderot}{% |
51 |
|
morekeywords={real,% |
52 |
|
else,for,if,int,return,% |
53 |
|
actor,image,die,field,in,inf,initially,input,kernel,new,output,stabilize,tensor,update,vec2,vec3,vec4},% |
54 |
|
morendkeywords={D}, |
55 |
|
otherkeywords={|,@,..,\#}, |
56 |
|
sensitive,% |
57 |
|
morecomment=[s]{/*}{*/},% |
58 |
|
morecomment=[l]//,% nonstandard |
59 |
|
morestring=[b]",% |
60 |
|
morestring=[b]'}% |
61 |
|
|
62 |
|
\lstset{ |
63 |
|
language=Diderot |
64 |
|
} |
65 |
|
|
66 |
\newcommand{\appref}[1]{Appendix~\ref{#1}} |
\newcommand{\appref}[1]{Appendix~\ref{#1}} |
67 |
\newcommand{\chapref}[1]{Chapter~\ref{#1}} |
\newcommand{\chapref}[1]{Chapter~\ref{#1}} |
68 |
\newcommand{\secref}[1]{Section~\ref{#1}} |
\newcommand{\secref}[1]{Section~\ref{#1}} |
85 |
% font commands |
% font commands |
86 |
\providecommand{\bftt}[1]{{\ttfamily\bfseries{}#1}} |
\providecommand{\bftt}[1]{{\ttfamily\bfseries{}#1}} |
87 |
\providecommand{\ittt}[1]{{\ttfamily\itshape{}#1}} |
\providecommand{\ittt}[1]{{\ttfamily\itshape{}#1}} |
88 |
\providecommand{\kw}[1]{\bftt{#1}} |
\providecommand{\kw}[1]{\bftt{\color{Purple}#1}} |
89 |
\providecommand{\nt}[1]{{\rmfamily\itshape{#1}}} |
\providecommand{\nt}[1]{{\rmfamily\itshape{#1}}} |
90 |
\providecommand{\term}[1]{{\sffamily{#1}}} |
\providecommand{\term}[1]{{\sffamily{#1}}} |
91 |
\providecommand{\tyvar}[1]{#1} |
\providecommand{\tyvar}[1]{#1} |
114 |
|
|
115 |
% example code |
% example code |
116 |
%BEGIN LATEX |
%BEGIN LATEX |
117 |
\newenvironment{EXAMPLE}{\begin{centercode}}{\end{centercode}} |
\newenvironment{EXAMPLE}{\begin{quote}\begin{lstlisting}}{\end{lstlisting}\end{quote}} |
118 |
%END LATEX |
%END LATEX |
119 |
%HEVEA \newenvironment{EXAMPLE}{\begin{alltt}}{\end{alltt}} |
%HEVEA \newenvironment{EXAMPLE}{\begin{alltt}}{\end{alltt}} |
120 |
%HEVEA \usepackage{alltt} |
%HEVEA \usepackage{alltt} |