Closed castedo closed 1 year ago
Does it help if you put reference-section-title
in your metadata?
(see the manual)
Good idea! I didn't know about that. But sadly it does not add the title into the <back><ref-list>
, only the body.
Can you quote the xml more fully so I can see where it adds the title?
My pleasure!
...
<article ... >
...
<body>
...
</body>
<back>
...
<ref-list>
<title>References</title>
<ref id="bib1">
...
</ref>
...
</ref-list>
</back>
...
</article>
The full XML in all its glory is here: https://raw.githubusercontent.com/elifesciences/elife-article-xml/master/articles/elife-63435-v3.xml
I meant, where does pandoc currently add the title when you use reference-section-title
?
With reference-section-title: Referencias
added to input.md meta I get:
<article ... >
...
<body>
...
<sec id="bibliography">
<title>Referencias</title>
</sec>
</body>
<back>
<ref-list>
<ref id="ref-shannon_mathematical_1998">
<element-citation publication-type="book">
...
<isbn>978-0-252-72548-7 978-0-252-72546-3</isbn>
</element-citation>
</ref>
</ref-list>
</back>
</article>
Oh, yes, that's no good at all.
A quick update: I hack around this limitation in wrapper utilities of pandoc for generating JATS XML. After calling pandoc, I string replace <ref-list>
in pandoc's XML output with <ref-list><title>References</title>
An example of this hack in this this utility:
I've made some changes that yield this output:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.2 20190208//EN"
"JATS-archivearticle1.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="1.2" article-type="other">
<front>
<journal-meta>
<journal-id></journal-id>
<journal-title-group>
</journal-title-group>
<issn></issn>
<publisher>
<publisher-name></publisher-name>
</publisher>
</journal-meta>
<article-meta>
<permissions>
</permissions>
</article-meta>
</front>
<body>
<p>Doe (2006)</p>
</body>
<back>
<ref-list>
<title>References</title>
<ref id="ref-test">
<mixed-citation>Doe, J. (2006). Test,
<italic>81</italic>.</mixed-citation>
</ref>
</ref-list>
</back>
</article>
I think that's desired.
Oh bummer. @jgm That test case is beautiful, but it missed a regression bug with a heading in the input document: #9017 Sorry!
This enhancement does not appear to be working for element citations, see #9021.
This feature request is to include a
<title>
in the<ref-list>
that is generated for references. As of 2.19.2 it is not output.For example, here's what pandoc generates:
whereas this is what an eLife XML file (#63435-v3) looks like:
The pandoc command is the following:
with the attached input.md.
In addition to producing JATS XML that is more compatible with other JATS readers, I suspect this feature will also be useful for a separate pandoc JATS reading feature I'll submit separately.
I would tweak the JATS template if I could to get this functionality but the entire
<back>
element is generated from one$back$
template variable.