After getting latex to format my code nicely I noticed that it did not have build in support for C#, which read of the manual and knocked one up. Share and Enjoy
\lstdefinelanguage{cs}
{morekeywords={abstract,event,new,struct,as,explicit,null,switch
base,extern,object,this,bool,false,operator,throw,
break,finally,out,true,byte,fixed,override,try,
case,float,params,typeof,catch,for,private,uint,
char,foreach,protected,ulong,checked,goto,public,unchecked,
class,if,readonly,unsafe,const,implicit,ref,ushort,
continue,in,return,using,decimal,int,sbyte,virtual,
default,interface,sealed,volatile,delegate,internal,short,void,
do,is,sizeof,while,double,lock,stackalloc,
else,long,static,enum,namespace,string, },
sensitive=false,
morecomment=[l]{//},
morecomment=[s]{/*}{*/},
morestring=[b]",
}
Usage
\lstinputlisting[language=cs]{test-class.cs}
Markus 5:44 am on October 6, 2009 Permalink |
This is exactly what I needed! Thank you very much!!!
Matthew Leingang 5:04 am on February 19, 2010 Permalink |
What Markus said.
You should be able to avoid the temp file with a pipe, viz:
svn log –xml $1 | xsltproc svnlog.xslt > $2