EndNote reader: add nocite as the other bib format readers do.
This commit is contained in:
parent
f813aca3ea
commit
d40d94ebd9
2 changed files with 25 additions and 2 deletions
|
@ -61,7 +61,15 @@ readEndNoteXML :: (PandocMonad m, ToSources a)
|
|||
readEndNoteXML _opts inp = do
|
||||
let sources = toSources inp
|
||||
refs <- readEndNoteXMLReferences sources >>= mapM (traverse (return . text))
|
||||
return $ setMeta "references" (map referenceToMetaValue refs) $ B.doc mempty
|
||||
return $
|
||||
setMeta "nocite" (cite [Citation {citationId = "*"
|
||||
, citationPrefix = []
|
||||
, citationSuffix = []
|
||||
, citationMode = NormalCitation
|
||||
, citationNoteNum = 0
|
||||
, citationHash = 0}] (str "[@*]")) $
|
||||
setMeta "references" (map referenceToMetaValue refs) $
|
||||
B.doc mempty
|
||||
|
||||
readEndNoteXMLCitation :: PandocMonad m
|
||||
=> Sources -> m (Citeproc.Citation Text)
|
||||
|
|
|
@ -2,7 +2,22 @@ Pandoc
|
|||
Meta
|
||||
{ unMeta =
|
||||
fromList
|
||||
[ ( "references"
|
||||
[ ( "nocite"
|
||||
, MetaInlines
|
||||
[ Cite
|
||||
[ Citation
|
||||
{ citationId = "*"
|
||||
, citationPrefix = []
|
||||
, citationSuffix = []
|
||||
, citationMode = NormalCitation
|
||||
, citationNoteNum = 0
|
||||
, citationHash = 0
|
||||
}
|
||||
]
|
||||
[ Str "[@*]" ]
|
||||
]
|
||||
)
|
||||
, ( "references"
|
||||
, MetaList
|
||||
[ MetaMap
|
||||
(fromList
|
||||
|
|
Loading…
Add table
Reference in a new issue