diff --git a/.gitmodules b/.gitmodules index 692574bf..b0b6071e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "ci/opentimestamps-client"] path = ci/opentimestamps-client url = https://github.com/opentimestamps/opentimestamps-client.git +[submodule "build/assets/pandoc-jats"] + path = build/assets/pandoc-jats + url = https://github.com/mfenner/pandoc-jats diff --git a/build/assets/pandoc-jats b/build/assets/pandoc-jats new file mode 160000 index 00000000..d3aaa439 --- /dev/null +++ b/build/assets/pandoc-jats @@ -0,0 +1 @@ +Subproject commit d3aaa4393125f5cf2d5b813b2fa2693afff70eb6 diff --git a/build/build.sh b/build/build.sh index 8f196f23..70039d8d 100644 --- a/build/build.sh +++ b/build/build.sh @@ -51,6 +51,23 @@ wkhtmltopdf \ webpage/index.html \ output/manuscript.pdf +# Create JATS XML output +# https://github.com/mfenner/pandoc-jats +echo "Exporting JATS XML manuscript" +pandoc --verbose \ + --smart \ + --from=markdown \ + --to=build/assets/pandoc-jats/JATS.lua \ + --filter pandoc-fignos \ + --filter pandoc-eqnos \ + --filter pandoc-tablenos \ + --template=build/assets/pandoc-jats/default.jats \ + --bibliography=$BIBLIOGRAPHY_PATH \ + --csl=$CSL_PATH \ + --metadata link-citations=true \ + --output=output/manuscript.xml \ + $INPUT_PATH + # Create DOCX output when user specifies to do so if [ "$BUILD_DOCX" = "true" ]; then diff --git a/output/README.md b/output/README.md index 8c0fd1c6..6834f815 100644 --- a/output/README.md +++ b/output/README.md @@ -13,4 +13,4 @@ This directory contains the following files: + [`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. + [`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. -Pandoc consumes `manuscript.md` and `references.json` to create the formatted manuscript, which is exported to `manuscript.html`, `manuscript.pdf`, and optionally `manuscript.docx`. +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`.