aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Main.hs20
-rw-r--r--pandoc.cabal2
2 files changed, 15 insertions, 7 deletions
diff --git a/Main.hs b/Main.hs
index 0e1291983..0e0b4ba26 100644
--- a/Main.hs
+++ b/Main.hs
@@ -154,7 +154,8 @@ data Opt = Opt
, optWrapText :: Bool -- ^ Wrap text
, optSanitizeHTML :: Bool -- ^ Sanitize HTML
#ifdef _CITEPROC
- , optModsFile :: String
+ , optBiblioFile :: String
+ , optBiblioFormat :: String
, optCslFile :: String
#endif
}
@@ -187,7 +188,8 @@ defaultOpts = Opt
, optWrapText = True
, optSanitizeHTML = False
#ifdef _CITEPROC
- , optModsFile = []
+ , optBiblioFile = []
+ , optBiblioFormat = []
, optCslFile = []
#endif
}
@@ -364,11 +366,16 @@ options =
"FORMAT")
"" -- "Print default header for FORMAT"
#ifdef _CITEPROC
- , Option "" ["mods"]
+ , Option "" ["biblio"]
(ReqArg
- (\arg opt -> return opt { optModsFile = arg} )
+ (\arg opt -> return opt { optBiblioFile = arg} )
"FILENAME")
""
+ , Option "" ["biblio-format"]
+ (ReqArg
+ (\arg opt -> return opt { optBiblioFormat = arg} )
+ "STRING")
+ ""
, Option "" ["csl"]
(ReqArg
(\arg opt -> return opt { optCslFile = arg} )
@@ -513,7 +520,8 @@ main = do
, optWrapText = wrap
, optSanitizeHTML = sanitize
#ifdef _CITEPROC
- , optModsFile = modsFile
+ , optBiblioFile = biblioFile
+ , optBiblioFormat = biblioFormat
, optCslFile = cslFile
#endif
} = opts
@@ -566,7 +574,7 @@ main = do
let standalone' = (standalone && not strict) || isNonTextOutput writerName'
#ifdef _CITEPROC
- refs <- if null modsFile then return [] else readModsColletionFile modsFile
+ refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
#endif
let startParserState =
diff --git a/pandoc.cabal b/pandoc.cabal
index 721268f4e..20968719d 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -199,7 +199,7 @@ Executable pandoc
if flag(highlighting)
cpp-options: -D_HIGHLIGHTING
if flag(citeproc)
- Build-depends: citeproc-hs
+ Build-depends: citeproc-hs >= 0.2
cpp-options: -D_CITEPROC
if flag(executable)
Buildable: True