git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #1695 from bjornbm/master
4ffa709John MacFarlane
src/Text/Pandoc/Writers/LaTeX.hs+3−1
@@ -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
751+ where
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
tests/writer.latex+1−1
@@ -734,7 +734,7 @@ These shouldn't be math:
734\begin{itemize}
734\begin{itemize}
735\itemsep1pt\parskip0pt\parsep0pt
735\itemsep1pt\parskip0pt\parsep0pt
736\item
736\item
737− To get the famous equation, write \texttt{\$e = mc\^{}2\$}.
737+ To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}.
738\item
738\item
739 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is
739 \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is
740 emphasized.)
740 emphasized.)