diff options
author | ax006ho <j.hoffmann@fh-aachen.de> | 2018-11-06 10:22:38 +0100 |
---|---|---|
committer | ax006ho <j.hoffmann@fh-aachen.de> | 2018-11-06 10:22:38 +0100 |
commit | 3d0c3e51f8f7903491e8de8a81448077e76df0fa (patch) | |
tree | 446a4857fbebd5d6beea66430085718c13c837b5 | |
parent | 493bae4e7437ae28ed881030e8005323ae561b27 (diff) | |
download | listings-3d0c3e51f8f7903491e8de8a81448077e76df0fa.tar.gz listings-3d0c3e51f8f7903491e8de8a81448077e76df0fa.tar.bz2 |
new definition for hansl keywords, added preferences for hansl
-rw-r--r-- | lstdrvrs.dtx | 201 |
1 files changed, 117 insertions, 84 deletions
diff --git a/lstdrvrs.dtx b/lstdrvrs.dtx index 08fce7a..5dfc983 100644 --- a/lstdrvrs.dtx +++ b/lstdrvrs.dtx @@ -105,6 +105,7 @@ \file{listings-acm.prf}{\from{lstdrvrs.dtx}{acm-prf}} \file{listings-bash.prf}{\from{lstdrvrs.dtx}{bash-prf}} \file{listings-fortran.prf}{\from{lstdrvrs.dtx}{fortran-prf}} + \file{listings-hansl.prf}{\from{lstdrvrs.dtx}{hansl-prf}} \file{listings-lua.prf}{\from{lstdrvrs.dtx}{lua-prf}} \file{listings-python.prf}{\from{lstdrvrs.dtx}{python-prf}} } @@ -175,6 +176,7 @@ %<+acm-prf>\ProvidesFile{listings-acm.prf} %<+bash-prf>\ProvidesFile{listings-bash.prf} %<+fortran-prf>\ProvidesFile{listings-fortran.prf} +%<+hansl-prf>\ProvidesFile{listings-hansl.prf} %<+lua-prf>\ProvidesFile{listings-lua.prf} %<+python-prf>\ProvidesFile{listings-python.prf} %<-config> [2018/09/02 1.7 listings language file] @@ -2078,100 +2080,95 @@ morecomment=[l]!% % \subsection{Hansl/Gretl} % % Thanks to \lstthanks{Ignacio -% D\'{i}az-Emparanza}{ignacio.diaz-emparanza@ehu.es}{2013/10/24} for providing -% the definition of hansl. Hansl is the gretl scripting language (see -% \url{http://gretl.sourceforge.net}). -% \begingroup +% D\'{i}az-Emparanza}{ignacio.diaz-emparanza@ehu.es}{2013/10/24} and +% \lstthanks{Riccardo (Jack) Lucchetti}{r.lucchetti@univpm.it}{2018/11/03} +% for providing the definition of hansl. Hansl is the gretl scripting +% language (see \url{http://gretl.sourceforge.net}).% +% \begingroup% % \begin{macrocode} %<*lang2> % \end{macrocode} % \begin{macrocode} -%% -%% http://gretl.sourceforge.net/gretl-help/cmdref.html -%% (c) 2013 Ignacio D\'iaz-Emparanza -%% \lst@definelanguage{hansl}{% - % $-variables are internal functions in hansl - keywordsprefix ={\$}, + showstringspaces = false, % morekeywords={ % hansl commands: - add,adf,anova,append,ar,ar1,% - arbond,arch,arima,biprobit,boxplot,break,% - catch,chow,clear,coeffsum,coint,coint2,% - corr,corrgm,cusum,data,dataset,debug,% - delete,diff,difftest,discrete,dpanel,dummify,% - duration,elif,else,end,endif,endloop,% - eqnprint,equation,estimate,fcast,foreign,fractint,% - freq,function,garch,genr,gmm,gnuplot,% - graphpg,hausman,heckit,help,hsk,hurst,% - if,include,info,intreg,join,kalman,% - kpss,labels,lad,lags,ldiff,leverage,% - levinlin,logistic,logit,logs,loop,mahal,% - makepkg,markers,meantest,mle,modeltab,modprint,% - modtest,mpols,negbin,nls,normtest,nulldata,% - ols,omit,open,orthdev,outfile,panel,% - pca,pergm,poisson,print,printf,probit,% - pvalue,qlrtest,qqplot,quantreg,quit,rename,% - reset,restrict,rmplot,run,runs,scatters,% - sdiff,set,setinfo,setobs,setmiss,shell,% - smpl,spearman,sprintf,square,sscanf,store,% - summary,system,tabprint,textplot,tobit,tsls,% - var,varlist,vartest,vecm,vif,wls,% - xcorrgm,xtab,scalar,series,matrix,string},% - morekeywords=[2]{ % Functions - abs,acos,acosh,aggregate,argname,% - asin,asinh,atan,atanh,atof,% - bessel,BFGSmax,bkfilt,boxcox,bwfilt,% - cdemean,cdf,cdiv,ceil,cholesky,% - chowlin,cmult,cnorm,colname,colnames,% - cols,corr,corrgm,cos,cosh,% - cov,critical,cum,deseas,det,% - diag,diagcat,diff,digamma,dnorm,% - dsort,dummify,eigengen,eigensym,eigsolve,% - epochday,errmsg,exp,fcstats,fdjac,% - fft,ffti,filter,firstobs,fixname,% - floor,fracdiff,gammafun,getenv,getline,% - ghk,gini,ginv,halton,hdprod,% - hpfilt,I,imaxc,imaxr,imhof,% - iminc,iminr,inbundle,infnorm,inlist,% - int,inv,invcdf,invmills,invpd,% - irf,irr,isconst,isnan,isnull,% - isodate,iwishart,kdensity,kfilter,ksimul,% - ksmooth,kurtosis,lags,lastobs,ldet,% - ldiff,lincomb,ljungbox,lngamma,log,% - log10,log2,loess,logistic,lower,% - lrvar,max,maxc,maxr,mcorr,% - mcov,mcovg,mean,meanc,meanr,% - median,mexp,min,minc,minr,% - missing,misszero,mlag,mnormal,mols,% - monthlen,movavg,mpols,mrandgen,mread,% - mreverse,mrls,mshape,msortby,muniform,% - mwrite,mxtab,nadarwat,nelem,ngetenv,% - nobs,normal,npv,NRmax,nullspace,% - obs,obslabel,obsnum,ok,onenorm,% - ones,orthdev,pdf,pergm,pmax,% - pmean,pmin,pnobs,polroots,polyfit,% - princomp,prodc,prodr,psd,psdroot,% - pshrink,psum,pvalue,pxsum,qform,% - qnorm,qrdecomp,quadtable,quantile,randgen,% - randgen1,randint,rank,ranking,rcond,% - readfile,regsub,remove,replace,resample,% - round,rownames,rows,sd,sdc,% - sdiff,selifc,selifr,seq,setnote,% - simann,sin,sinh,skewness,sort,% - sortby,sqrt,sscanf,sst,strlen,% - strncmp,strsplit,strstr,strstrip,strsub,% - sum,sumall,sumc,sumr,svd,% - tan,tanh,toepsolv,tolower,toupper,% - tr,transp,trimr,typestr,uniform,% - uniq,unvech,upper,urcpval,values,% - var,varname,varnum,varsimul,vec,% - vech,weekday,wmean,wsd,wvar,% - xmax,xmin,xpx,zeromiss,zeros,% + add, adf, anova, append, ar, ar1, arbond, arch, arima, biprobit, break,% + boxplot, chow, clear, coeffsum, coint, coint2, corr, corrgm, cusum,% + data, dataset, delete, diff, difftest, discrete, dpanel, dummify,% + duration, elif, else, end, endif, endloop, eqnprint, equation,% + estimate, eval, fcast, flush, foreign, fractint, freq, function,% + funcerr, garch, genr, gmm, gnuplot, graphpg, hausman, heckit, help,% + hfplot, hsk, hurst, if, include, info, intreg, join, kpss, labels, lad,% + lags, ldiff, leverage, levinlin, logistic, logit, logs, loop, mahal,% + makepkg, markers, meantest, midasreg, mle, modeltab, modprint, modtest,% + mpi, mpols, negbin, nls, normtest, nulldata, ols, omit, open, orthdev,% + outfile, panel, pca, pergm, plot, poisson, print, printf, probit,% + pvalue, quantreg, qlrtest, qqplot, quit, rename, reset, restrict,% + rmplot, run, runs, scatters, sdiff, set, setinfo, setobs, setopt,% + setmiss, shell, smpl, spearman, sprintf, square, sscanf, store,% + summary, system, tabprint, textplot, tobit, tsls, var, varlist,% + vartest, vecm, vif, wls, xcorrgm, xtab, debug, return, catch, pkg,% + arma, deriv, params, hessian, for, foreach, while, const},% + morekeywords=[2]{ % accessors: + \$nobs, \$nvars, \$pd, \$t1, \$t2, \$tmax, \$datatype, \$test,% + \$pvalue, \$qlrbreak, \$rlnl, \$stopwatch, \$unit, \$obsmajor,% + \$obsminor, \$obsmicro, \$obsdate, \$windows, \$version, \$error,% + \$seed, \$huge, \$ess, \$T, \$rsq, \$sigma, \$df, \$ncoeff, \$lnl,% + \$gmmcrit, \$aic, \$bic, \$hqc, \$trsq, \$dw, \$dwpval, \$Fstat,% + \$chisq, \$diagtest, \$diagpval, \$pmanteau, \$uhat, \$yhat, \$llt,% + \$ahat, \$sample, \$h, \$coeff, \$stderr, \$vcv, \$rho, \$compan,% + \$xtxinv, \$vecGamma, \$vma, \$fevd, \$evals, \$jalpha, \$jbeta,% + \$jvbeta, \$s00, \$s11, \$s01, \$ec, \$hausman, \$sargan, \$sysGamma,% + \$sysA, \$sysB, \$fcast, \$fcse, \$coeff_ci, \$ehat, \$mnlprobs,% + \$xlist, \$ylist, \$command, \$depvar, \$model, \$system, \$sysinfo},% + morekeywords=[3]{ % functions + BFGScmax, BFGSmax, GSSmax, I, NMmax, NRmax, abs, acos, acosh,% + aggregate, argname, array, asin, asinh, atan, atanh, atof, bessel,% + bkfilt, bootci, bootpval, boxcox, bread, bwfilt, bwrite, cdemean, cdf,% + cdiv, cdummify, ceil, cholesky, chowlin, cmult, cnameget, cnameset,% + cnorm, cnumber, cols, corr, corrgm, cos, cosh, cov, critical, cum,% + curl, dayspan, defarray, defbundle, deflist, deseas, det, diag,% + diagcat, diff, digamma, dnorm, dropcoll, dsort, dummify, easterday,% + ecdf, eigengen, eigensym, eigsolve, epochday, errmsg, exists, exp,% + fcstats, fdjac, feval, fevd, fft, ffti, filter, firstobs, fixname,% + floor, fracdiff, fraclag, freq, gammafun, genseries, getenv, getinfo,% + getkeys, getline, ghk, gini, ginv, grab, halton, hdprod, hfdiff,% + hflags, hfldiff, hflist, hpfilt, imaxc, imaxr, imhof, iminc, iminr,% + inbundle, infnorm, inlist, instring, int, inv, invcdf, invmills, invpd,% + irf, irr, isconst, isdiscrete, isdummy, isnan, isoconv, isodate,% + iwishart, jsonget, jsongetb, juldate, kdensity, kdsmooth, kfilter,% + kmeier, kpsscrit, ksetup, ksimdata, ksimul, ksmooth, kurtosis, lags,% + lastobs, ldet, ldiff, lincomb, linearize, ljungbox, lngamma, loess,% + log, log10, log2, logistic, lower, lrcovar, lrvar, max, maxc, maxr,% + mcorr, mcov, mcovg, mean, meanc, meanr, median, mexp, mgradient, min,% + minc, minr, missing, misszero, mlag, mlincomb, mnormal, mols, monthlen,% + movavg, mpiallred, mpibcast, mpirecv, mpireduce, mpiscatter, mpisend,% + mpols, mrandgen, mread, mreverse, mrls, mshape, msortby, muniform,% + mweights, mwrite, mxtab, naalen, nadarwat, nelem, ngetenv, nlines,% + nobs, normal, normtest, npcorr, npv, nullspace, numhess, obslabel,% + obsnum, ok, onenorm, ones, orthdev, pdf, pergm, pexpand, pmax, pmean,% + pmin, pnobs, polroots, polyfit, princomp, printf, prodc, prodr, psd,% + psdroot, pshrink, psum, pvalue, pxnobs, pxsum, qform, qlrpval, qnorm,% + qrdecomp, quadtable, quantile, randgen, randgen1, randint, rank,% + ranking, rcond, readfile, regsub, remove, replace, resample, rnameget,% + rnameset, round, rows, sd, sdc, sdiff, seasonals, selifc, selifr, seq,% + setnote, simann, sin, sinh, skewness, sleep, smplspan, sort, sortby,% + sprintf, sqrt, square, sscanf, sst, stringify, strlen, strncmp,% + strsplit, strstr, strstrip, strsub, strvals, substr, sum, sumall, sumc,% + sumr, svd, svm, tan, tanh, toepsolv, tolower, toupper, tr, transp,% + trimr, typeof, typestr, uniform, uniq, unvech, upper, urcpval, values,% + var, varname, varnames, varnum, varsimul, vec, vech, weekday, wmean,% + wsd, wvar, xmax, xmin, xmlget, zeromiss, zeros, NMmin, GSSmin,% + BFGScmin, BFGSmin },% + morekeywords=[4]{ % genr aliases: + null, series, scalar, matrix, string, list, bundle, strings, matrices,% + bundles, lists% },% sensitive=t,% morecomment=[l]{\#},% morecomment=[s]{/*}{*/},% - morestring=[b]{"}}% + morestring=[b]{"}% +}% \lstalias{gretl}{hansl} % \end{macrocode} % \begin{macrocode} @@ -2179,6 +2176,42 @@ morecomment=[l]!% % \end{macrocode} % \endgroup % +% \begingroup% +% The developers of the hansl support also supplied a definition of a style +% for printing hansl code: +% \begin{macrocode} +%<*hansl-prf> +% \end{macrocode} +% \begin{macrocode} +\usepackage[rgb, x11names]{xcolor} + +% settings for black and white +\lstdefinestyle{hanslbw}{% + keywordstyle = \bfseries, + keywordstyle = [2]\bfseries, + keywordstyle = [3]\itshape, + keywordstyle = [4]\underbar, + commentstyle = \ttfamily, + stringstyle = \ttfamily +} +% settings for colored printing +\lstdefinestyle{hanslcolor}{% + basicstyle = \small\ttfamily, + keywordstyle = \color{red}, + keywordstyle = [2]\color{green}, + keywordstyle = [3]\color{cyan}, + keywordstyle = [4]\color{olive}, + commentstyle = \color{blue}\rmfamily, % + stringstyle = \color{magenta}, + moredelim = [l][\color{green}]{--} +}% +% \end{macrocode} +% This code is provided in the file |listings-hansl.prf|, see section +% 2.4.1 (Preferences) of the \packagename{listings} documentation. +% \begin{macrocode} +%</hansl-prf> +% \end{macrocode} +% \endgroup % % \subsection{Haskell} % |