forked from ongardie/raft-pseudocode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpseudocode.tex
More file actions
57 lines (50 loc) · 1.33 KB
/
pseudocode.tex
File metadata and controls
57 lines (50 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
\documentclass[10pt,letterpaper,twocolumn]{article}
\usepackage{listings}
\usepackage{times}
\usepackage{xcolor}
\setlength{\textheight}{9.1in}
\setlength{\columnsep}{0.25in}
\setlength{\textwidth}{6.6in}
\setlength{\topmargin}{0.0in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\newcommand\codetitlec[1]{%
\colorbox{black}{%
\makebox[.975\textwidth][l]{%
\color{white}%
\textbf{\footnotesize{ #1}}}%
}}%
\newcommand\codetitle[1]{\codetitlec{#1}\vspace{1ex}}%
\lstdefinestyle{custompy}{
language=Python,
basicstyle=\scriptsize\ttfamily,
belowcaptionskip=1\baselineskip,
breaklines=false,
commentstyle=\itshape\color{purple!40!black},
escapeinside={\#*}{*\#},
frame=single,
identifierstyle=\color{blue},
keywordstyle=\bfseries\color{green!40!black},
% deletekeywords={apply}, % wtf, doesn't work
morekeywords={*,on,reply,send,to,choose,foreach},
%numbers=left,
showstringspaces=false,
stringstyle=\color{orange},
xleftmargin=\parindent,
}
\begin{document}
\begin{figure*}
\vspace{-1cm}
\begin{minipage}[t]{.47\textwidth}
\lstinputlisting[style=custompy]{events.py}
\end{minipage}
\hfill
\begin{minipage}[t]{.47\textwidth}
\lstinputlisting[style=custompy]{rules.py}
\lstinputlisting[style=custompy]{state.py}
\end{minipage}
\caption{
alternative cheatsheet
}
\end{figure*}
\end{document}