diff options
| author | John MacFarlane <[email protected]> | 2022-10-10 21:17:56 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-10-10 21:17:56 -0700 |
| commit | 1612cc3bf400cb34eaee2dd207c936c9fcc412cb (patch) | |
| tree | a2a021a51ddbcb3c1a32fdb9566d645411972809 /src | |
| parent | a088cbf5637596a461ba9f99b49210235d6c0a68 (diff) | |
Simplify some citation code in LaTeX writer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 31dff78bf..7b21bbcdd 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -67,12 +67,12 @@ writeBeamer options document = pandocToLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> LW m Text pandocToLaTeX options (Pandoc meta blocks) = do - -- Strip off final 'references' header if --natbib or --biblatex + -- Strip off 'references' header if --natbib or --biblatex let method = writerCiteMethod options + let isRefsDiv (Div ("refs",_,_) _) = True + isRefsDiv _ = False let blocks' = if method == Biblatex || method == Natbib - then case reverse blocks of - Div ("refs",_,_) _:xs -> reverse xs - _ -> blocks + then filter (not . isRefsDiv) blocks else blocks -- see if there are internal links let isInternalLink (Link _ _ (s,_)) |
