Skip to content

Commit

Permalink
Incomplete broken LaTeX export
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel committed Jul 31, 2019
1 parent 2a5e425 commit 78678e9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,35 @@ if [ "${BUILD_DOCX:-}" = "true" ]; then
"$INPUT_PATH"
fi

# Create LaTeX output (if BUILD_LATEX environment variable equals "true")
if [ "$BUILD_LATEX" = "true" ];
then
echo >&2 "Exporting LaTeX manuscript"
pandoc \
--from=markdown \
--to=latex \
--standalone \
--wrap=preserve \
--filter=pandoc-fignos \
--filter=pandoc-eqnos \
--filter=pandoc-tablenos \
--bibliography=$BIBLIOGRAPHY_PATH \
--csl=$CSL_PATH \
--metadata link-citations=true \
--number-sections \
--resource-path=.:content \
--output=output/latex/manuscript.tex \
$INPUT_PATH
echo >&2 "Exporting PDF from LaTeX manuscript"
if [ -L output/latex/images ]; then rm output/latex/images; fi # if output/latex/images is a symlink, remove it
ln -s ../../content/images output/latex/images
docker run \
--rm --interactive --tty \
--volume "$(pwd)":/home \
--workdir /home/output/latex \
dockershelf/latex:full \
xelatex -interaction=nonstopmode manuscript.tex
rm images
fi

echo >&2 "Build complete"

0 comments on commit 78678e9

Please sign in to comment.