-
Notifications
You must be signed in to change notification settings - Fork 0
/
listings_setting.tex
59 lines (54 loc) · 1.67 KB
/
listings_setting.tex
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
\newfontfamily\listingfont{Source Code Pro}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\makeatletter
\lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
\@empty\z@\@empty
\makeatother
% \lstinlineの後にはなぜか自動でスペースが入らないので、
% 手でスペースを入れるための処理を追加する
% (\passthroughコマンドはPandocが自動で追加する)
\providecommand{\passthrough}[1]{#1\hskip\ltjgetparameter{xkanjiskip}}
\lstset{
basicstyle=\listingfont\footnotesize,
frame=single,
breaklines=true
}
\lstdefinestyle{scala}{
breakatwhitespace=false,
language=scala,
numbers=left,
numberstyle=\listingfont\scriptsize\color{gray},
captionpos=b,
commentstyle=\listingfont\color{dkgreen},
extendedchars=true,
keepspaces=true,
keywordstyle=\listingfont\color{blue},
emphstyle=\listingfont\color{cyan},
rulecolor=\listingfont\color{black},
showspaces=false,
showstringspaces=false,
showtabs=false,
stringstyle=\listingfont\color{mauve},
tabsize=2,
title=\lstname
}
\lstdefinelanguage{scala}{
morekeywords={abstract,case,catch,class,def,%
do,else,extends,false,final,finally,%
for,if,implicit,import,match,mixin,%
new,null,object,override,package,%
private,protected,requires,return,sealed,%
super,this,throw,trait,true,try,%
type,val,var,while,with,yield},
moreemph={Byte,Short,Int,Long,Float,Double,Char,
String,Boolean,Unit,Null,Nothing,Any,AnyRef},
otherkeywords={=>,<-,<\%,<:,>:,\#,@},
sensitive=true,
morecomment=[l]{//},
morecomment=[n]{/*}{*/},
morestring=[b]",
morestring=[b]',
morestring=[b]"""
}