git.iko.soy/typeable/pandoc
on master help sign in
Include \VerbatimFootnotes for highlighted code blocks

Updated the LaTeX writer to also include \VerbatimFootnotes in the preamble for highlighted code blocks. Previously this was only done for raw code blocks.

commit6e2019d58812df59d1cb74723c71305c9b233bae authorTimm Albers <timm.albers@open-xchange.com> dateMon 3 Apr 2017, 14:29 (10 years ago) parente3e52aa
1 file changed+5−2
src/Text/Pandoc/Writers/LaTeX.hs+5−2
src/Text/Pandoc/Writers/LaTeX.hs+5−2
@@ -554,8 +554,11 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
554554 unless (null msg) $
555555 report $ CouldNotHighlight msg
556556 rawCodeBlock
557− Right h -> modify (\st -> st{ stHighlighting = True }) >>
558− return (flush $ linkAnchor $$ text (T.unpack h))
557+ Right h -> do
558+ st <- get
559+ when (stInNote st) $ modify (\s -> s{ stVerbInNote = True })
560+ modify (\s -> s{ stHighlighting = True })
561+ return (flush $ linkAnchor $$ text (T.unpack h))
559562 case () of
560563 _ | isEnabled Ext_literate_haskell opts && "haskell" `elem` classes &&
561564 "literate" `elem` classes -> lhsCodeBlock