I would like to show some SAS code like in SAS Enterprise Guide:
The following is what I've got so far, but only the "string" is more or less like what I want.
Please take into account that I need this at work (eventually, I've found
an occasion to use LaTeX at work, yay!), hence I can't install anything
on my computer, I can use only Overleaf, ShareLaTeX or Verbosus.
\documentclass[a4paper,12pt, twoside]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage[top=1.5in,bottom=1in,right=1in,left=1.3in,headheight=65pt,headsep=1cm]{geometry}
\usepackage{xcolor}
\usepackage{listings}
\lstset{language=SAS,
breaklines=true,
basicstyle=\ttfamily\bfseries,
columns=fixed,
keepspaces=true,
identifierstyle=\color{blue}\ttfamily,
keywordstyle=\color{cyan}\ttfamily,
stringstyle=\color{purple}\ttfamily,
commentstyle=\color{green}\ttfamily,
}
\begin{document}
\begin{lstlisting}
/* librerie */
libname mylib '/mydir/mysubdir';
/* ordinamento */
proc sort data=mylib.myfile out=myfilesorted nodupkey;
by mykey;
run;
* data myfile2; /* istruzione commentata */
data myfilejoinsanother;
merge myfilesorted (in=my)
anotherfile (in=theother rename=(myfield=mykey));
by mykey;
if my;
run;
\end{lstlisting}
\end{document}
Best Answer
A partial solution: You could use
minted
. It has asas
lexer and you can use a style likeborland
orvs
that nearly resembles your need.