@@ -163,8 +163,7 @@ data Opt = Opt
163163 , optIndentedCodeClasses :: [String] -- ^ Default classes for indented code blocks
164164 , optDataDir :: Maybe FilePath
165165#ifdef _CITEPROC
166− , optBiblioFile :: String
167− , optBiblioFormat :: String
166+ , optBibliography :: [Reference]
168167 , optCslFile :: String
169168#endif
170169 }
@@ -205,8 +204,7 @@ defaultOpts = Opt
205204 , optIndentedCodeClasses = []
206205 , optDataDir = Nothing
207206#ifdef _CITEPROC
208− , optBiblioFile = []
209− , optBiblioFormat = []
207+ , optBibliography = []
210208 , optCslFile = []
211209#endif
212210 }
@@ -520,16 +518,14 @@ options =
520518 "FORMAT")
521519 "" -- "Print default template for FORMAT"
522520#ifdef _CITEPROC
523− , Option "" ["biblio"]
521+ , Option "" ["bibliography"]
524522 (ReqArg
525− (\arg opt -> return opt { optBiblioFile = arg} )
523+ (\arg opt -> do
524+ refs <- readBiblioFile arg ""
525+ return opt { optBibliography =
526+ optBibliography opt ++ refs } )
526527 "FILENAME")
527528 ""
528− , Option "" ["biblio-format"]
529− (ReqArg
530− (\arg opt -> return opt { optBiblioFormat = arg} )
531− "STRING")
532− ""
533529 , Option "" ["csl"]
534530 (ReqArg
535531 (\arg opt -> return opt { optCslFile = arg} )
@@ -684,9 +680,8 @@ main = do
684680 , optIndentedCodeClasses = codeBlockClasses
685681 , optDataDir = mbDataDir
686682#ifdef _CITEPROC
687− , optBiblioFile = biblioFile
688− , optBiblioFormat = biblioFormat
689− , optCslFile = cslFile
683+ , optBibliography = refs
684+ , optCslFile = cslFile
690685#endif
691686 } = opts
692687
@@ -746,10 +741,6 @@ main = do
746741
747742 let standalone' = standalone || isNonTextOutput writerName'
748743
749−#ifdef _CITEPROC
750− refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
751−#endif
752−
753744 variables' <- case (writerName', standalone', offline) of
754745 ("s5", True, True) -> do
755746 inc <- s5HeaderIncludes datadir