mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-26 17:35:49 +00:00
Escape spaces. Fixes jgm/pandoc#1694.
This commit is contained in:
@@ -746,8 +746,10 @@ inlineToLaTeX (Code (_,classes,_) str) = do
|
||||
Nothing -> rawCode
|
||||
Just h -> modify (\st -> st{ stHighlighting = True }) >>
|
||||
return (text h)
|
||||
rawCode = liftM (text . (\s -> "\\texttt{" ++ s ++ "}"))
|
||||
rawCode = liftM (text . (\s -> "\\texttt{" ++ escapeSpaces s ++ "}"))
|
||||
$ stringToLaTeX CodeString str
|
||||
where
|
||||
escapeSpaces = concatMap (\c -> if c == ' ' then "\\ " else [c])
|
||||
inlineToLaTeX (Quoted qt lst) = do
|
||||
contents <- inlineListToLaTeX lst
|
||||
csquotes <- liftM stCsquotes get
|
||||
|
||||
+1
-1
@@ -734,7 +734,7 @@ These shouldn't be math:
|
||||
\begin{itemize}
|
||||
\itemsep1pt\parskip0pt\parsep0pt
|
||||
\item
|
||||
To get the famous equation, write \texttt{\$e = mc\^{}2\$}.
|
||||
To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}.
|
||||
\item
|
||||
\$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is
|
||||
emphasized.)
|
||||
|
||||
Reference in New Issue
Block a user