EndNote reader: add nocite as the other bib format readers do.

This commit is contained in:
John MacFarlane 2022-02-04 23:51:12 -08:00
parent f813aca3ea
commit d40d94ebd9
2 changed files with 25 additions and 2 deletions

View file

@ -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)

View file

@ -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