%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Listings test with hansl \author{Sven Schreiber} \documentclass{scrbook} \usepackage{xcolor} \usepackage{listings} \lstset{language = hansl, % showstringspaces = false, % basicstyle = \footnotesize\ttfamily, keywordstyle = \color{red}, keywordstyle = [2]\color{blue}, commentstyle = \color{darkgray}\sffamily, % stringstyle = \color{orange}, % backgroundcolor=\color{lightgray}, % These commands partly sorted by meaning: morekeywords = {list, bundle, % matrices, strings, bundles, lists, % funcerr, hfplot, launch, midasreg, % pkg, plot, setopt, % deriv, params, % }, morekeywords = [2]{array, defarray, null, % BFGSmin, BFGScmax, BFGScmin, % bread, bwrite, cdummify, cnumber, % cnameget, cnameset, dropcoll, % easterday, ecdf, exists, fevd, genseries, % getinfo, getkeys, GSSmax, GSSmin, % hfdiff, hfldiff, hflags, hflist, instring, % isdiscrete, isdummy, isoconv, isodate, % jsonget, jsongetb, juldate, kdsmooth, % kmeier, kpsscrit, ksetup, linearize, % lrcovar, mgradient, mlincomb, mweights, % naalen, nlines, NMmax, NMmin, % normtest, npcorr, NRmin, numhess, % pexpand, pxnobs, qlrpval, % rnameget, rnameset, % seasonals, sleep, smplspan, sprintf, % square, stringify, strvals, substr, % typeof, varnames, xmlget}, % the following for the double-dash options: moredelim = [l][\color{green}]{--}, % obsolete former functions: deletekeywords = [2]{isnull, rowname, rownames, % colname, colnames, xpx }, % and obsolete former commands: deletekeywords = {kalman, shell, sscanf}, } \begin{document} \begin{lstlisting} series x = log(y) list L = null bundle b = null strings S = array(1) S[1] = "hello" matrices b.x = defarray(3) mle deriv x = 0.5 end mle --auxiliary # check if really not used anymore: kalman end kalman if isnull(x) endif # function or command? sscanf() \end{lstlisting} \end{document}