diff options
author | Nathan Gass <gass@search.ch> | 2010-12-15 11:40:53 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-15 10:21:47 -0800 |
commit | 43fee5e7f797b442e0290e9f6e788a6ad67a18b5 (patch) | |
tree | e5c36d5abad985d43e319e74ffd354e41a76316d /src/Text/Pandoc/Writers/LaTeX.hs | |
parent | 63d5e0c5f97ed9b1063187b73e77cd25508a0294 (diff) | |
download | pandoc-43fee5e7f797b442e0290e9f6e788a6ad67a18b5.tar.gz |
Support multiple bibliography files with natbib and biblatex output.
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index e791d1332..9ddfc8b84 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -36,6 +36,7 @@ import Data.List ( (\\), isSuffixOf, isPrefixOf, intersperse, intercalate ) import Data.Char ( toLower ) import Control.Monad.State import Text.PrettyPrint.HughesPJ hiding ( Str ) +import System.FilePath (dropExtension) data WriterState = WriterState { stInNote :: Bool -- @True@ if we're in a note @@ -76,7 +77,7 @@ pandocToLaTeX options (Pandoc (Meta title authors date) blocks) = do body <- blockListToLaTeX blocks let main = render body st <- get - let biblio = takeWhile ((/=) '.') $ writerBiblioFile options + let biblio = intercalate "," $ map dropExtension $ writerBiblioFiles options citecontext = case writerCiteMethod options of Natbib -> [ ("biblio", biblio) , ("natbib", "yes") |