diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 0fec824c..8cfb5b4b 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -161,7 +161,7 @@ FROM alpine-latex as alpine-extra COPY common/extra/packages.txt /root/extra_packages.txt COPY common/extra/requirements.txt /root/extra_requirements.txt -# The option `--break-system-packages` sounds bad but this is not +# The option `--break-system-packages` sounds bad but this is not # really a problem here because we are not using Python apk packages # anyway. RUN apk --no-cache add py-pip \ @@ -180,3 +180,10 @@ RUN mkdir -p ${TEMPLATES_DIR} && \ ARG EISVOGEL_REPO=https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template ARG EISVOGEL_VERSION=v2.4.0 RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex -O ${TEMPLATES_DIR}/eisvogel.latex + +# Lua filters +ARG LUA_FILTERS_REPO=https://github.com/pandoc/lua-filters/releases/download +ARG LUA_FILTERS_VERSION=v2021-11-05 +RUN wget ${LUA_FILTERS_REPO}/${LUA_FILTERS_VERSION}/lua-filters.tar.gz \ + && tar xzf lua-filters.tar.gz --strip-components=1 --one-top-level=/.pandoc \ + && rm -f lua-filters.tar.gz diff --git a/docs/extra.md b/docs/extra.md index 8adfc3c1..2077b4e6 100644 --- a/docs/extra.md +++ b/docs/extra.md @@ -6,13 +6,13 @@ and a curated selection of components: * Templates: [Eisvogel][] * Beamer Themes: [beamer-metropolis][] -* Pandoc filters: [pandoc-latex-environment][] +* Pandoc filters: [pandoc-latex-environment][] + [Lua filters][] * Open Source Fonts: Font Awesome, Source Code Pro, Source Sans Pro - [Eisvogel]: https://github.com/Wandmalfarbe/pandoc-latex-template [beamer-metropolis]: https://github.com/matze/mtheme [pandoc-latex-environment]: https://github.com/chdemko/pandoc-latex-environment +[Lua filters]: https://github.com/pandoc/lua-filters [pandoc]: https://pandoc.org/ [LaTeX]: https://latex-project.org/ diff --git a/test/Makefile b/test/Makefile index 13cff022..b231e929 100644 --- a/test/Makefile +++ b/test/Makefile @@ -189,7 +189,8 @@ EXTRA_CMD = docker run --rm \ --fail-if-warnings .PHONY: test-extra -test-extra: output/eisvogel.pdf output/eisvogel_with_environment.pdf output/beamertheme-metropolis.pdf +test-extra: output/eisvogel.pdf output/eisvogel_with_environment.pdf \ + output/beamertheme-metropolis.pdf output/lua.html output/eisvogel.pdf: eisvogel.md $(EXTRA_CMD) $< \ @@ -211,6 +212,11 @@ output/beamertheme-metropolis.pdf: beamertheme-metropolis.md --variable=theme:metropolis \ --variable=themeoptions:numbering=none +output/lua.html: eisvogel.md + $(EXTRA_CMD) $< \ + --output=$@ \ + --lua-filter=pagebreak.lua + # ____ _ # / ___| | ___ __ _ _ __ # | | | |/ _ \/ _` | '_ \ diff --git a/ubuntu/Dockerfile b/ubuntu/Dockerfile index b527b45a..810758f7 100644 --- a/ubuntu/Dockerfile +++ b/ubuntu/Dockerfile @@ -199,3 +199,10 @@ RUN mkdir -p ${TEMPLATES_DIR} && \ ARG EISVOGEL_REPO=https://raw.githubusercontent.com/Wandmalfarbe/pandoc-latex-template ARG EISVOGEL_VERSION=v2.4.0 RUN wget ${EISVOGEL_REPO}/${EISVOGEL_VERSION}/eisvogel.tex -O ${TEMPLATES_DIR}/eisvogel.latex + +# Lua Filters +ARG LUA_FILTERS_REPO=https://github.com/pandoc/lua-filters/releases/download +ARG LUA_FILTERS_VERSION=v2021-11-05 +RUN wget ${LUA_FILTERS_REPO}/${LUA_FILTERS_VERSION}/lua-filters.tar.gz \ + && tar xzf lua-filters.tar.gz --strip-components=1 --one-top-level=/.pandoc \ + && rm -f lua-filters.tar.gz