@@ -163,8 +163,7 @@ data Opt = Opt
163 , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
163 , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
164 , optDataDir :: Maybe FilePath
164 , optDataDir :: Maybe FilePath
165#ifdef _CITEPROC
165#ifdef _CITEPROC
166− , optBiblioFile :: String
166+ , optBibliography :: [Reference]
167− , optBiblioFormat :: String
168 , optCslFile :: String
167 , optCslFile :: String
@@ -205,8 +204,7 @@ defaultOpts = Opt
205 , optIndentedCodeClasses = []
204 , optIndentedCodeClasses = []
206 , optDataDir = Nothing
205 , optDataDir = Nothing
207#ifdef _CITEPROC
206#ifdef _CITEPROC
208− , optBiblioFile = []
207+ , optBibliography = []
209− , optBiblioFormat = []
210 , optCslFile = []
208 , optCslFile = []
@@ -520,16 +518,14 @@ options =
520 "FORMAT")
518 "FORMAT")
521 "" -- "Print default template for FORMAT"
519 "" -- "Print default template for FORMAT"
522#ifdef _CITEPROC
520#ifdef _CITEPROC
523− , Option "" ["biblio"]
521+ , Option "" ["bibliography"]
525− (\arg opt -> return opt { optBiblioFile = arg} )
523+ (\arg opt -> do
524+ refs <- readBiblioFile arg ""
525+ return opt { optBibliography =
526+ optBibliography opt ++ refs } )
526 "FILENAME")
527 "FILENAME")
528− , Option "" ["biblio-format"]
530− (\arg opt -> return opt { optBiblioFormat = arg} )
533 , Option "" ["csl"]
529 , Option "" ["csl"]
535 (\arg opt -> return opt { optCslFile = arg} )
531 (\arg opt -> return opt { optCslFile = arg} )
@@ -684,9 +680,8 @@ main = do
684 , optIndentedCodeClasses = codeBlockClasses
680 , optIndentedCodeClasses = codeBlockClasses
685 , optDataDir = mbDataDir
681 , optDataDir = mbDataDir
686#ifdef _CITEPROC
682#ifdef _CITEPROC
687− , optBiblioFile = biblioFile
683+ , optBibliography = refs
688− , optBiblioFormat = biblioFormat
689− , optCslFile = cslFile
684+ , optCslFile = cslFile
@@ -746,10 +741,6 @@ main = do
747 let standalone' = standalone || isNonTextOutput writerName'
742 let standalone' = standalone || isNonTextOutput writerName'
750− refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
753 variables' <- case (writerName', standalone', offline) of
744 variables' <- case (writerName', standalone', offline) of
754 ("s5", True, True) -> do
745 ("s5", True, True) -> do
755 inc <- s5HeaderIncludes datadir
746 inc <- s5HeaderIncludes datadir