Skip to content

Commit

Permalink
Merge pull request #231 from pandoc/127_lua_filters
Browse files Browse the repository at this point in the history
FIX #127 : Add Lua filters
  • Loading branch information
daamien authored May 14, 2024
2 parents 108fca1 + 799f2ea commit 4a15163
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
9 changes: 8 additions & 1 deletion alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
4 changes: 2 additions & 2 deletions docs/extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
8 changes: 7 additions & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) $< \
Expand All @@ -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

# ____ _
# / ___| | ___ __ _ _ __
# | | | |/ _ \/ _` | '_ \
Expand Down
7 changes: 7 additions & 0 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4a15163

Please sign in to comment.