aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-26 03:15:35 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-07-26 03:15:35 +0000
commit453dc5345792530eb719df57158419eb61c70677 (patch)
tree77dc56af9b5973f0251deb157e3f69af04688bed /src/Text/Pandoc
parent00b69e4657a7276ebab16ba3055226cf255da5db (diff)
downloadpandoc-453dc5345792530eb719df57158419eb61c70677.tar.gz
Fixes in LaTeX writer:
+ put \VerbatimFootnotes right before \title block, to avoid bad interactions. + added deVerb in description list. + removed \texttt{} from deVerb, because it cannot go in description lists. git-svn-id: https://pandoc.googlecode.com/svn/trunk@802 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index dfbbc8f58..d9982cb69 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -91,8 +91,8 @@ latexHeader options (Meta title authors date) = do
else "\\setcounter{secnumdepth}{0}\n"
let baseHeader = writerHeader options
let header = baseHeader ++ extras
- return $ header ++ secnumline ++ titletext ++ authorstext ++ datetext ++
- "\\begin{document}\n" ++ maketitle ++ verbatim ++ "\n"
+ return $ header ++ secnumline ++ verbatim ++ titletext ++ authorstext ++
+ datetext ++ "\\begin{document}\n" ++ maketitle ++ "\n"
-- escape things as needed for LaTeX
@@ -112,7 +112,7 @@ stringToLaTeX = escapeStringUsing latexEscapes
deVerb :: [Inline] -> [Inline]
deVerb [] = []
deVerb ((Code str):rest) =
- (Str $ "\\texttt{" ++ stringToLaTeX str ++ "}"):(deVerb rest)
+ (Str $ stringToLaTeX str):(deVerb rest)
deVerb (other:rest) = other:(deVerb rest)
-- | Convert Pandoc block element to LaTeX.
@@ -179,9 +179,9 @@ tableRowToLaTeX cols =
listItemToLaTeX lst = blockListToLaTeX lst >>= (return . ("\\item "++))
defListItemToLaTeX (term, def) = do
- term' <- inlineListToLaTeX term
+ term' <- inlineListToLaTeX (deVerb term)
def' <- blockListToLaTeX def
- return $ "\\item[" ++ substitute "]" "\\]" term' ++ "] " ++ def'
+ return $ "\\item[" ++ term' ++ "] " ++ def'
-- | Convert list of inline elements to LaTeX.
inlineListToLaTeX :: [Inline] -- ^ Inlines to convert