Skip to content

Commit c07c779

Browse files
committed
Pandoc: export to JATS XML
1 parent 0a04405 commit c07c779

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "ci/opentimestamps-client"]
22
path = ci/opentimestamps-client
33
url = https://github.com/opentimestamps/opentimestamps-client.git
4+
[submodule "build/assets/pandoc-jats"]
5+
path = build/assets/pandoc-jats
6+
url = https://github.com/mfenner/pandoc-jats

build/assets/pandoc-jats

Submodule pandoc-jats added at d3aaa43

build/build.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,23 @@ wkhtmltopdf \
5151
webpage/index.html \
5252
output/manuscript.pdf
5353

54+
# Create JATS XML output
55+
# https://github.com/mfenner/pandoc-jats
56+
echo "Exporting JATS XML manuscript"
57+
pandoc --verbose \
58+
--smart \
59+
--from=markdown \
60+
--to=build/assets/pandoc-jats/JATS.lua \
61+
--filter pandoc-fignos \
62+
--filter pandoc-eqnos \
63+
--filter pandoc-tablenos \
64+
--template=build/assets/pandoc-jats/default.jats \
65+
--bibliography=$BIBLIOGRAPHY_PATH \
66+
--csl=$CSL_PATH \
67+
--metadata link-citations=true \
68+
--output=output/manuscript.xml \
69+
$INPUT_PATH
70+
5471
# Create DOCX output when user specifies to do so
5572
if [ "$BUILD_DOCX" = "true" ];
5673
then

output/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ This directory contains the following files:
1313
+ [`references.json`](references.json) is CSL-JSON file of bibliographic item metadata ([see specification](https://github.com/citation-style-language/schema/blob/master/csl-data.json)) for all references.
1414
+ [`variables.json`](variables.json) contains variables that were passed to the jinja2 templater. These variables contain those automatically generated by the manubot as well as those provided by the user via the `--template-variables-path` option.
1515

16-
Pandoc consumes `manuscript.md` and `references.json` to create the formatted manuscript, which is exported to `manuscript.html`, `manuscript.pdf`, and optionally `manuscript.docx`.
16+
Pandoc consumes `manuscript.md` and `references.json` to create the formatted manuscript, which is exported to `manuscript.html`, `manuscript.pdf`, `manuscript.xml`, and optionally `manuscript.docx`.

0 commit comments

Comments
 (0)