@@ -746,8 +746,10 @@ inlineToLaTeX (Code (_,classes,_) str) = do
746 Nothing -> rawCode
746 Nothing -> rawCode
747 Just h -> modify (\st -> st{ stHighlighting = True }) >>
747 Just h -> modify (\st -> st{ stHighlighting = True }) >>
748 return (text h)
748 return (text h)
749− rawCode = liftM (text . (\s -> "\\texttt{" ++ s ++ "}"))
749+ rawCode = liftM (text . (\s -> "\\texttt{" ++ escapeSpaces s ++ "}"))
750 $ stringToLaTeX CodeString str
750 $ stringToLaTeX CodeString str
752+ escapeSpaces = concatMap (\c -> if c == ' ' then "\\ " else [c])
751inlineToLaTeX (Quoted qt lst) = do
753inlineToLaTeX (Quoted qt lst) = do
752 contents <- inlineListToLaTeX lst
754 contents <- inlineListToLaTeX lst
753 csquotes <- liftM stCsquotes get
755 csquotes <- liftM stCsquotes get