@@ -130,9 +130,10 @@ blockToLaTeX (BlockQuote lst) = do
130 return $ "\\begin{quote}\n" ++ contents ++ "\\end{quote}\n"
130 return $ "\\begin{quote}\n" ++ contents ++ "\\end{quote}\n"
131blockToLaTeX (CodeBlock str) = do
131blockToLaTeX (CodeBlock str) = do
132 st <- get
132 st <- get
133− let verbEnv = if stInNote st then "Verbatim" else "verbatim"
133+ if stInNote st
134+ then do addToHeader "\\usepackage{fancyvrb}"
135+ return $ "\\begin{Verbatim}\n" ++ str ++ "\n\\end{Verbatim}\n"
134− return $ "\\begin{" ++ verbEnv ++ "}\n" ++ str ++
136+ else return $ "\\begin{verbatim}\n" ++ str ++ "\n\\end{verbatim}\n"
135− "\n\\end{" ++ verbEnv ++ "}\n"
136blockToLaTeX (RawHtml str) = return ""
137blockToLaTeX (RawHtml str) = return ""
137blockToLaTeX (BulletList lst) = do
138blockToLaTeX (BulletList lst) = do
138 items <- mapM listItemToLaTeX lst
139 items <- mapM listItemToLaTeX lst
@@ -259,5 +260,4 @@ inlineToLaTeX (Note contents) = do
259 contents' <- blockListToLaTeX contents
260 contents' <- blockListToLaTeX contents
260 st <- get
261 st <- get
261 put (st {stInNote = False})
262 put (st {stInNote = False})
262− addToHeader "\\usepackage{fancyvrb}"
263 return $ "\\footnote{" ++ stripTrailingNewlines contents' ++ "}"
263 return $ "\\footnote{" ++ stripTrailingNewlines contents' ++ "}"