diff options
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 3 | ||||
-rw-r--r-- | src/pandoc.hs | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 6134d879c..f0c6eb378 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -566,7 +566,7 @@ data WriterOptions = WriterOptions , writerSourceDirectory :: FilePath -- ^ Directory path of 1st source file , writerUserDataDir :: Maybe FilePath -- ^ Path of user data directory , writerCiteMethod :: CiteMethod -- ^ How to print cites - , writerBiblioFile :: String -- ^ Biblio file to use for citations + , writerBiblioFiles :: [FilePath] -- ^ Biblio files to use for citations } deriving Show -- | Default writer options. @@ -594,7 +594,7 @@ defaultWriterOptions = , writerSourceDirectory = "." , writerUserDataDir = Nothing , writerCiteMethod = Citeproc - , writerBiblioFile = "" + , writerBiblioFiles = [] } -- 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") diff --git a/src/pandoc.hs b/src/pandoc.hs index 59390fe6c..df83cdd0b 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -739,7 +739,7 @@ main = do writerIncremental = incremental, writerXeTeX = xetex, writerCiteMethod = citeMethod, - writerBiblioFile = head reffiles, + writerBiblioFiles = reffiles, writerIgnoreNotes = False, writerNumberSections = numberSections, writerSectionDivs = sectionDivs, |