Created
February 28, 2012 12:35
-
-
Save wataru420/1932286 to your computer and use it in GitHub Desktop.
TeX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{jarticle} | |
\usepackage{scala} | |
\begin{document} | |
こんにちわ | |
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{listings} | |
% "define" Scala | |
\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}, | |
otherkeywords={=>,<-,<\%,<:,>:,\#,@}, | |
sensitive=true, | |
morecomment=[l]{//}, | |
morecomment=[n]{/*}{*/}, | |
morestring=[b]", | |
morestring=[b]', | |
morestring=[b]""" | |
} | |
\usepackage{color} | |
\definecolor{dkgreen}{rgb}{0,0.6,0} | |
\definecolor{gray}{rgb}{0.5,0.5,0.5} | |
\definecolor{mauve}{rgb}{0.58,0,0.82} | |
% Default settings for code listings | |
\lstset{frame=tb, | |
language=scala, | |
aboveskip=3mm, | |
belowskip=3mm, | |
showstringspaces=false, | |
columns=flexible, | |
basicstyle=\renewcommand{\baselinestretch}{0.95}\ttfamily, | |
numbers=none, | |
numberstyle=\tiny\color{gray}, | |
keywordstyle=\color{blue}, | |
commentstyle=\color{dkgreen}, | |
stringstyle=\color{mauve}, | |
frame=single, | |
breaklines=true, | |
breakatwhitespace=true | |
tabsize=3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{jarticle} | |
\usepackage{scala} | |
\begin{document} | |
こんにちわ | |
\begin{lstlisting} | |
val t = "hello" // a string | |
val x = 42 // an int | |
\end{lstlisting} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment