From fce48c392acd5c56141ce924f4aaa8fadd10085d Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Tue, 3 Nov 2009 06:50:17 +0000 Subject: Specially mark code blocks that were "literate" in the input. They can then be treated differently in the writers. This allows authors to distinguish bits of the literate program they are writing from source code examples, even if the examples are marked as Haskell for highlighting. Resolves Issue #174. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1618 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/LaTeX.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers/LaTeX.hs') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index f3cbf1acb..a0f9e9004 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -149,7 +149,8 @@ blockToLaTeX (BlockQuote lst) = do return $ text "\\begin{quote}" $$ contents $$ text "\\end{quote}" blockToLaTeX (CodeBlock (_,classes,_) str) = do st <- get - env <- if writerLiterateHaskell (stOptions st) && "haskell" `elem` classes + env <- if writerLiterateHaskell (stOptions st) && "haskell" `elem` classes && + "literate" `elem` classes then return "code" else if stInNote st then do addToHeader "\\usepackage{fancyvrb}" -- cgit v1.2.3