-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlistingconfig.tex
More file actions
64 lines (64 loc) · 2.24 KB
/
listingconfig.tex
File metadata and controls
64 lines (64 loc) · 2.24 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
58
59
60
61
62
63
64
\usepackage{listings}
\lstdefinelanguage{myC}{
language=C,
basicstyle=\ttfamily\singlespacing,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2, % sets default tabsize to 2 spaces
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false,
escapeinside={\%*}{*)},
keywordstyle=\bfseries\color{black}, % keyword style
numberstyle=\tiny\color{gray},
% numbers=left,
% frame=single, % adds a frame around the code
% rulecolor=\color{black},
% stepnumber=1,
% numbersep=5pt,
% backgroundcolor=\color{white},
% commentstyle=\color{dkgreen}, % comment style
% stringstyle=\color{mauve}, % string literal style
}
% A version of the above myC, but without singlespacing
\lstdefinelanguage{myinlineC}{
language=myC,
basicstyle=\ttfamily
}
\renewcommand{\ttdefault}{pcr} % enables bold monospaced font
\lstdefinelanguage[x86gasm]{Assembler}[x86masm]{Assembler}{%
,basicstyle=\ttfamily\singlespacing
,morekeywords={rax,rbx,rcx,rdx,rip,rdi,rsi,rsp,subq,decl,movq
,movl,xorl,imull,popq,popl,pushl}%
,morekeywords=[2]{.file,.section,.string,.text,.globl,.cfi_startproc
,.cfi_def_cfa_offset,.cfi_endproc,.size,.ident}%
}
\lstdefinelanguage{Coq}{
,morekeywords={match,end,Definition,Inductive,Lemma,Theorem,Record,
Variable,Hypothesis,Section,End,case,of,if,then,else,Let,
is,let,in,do,return,with,Extract,Constant,Inlined,Inline,
Extraction,Fixpoint,Program,Function,Fix,type,Class,for,Module}%
,keywordstyle=\bfseries\color{MidnightBlue}
,basicstyle=\sffamily
,columns=fullflexible
,numberstyle=\tiny\color{gray}
%,escapeinside={@}{@}
,literate=
{<-}{{$\leftarrow\;$}}1
{=>}{{$\Rightarrow\;$}}1
{->}{{$\rightarrow\;$}}1
{<->}{{$\leftrightarrow\;$}}1
{<==}{{$\leq\;$}}1
{\\/}{{$\vee\;$}}1
{/\\}{{$\land\;$}}1
{fun\ }{{$\lambda$\ }}1
{forall}{{$\forall$}}1
{exists}{{$\exists$}}1
{Z}{{$\mathbb{Z}$}}1
{Z0}{{$\mathbb{Z}_0$}}1
{<=}{{$\leq\;$}}1
{>=}{{$\geq\;$}}1
{<>}{{$\neq\;$}}1
{Q}{{$\mathbb{Q}$}}1
}