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