Created
August 13, 2013 19:10
-
-
Save eiriktsarpalis/6224587 to your computer and use it in GitHub Desktop.
LaTeX F# definition for Listings package
This file contains hidden or 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} | |
\usepackage{upquote} | |
\lstdefinelanguage{FSharp}% | |
{morekeywords={let, new, match, with, rec, open, module, namespace, type, of, member, % | |
and, for, while, true, false, in, do, begin, end, fun, function, return, yield, try, % | |
mutable, if, then, else, cloud, async, static, use, abstract, interface, inherit, finally }, | |
otherkeywords={ let!, return!, do!, yield!, use!, var, from, select, where, order, by }, | |
keywordstyle=\color{bluekeywords}, | |
sensitive=true, | |
basicstyle=\ttfamily, | |
breaklines=true, | |
xleftmargin=\parindent, | |
aboveskip=\bigskipamount, | |
tabsize=4, | |
morecomment=[l][\color{greencomments}]{///}, | |
morecomment=[l][\color{greencomments}]{//}, | |
morecomment=[s][\color{greencomments}]{{(*}{*)}}, | |
morestring=[b]", | |
showstringspaces=false, | |
literate={`}{\`}1, | |
stringstyle=\color{redstrings}, | |
} |
You can color types with
\definecolor{cyantypes}{rgb}{0.18,0.56,0.72}
and by adding
% new keyword colors
classoffset=1,
morekeywords={int, string, MyNewType},
keywordstyle=\color{cyantypes},
classoffset=0,
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
\usepackage{color}
\definecolor{bluekeywords}{rgb}{0.13,0.13,1}
\definecolor{greencomments}{rgb}{0,0.5,0}
\definecolor{redstrings}{rgb}{0.9,0,0}