[texhax] Curly brackets in alltt environment

Tom Backer Johnsen backer at psych.uib.no
Fri Jan 4 19:28:30 CET 2008

I am writing a text where I want to include some snippets of source 
code (actually R).  This means that I have to be able to include 
brackets of the {} type.

In the verbatim environment they are simply not printed.  When using 
the alltt package they can be printed by using \{ and \}, but then 
they look a little too large (the size of the tt font is set by 
\small) compared to the rest of the text.  A third alternative I have 
tried is to use the listings package, but that gives me a different 
font from the other snippets.

Any suggestions?


More information about the texhax mailing list