JATS writer: Support citations.

This commit is contained in:
John MacFarlane
2019-02-15 10:26:40 -08:00
parent 35df24e698
commit 39889c22df
+4 -3
View File
@@ -377,9 +377,10 @@ inlineToJATS opts SoftBreak
inlineToJATS opts (Note contents) =
-- TODO technically only <p> tags are allowed inside
inTagsIndented "fn" <$> blocksToJATS opts contents
inlineToJATS opts (Cite _ lst) =
-- TODO revisit this after examining the jats.csl pipeline
inlinesToJATS opts lst
inlineToJATS opts (Cite cs lst) = do
contents <- inlinesToJATS opts lst
let rid = unwords $ map citationId cs
return $ inTags False "xref" [("ref-type","bibr"),("rid",rid)] contents
inlineToJATS opts (Span ("",_,[]) ils) = inlinesToJATS opts ils
inlineToJATS opts (Span (ident,_,kvs) ils) = do
contents <- inlinesToJATS opts ils