diff --git a/build/build.sh b/build/build.sh index 9d0b4e0..5cebfc5 100755 --- a/build/build.sh +++ b/build/build.sh @@ -85,6 +85,15 @@ if [ "${BUILD_DOCX:-}" = "true" ]; then --defaults=docx.yaml fi +# Create LaTeX output (if BUILD_LATEX environment variable equals "true") +if [ "${BUILD_LATEX:-}" = "true" ]; then + echo >&2 "Exporting LaTeX manuscript" + pandoc \ + --data-dir="$PANDOC_DATA_DIR" \ + --defaults=common.yaml \ + --defaults=latex.yaml +fi + # Spellcheck if [ "${SPELLCHECK:-}" = "true" ]; then export ASPELL_CONF="add-extra-dicts $(pwd)/build/assets/custom-dictionary.txt; ignore-case true" diff --git a/build/pandoc/defaults/latex.yaml b/build/pandoc/defaults/latex.yaml new file mode 100644 index 0000000..481302d --- /dev/null +++ b/build/pandoc/defaults/latex.yaml @@ -0,0 +1,4 @@ +# Pandoc --defaults for LaTeX output. +# Load on top of common defaults. +to: latex +output-file: output/manuscript.tex