@@ -212,13 +212,6 @@ stringToLaTeX isUrl (x:xs) = do
212 '\x2013' | ligatures -> "--" ++ rest
212 '\x2013' | ligatures -> "--" ++ rest
213 _ -> x : rest
213 _ -> x : rest
215−-- This is needed because | in math mode interacts badly with
216−-- highlighting-kate, which redefines | as a short verb command.
217−escapeMath :: String -> String
218−escapeMath ('|':xs) = "\\vert " ++ escapeMath xs
219−escapeMath (x:xs) = x : escapeMath xs
222-- | Puts contents into LaTeX command.
215-- | Puts contents into LaTeX command.
223inCmd :: String -> Doc -> Doc
216inCmd :: String -> Doc -> Doc
224inCmd cmd contents = char '\\' <> text cmd <> braces contents
217inCmd cmd contents = char '\\' <> text cmd <> braces contents
@@ -622,9 +615,9 @@ inlineToLaTeX (Quoted qt lst) = do
622 else char '\x2018' <> inner <> char '\x2019'
615 else char '\x2018' <> inner <> char '\x2019'
623inlineToLaTeX (Str str) = liftM text $ stringToLaTeX False str
616inlineToLaTeX (Str str) = liftM text $ stringToLaTeX False str
624inlineToLaTeX (Math InlineMath str) =
617inlineToLaTeX (Math InlineMath str) =
625− return $ char '$' <> text (escapeMath str) <> char '$'
618+ return $ char '$' <> text str <> char '$'
626inlineToLaTeX (Math DisplayMath str) =
619inlineToLaTeX (Math DisplayMath str) =
627− return $ "\\[" <> text (escapeMath str) <> "\\]"
620+ return $ "\\[" <> text str <> "\\]"
628inlineToLaTeX (RawInline "latex" str) = return $ text str
621inlineToLaTeX (RawInline "latex" str) = return $ text str
629inlineToLaTeX (RawInline "tex" str) = return $ text str
622inlineToLaTeX (RawInline "tex" str) = return $ text str
630inlineToLaTeX (RawInline _ _) = return empty
623inlineToLaTeX (RawInline _ _) = return empty