aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-23 10:55:56 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-26 17:22:53 -0800
commitbd43c0f4c940b755e2d68c7146c7f5201fb181d9 (patch)
tree502cab13026c8a3263387ae4578cbf5e7fc6a2b7 /src/Text/Pandoc/Writers/LaTeX.hs
parent5bee388914283825491bc1256162f9744743d976 (diff)
downloadpandoc-bd43c0f4c940b755e2d68c7146c7f5201fb181d9.tar.gz
Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed and replaced by generic RawInline and RawBlock elements. All modules updated to use the new raw elements.
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 64a1e03ac..e6687ff08 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -151,7 +151,7 @@ inCmd cmd contents = char '\\' <> text cmd <> braces contents
deVerb :: [Inline] -> [Inline]
deVerb [] = []
deVerb ((Code str):rest) =
- (TeX $ "\\texttt{" ++ stringToLaTeX str ++ "}"):(deVerb rest)
+ (RawInline "latex" $ "\\texttt{" ++ stringToLaTeX str ++ "}"):(deVerb rest)
deVerb (other:rest) = other:(deVerb rest)
-- | Convert Pandoc block element to LaTeX.
@@ -184,7 +184,8 @@ blockToLaTeX (CodeBlock (_,classes,_) str) = do
else return "verbatim"
return $ "\\begin{" <> text env <> "}" $$ flush (text str) $$
"\\end{" <> text env <> "}" $$ cr -- final cr needed because of footnotes
-blockToLaTeX (RawHtml _) = return empty
+blockToLaTeX (RawBlock "latex" x) = return $ text x
+blockToLaTeX (RawBlock _ _) = return empty
blockToLaTeX (BulletList lst) = do
items <- mapM listItemToLaTeX lst
return $ "\\begin{itemize}" $$ vcat items $$ "\\end{itemize}"
@@ -360,8 +361,8 @@ inlineToLaTeX Ellipses = return "\\ldots{}"
inlineToLaTeX (Str str) = return $ text $ stringToLaTeX str
inlineToLaTeX (Math InlineMath str) = return $ char '$' <> text str <> char '$'
inlineToLaTeX (Math DisplayMath str) = return $ "\\[" <> text str <> "\\]"
-inlineToLaTeX (TeX str) = return $ text str
-inlineToLaTeX (HtmlInline _) = return empty
+inlineToLaTeX (RawInline "latex" str) = return $ text str
+inlineToLaTeX (RawInline _ _) = return empty
inlineToLaTeX (LineBreak) = return "\\\\"
inlineToLaTeX Space = return space
inlineToLaTeX (Link txt (src, _)) =