better latex rendering of tt curly braces and backslash

svn: r13665

original commit: 839bc78f4ba9af1ecf9f978f5ba8f3196da06264
This commit is contained in:
Matthew Flatt 2009-02-16 15:59:39 +00:00
parent 904826dc7d
commit d166f0969c

View File

@ -371,7 +371,9 @@
(let ([c (string-ref s i)])
(display
(case c
[(#\\) "$\\backslash$"]
[(#\\) (if (rendering-tt)
"{\\char`\\\\}"
"$\\backslash$")]
[(#\_) "$\\_$"]
[(#\^) "{\\char'136}"]
[(#\>) (if (rendering-tt) "{\\texttt >}" "$>$")]
@ -380,7 +382,10 @@
[(#\? #\! #\. #\:)
(if (rendering-tt) (format "{\\hbox{\\texttt{~a}}}" c) c)]
[(#\~) "$\\sim$"]
[(#\{ #\} #\# #\% #\& #\$) (format "\\~a" c)]
[(#\{ #\}) (if (rendering-tt)
(format "{\\char`\\~a}" c)
(format "\\~a" c))]
[(#\# #\% #\& #\$) (format "\\~a" c)]
[(#\uA0) "~"]
[(#\uDF) "{\\ss}"]
[(#\u039A) "K"] ; kappa