
OK, so you've made a nice Uppaal model and now you want to publish it in your report with syntax highlighting.
I've been there, so here is how I do it with listings.sty package:
1) include a few packages
2) add Uppaal language description in preamble, I provide three styles: only font highlighting, color highlighting like in Uppaal GUI and color highlighting plus replacement of some keywords into math symbols.
3) include your Uppaal code kept in a external file or input directly into the same document
4) compile with latex or pdflatex, no preprocessing needed.
5) you can see the result in the picture of this entry.
I've put a self-contained PDF here, in case you want to see more examples and the LaTeX code used to achieve the syntax hilighting:
uppaal-listing.pdf
BTW, you can copy-paste code directly when using evince (not so with Acrobat Reader).
No comments:
Post a Comment