commit 2c0f9c948021e9b3787ff54cee92ba08701cf332
parent a9cb0003eca5fbc6605ed3fff6ba6c804bf09260
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Sun, 29 Apr 2012 10:36:13 -0600
scribble: for Latex, pick tt encoding of <, >, and | explicitly
original commit: 393a1f441ac1cab46000c72ea0901c3adac163e2
Diffstat:
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/collects/scribble/latex-render.rkt b/collects/scribble/latex-render.rkt
@@ -745,9 +745,9 @@
"{\\char`\\_}"
"$\\_$")]
[(#\^) "{\\char'136}"]
- [(#\>) (if (rendering-tt) "{\\texttt >}" "$>$")]
- [(#\<) (if (rendering-tt) "{\\texttt <}" "$<$")]
- [(#\|) (if (rendering-tt) "{\\texttt |}" "$|$")]
+ [(#\>) (if (rendering-tt) "{\\Stttextmore}" "$>$")]
+ [(#\<) (if (rendering-tt) "{\\Stttextless}" "$<$")]
+ [(#\|) (if (rendering-tt) "{\\Stttextbar}" "$|$")]
[(#\-) "{-}"] ;; avoid en- or em-dash
[(#\`) "{`}"] ;; avoid double-quotes
[(#\') "{'}"] ;; avoid double-quotes
diff --git a/collects/scribble/scribble.tex b/collects/scribble/scribble.tex
@@ -54,6 +54,12 @@
\newcommand{\planetName}[1]{PLane\hspace{-0.1ex}T}
\newcommand{\slant}[1]{{\textsl{#1}}}
+% Used for <, >, and | in tt mode. For some fonts and installations,
+% there seems to be an encoding issue, so pick T1 explicitly:
+\newcommand{\Stttextmore}{{\fontencoding{T1}\selectfont>}}
+\newcommand{\Stttextless}{{\fontencoding{T1}\selectfont<}}
+\newcommand{\Stttextbar}{{\fontencoding{T1}\selectfont|}}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Tables