3d567d4802babb7d7cb8daa61d49766fc1352e82
[cc1516.git] / deliverables / report / spl.sty
1 \usepackage{listings}
2
3 \lstdefinelanguage{SPLCode}{%
4 alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_1234567890},
5 morekeywords={print,isEmpty,if,else,while},
6 sensitive=true,
7 morecomment=[l]{//},
8 morecomment=[n]{/*}{*/},
9 morestring=[b]",
10 morestring=[b]',
11 basicstyle=\small,
12 identifierstyle=\small\ttfamily,
13 commentstyle=\itshape,
14 keywordstyle=\bfseries,
15 stringstyle=\ttfamily,
16 showstringspaces=false,
17 basewidth=0.45em,
18 columns=[c]fixed,
19 keepspaces=true,
20 breaklines=true,
21 tabsize=4,
22 texcl=true,
23 }
24
25 \newcommand{\SPLInline}[1]{\lstinline[language=SPLCode]¦#1¦}
26 \newcommand{\SI}[1]{\SPLInline{#1}}
27
28 \lstdefinestyle{numbers}{numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=5pt}
29
30 \lstnewenvironment{SPLCode}{\lstset{language=SPLCode}}{}