Skip to content

Commit

Permalink
Pandoc: export to JATS XML
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel committed Aug 10, 2017
1 parent 0a04405 commit c07c779
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions build/assets/pandoc-jats
Submodule pandoc-jats added at d3aaa4
17 changes: 17 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion output/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

0 comments on commit c07c779

Please sign in to comment.