SwitchHats Wiki
Status: Planning
Brought to you by:
vo1stv
This wiki page contains a MikTeX document demonstrating how to include a scala program into a TeX document using the lstlistings package.
The following code should be saved to src/abortApp.tex. It expects to find the file [abortApp.scala] in the relative path ../src/console.
\documentclass[12pt]{letter}
\usepackage{listings}
\usepackage{verbatim}
\lstloadlanguages{Java}
\begin{document}
\lstdefinelanguage{scala}{
morekeywords={ object ,def, override}
}
\lstset {
stringstyle=\ttfamily, % typewriter type for strings
showstringspaces=false,
keepspaces=false,
columns=spaceflexible,
breakatwhitespace,
breaklines,
language=Java,
alsolanguage=scala,
morecomment=[il]{///}
}
\input{../src/console/abortApp.scala}
\end{document}