1 : |
jhr |
233 |
%!TEX root = paper.tex
|
2 : |
|
|
%
|
3 : |
|
|
% various LaTeX macros
|
4 : |
|
|
%
|
5 : |
|
|
|
6 : |
|
|
\usepackage{times}
|
7 : |
|
|
%-------------------------
|
8 : |
|
|
% the following magic makes the tt font in math mode be the same as the
|
9 : |
|
|
% normal tt font (i.e., Courier)
|
10 : |
|
|
%
|
11 : |
jhr |
380 |
\SetMathAlphabet{\mathtt}{normal}{OT1}{pcr}{m}{n}
|
12 : |
jhr |
233 |
\SetMathAlphabet{\mathtt}{bold}{OT1}{pcr}{bx}{n}
|
13 : |
|
|
%-------------------------
|
14 : |
|
|
|
15 : |
|
|
\usepackage{url}
|
16 : |
|
|
\usepackage{graphicx}
|
17 : |
jhr |
318 |
\usepackage{color}
|
18 : |
jhr |
233 |
\usepackage{amsmath}
|
19 : |
jhr |
318 |
\usepackage{stmaryrd}
|
20 : |
jhr |
233 |
|
21 : |
jhr |
318 |
\definecolor{Red}{rgb}{0.9,0.0,0.0}
|
22 : |
|
|
\definecolor{Green}{rgb}{0.0,0.4,0.0}
|
23 : |
|
|
\definecolor{Blue}{rgb}{0.0,0.0,0.9}
|
24 : |
|
|
\definecolor{Purple}{rgb}{0.5,0.0,0.4}
|
25 : |
|
|
\definecolor{Black}{rgb}{0.0,0.0,0.0}
|
26 : |
|
|
\definecolor{Yellow}{rgb}{1.0,1.0, 0.25}
|
27 : |
|
|
\definecolor{Cyan}{rgb}{0.25,1.0, 1.0}
|
28 : |
|
|
|
29 : |
|
|
% Diderot listings
|
30 : |
|
|
%
|
31 : |
|
|
\usepackage{listings}
|
32 : |
|
|
\lstset{
|
33 : |
|
|
basicstyle=\ttfamily\small\color{Blue},
|
34 : |
|
|
keywordstyle=\bfseries\color{Purple},
|
35 : |
|
|
commentstyle=\itshape\color{Red}}
|
36 : |
|
|
\lstdefinelanguage{Diderot}{%
|
37 : |
|
|
morekeywords={real,%
|
38 : |
|
|
else,for,if,int,return,%
|
39 : |
|
|
actor,image,die,field,in,inf,initially,input,kernel,new,output,stabilize,tensor,update,vec2,vec3,vec4},%
|
40 : |
|
|
morendkeywords={D},
|
41 : |
|
|
otherkeywords={|,@,..,\#},
|
42 : |
|
|
sensitive,%
|
43 : |
|
|
morecomment=[s]{/*}{*/},%
|
44 : |
|
|
morecomment=[l]//,% nonstandard
|
45 : |
|
|
morestring=[b]",%
|
46 : |
|
|
morestring=[b]'}%
|
47 : |
|
|
|
48 : |
|
|
\lstset{
|
49 : |
|
|
language=Diderot
|
50 : |
|
|
}
|
51 : |
|
|
|
52 : |
jhr |
233 |
% GLK added ________________
|
53 : |
|
|
% http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode
|
54 : |
|
|
% http://www.tex.ac.uk/tex-archive/macros/latex/contrib/algorithms/algorithms.pdf
|
55 : |
|
|
\usepackage{subfigure}
|
56 : |
|
|
\usepackage{algorithm}
|
57 : |
|
|
\usepackage{algorithmic}
|
58 : |
|
|
\usepackage{eqparbox}
|
59 : |
|
|
% http://stackoverflow.com/questions/1744197/formatting-comments-in-latexs-algorithmic-environment
|
60 : |
|
|
\renewcommand{\algorithmiccomment}[1]{\hfill\eqparbox{COMMENT}{// #1}}
|
61 : |
|
|
%\usepackage{epsfig}
|
62 : |
|
|
\usepackage{amsfonts}
|
63 : |
|
|
\usepackage{bm}
|
64 : |
|
|
\newcommand{\8}{\!\boldsymbol{:}\!}
|
65 : |
|
|
\newlength{\hackwidth}
|
66 : |
|
|
\setlength{\hackwidth}{0.8\columnwidth}
|
67 : |
|
|
% GLK added ^^^^^^^^^^^^^^^^
|
68 : |
|
|
|
69 : |
|
|
\newcommand{\kw}[1]{\texttt{\textbf{#1}}}
|
70 : |
|
|
|
71 : |
|
|
% the language is named after the inventor of modern art criticism.
|
72 : |
|
|
%
|
73 : |
|
|
\newcommand{\lang}{\textbf{Diderot}}
|
74 : |
|
|
|
75 : |
|
|
\newcommand{\NOTE}[1]{%
|
76 : |
|
|
\par\leavevmode\noindent\textbf{[[ #1 ]]}\par\leavevmode\noindent}
|
77 : |
|
|
\newcommand{\CUT}[1]{}
|
78 : |
|
|
\newcommand{\SIDENOTE}[1]{%
|
79 : |
|
|
\marginpar{\tiny\raggedright{#1}}}
|
80 : |
|
|
|
81 : |
|
|
\newcommand{\appref}[1]{Appendix~\ref{#1}}
|
82 : |
|
|
\newcommand{\chapref}[1]{Chapter~\ref{#1}}
|
83 : |
|
|
\newcommand{\secref}[1]{Section~\ref{#1}}
|
84 : |
|
|
\newcommand{\tblref}[1]{Table~\ref{#1}}
|
85 : |
|
|
\newcommand{\figref}[1]{Figure~\ref{#1}}
|
86 : |
|
|
\newcommand{\listingref}[1]{Listing~\ref{#1}}
|
87 : |
|
|
\newcommand{\pref}[1]{{page~\pageref{#1}}}
|
88 : |
|
|
\newcommand{\defref}[1]{Definition~\ref{#1}}
|
89 : |
|
|
\newcommand{\ruleref}[1]{Rule~\ref{#1}}
|
90 : |
|
|
|
91 : |
|
|
\newcommand{\eg}{{\em e.g.}}
|
92 : |
|
|
\newcommand{\cf}{{\em cf.}}
|
93 : |
|
|
\newcommand{\ie}{{\em i.e.}}
|
94 : |
|
|
\newcommand{\etc}{{\em etc.\/}}
|
95 : |
|
|
\newcommand{\naive}{na\"{\i}ve}
|
96 : |
|
|
\newcommand{\ala}{{\em \`{a} la\/}}
|
97 : |
|
|
\newcommand{\etal}{{\em et al.\/}}
|
98 : |
|
|
\newcommand{\role}{r\^{o}le}
|
99 : |
|
|
\newcommand{\vs}{{\em vs.}}
|
100 : |
|
|
\newcommand{\forte}{{fort\'{e}\/}}
|