From 393a1f441ac1cab46000c72ea0901c3adac163e2 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 29 Apr 2012 10:36:13 -0600 Subject: [PATCH] scribble: for Latex, pick tt encoding of <, >, and | explicitly --- collects/scribble/latex-render.rkt | 6 +++--- collects/scribble/scribble.tex | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/collects/scribble/latex-render.rkt b/collects/scribble/latex-render.rkt index 9516cd2612..0ae9eb5682 100644 --- 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 index f6fe8ab8eb..7d766f7312 100644 --- 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