From 43fee5e7f797b442e0290e9f6e788a6ad67a18b5 Mon Sep 17 00:00:00 2001 From: Nathan Gass Date: Wed, 15 Dec 2010 11:40:53 +0100 Subject: Support multiple bibliography files with natbib and biblatex output. --- 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 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") -- cgit v1.2.3