aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/JATS.hs1
-rw-r--r--test/writer.jats_archiving14
-rw-r--r--test/writer.jats_publishing14
3 files changed, 17 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Writers/JATS.hs b/src/Text/Pandoc/Writers/JATS.hs
index 26f94cb03..e78c6dc8f 100644
--- a/src/Text/Pandoc/Writers/JATS.hs
+++ b/src/Text/Pandoc/Writers/JATS.hs
@@ -436,6 +436,7 @@ inlineToJATS opts (Note contents) = do
(n, _):_ -> n + 1
[] -> 1
thenote <- inTags True "fn" [("id", "fn" <> tshow notenum)]
+ . (inTagsSimple "label" (literal $ tshow notenum) <>)
<$> wrappedBlocksToJATS (not . isPara) opts
(walk demoteHeaderAndRefs contents)
modify $ \st -> st{ jatsNotes = (notenum, thenote) : notes }
diff --git a/test/writer.jats_archiving b/test/writer.jats_archiving
index 1a9537a21..332b5d3fd 100644
--- a/test/writer.jats_archiving
+++ b/test/writer.jats_archiving
@@ -882,11 +882,12 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<back>
<fn-group>
<fn id="fn1">
- <p>Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.</p>
+ <label>1</label><p>Here is the footnote. It can go anywhere after the
+ footnote reference. It need not be placed at the end of the document.</p>
</fn>
<fn id="fn2">
- <p>Here’s the long note. This one contains multiple blocks.</p>
+ <label>2</label><p>Here’s the long note. This one contains multiple
+ blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the footnote
(as with list items).</p>
<p specific-use="wrapper">
@@ -896,16 +897,17 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
just indent the first line of each block.</p>
</fn>
<fn id="fn3">
- <p>This is <italic>easier</italic> to type. Inline notes may contain
+ <label>3</label><p>This is <italic>easier</italic> to type. Inline notes
+ may contain
<ext-link ext-link-type="uri" xlink:href="http://google.com">links</ext-link>
and <monospace>]</monospace> verbatim characters, as well as [bracketed
text].</p>
</fn>
<fn id="fn4">
- <p>In quote.</p>
+ <label>4</label><p>In quote.</p>
</fn>
<fn id="fn5">
- <p>In list.</p>
+ <label>5</label><p>In list.</p>
</fn>
</fn-group>
</back>
diff --git a/test/writer.jats_publishing b/test/writer.jats_publishing
index b85816848..f53fd554d 100644
--- a/test/writer.jats_publishing
+++ b/test/writer.jats_publishing
@@ -882,11 +882,12 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
<back>
<fn-group>
<fn id="fn1">
- <p>Here is the footnote. It can go anywhere after the footnote reference.
- It need not be placed at the end of the document.</p>
+ <label>1</label><p>Here is the footnote. It can go anywhere after the
+ footnote reference. It need not be placed at the end of the document.</p>
</fn>
<fn id="fn2">
- <p>Here’s the long note. This one contains multiple blocks.</p>
+ <label>2</label><p>Here’s the long note. This one contains multiple
+ blocks.</p>
<p>Subsequent blocks are indented to show that they belong to the footnote
(as with list items).</p>
<p specific-use="wrapper">
@@ -896,16 +897,17 @@ These should not be escaped: \$ \\ \&gt; \[ \{</preformat>
just indent the first line of each block.</p>
</fn>
<fn id="fn3">
- <p>This is <italic>easier</italic> to type. Inline notes may contain
+ <label>3</label><p>This is <italic>easier</italic> to type. Inline notes
+ may contain
<ext-link ext-link-type="uri" xlink:href="http://google.com">links</ext-link>
and <monospace>]</monospace> verbatim characters, as well as [bracketed
text].</p>
</fn>
<fn id="fn4">
- <p>In quote.</p>
+ <label>4</label><p>In quote.</p>
</fn>
<fn id="fn5">
- <p>In list.</p>
+ <label>5</label><p>In list.</p>
</fn>
</fn-group>
</back>