From a07fd77c8bd26b18c07d2eca5b8943e91e0956d4 Mon Sep 17 00:00:00 2001 From: Gojko Adzic Date: Thu, 23 May 2019 14:04:21 +0200 Subject: [PATCH] minimal fonts for pandoc --- Makefile | 18 +++++++++--------- Makefile_Latex | 17 ++++++++--------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index f0612bf..ad4cde3 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,7 @@ DOCKER_IMAGE ?= lambci/lambda-base-2:build TARGET ?=/opt/ MOUNTS = -v $(PROJECT_ROOT):/var/task \ - -v $(PROJECT_ROOT)result:$(TARGET) \ - -v $(PROJECT_ROOT)cache:/usr/local + -v $(PROJECT_ROOT)result:$(TARGET) DOCKER = docker run -it --rm -w=/var/task/build build result cache: @@ -17,15 +16,16 @@ clean: bash: $(DOCKER) $(MOUNTS) --entrypoint /bin/bash -t $(DOCKER_IMAGE) -pdflatex: - $(DOCKER) $(MOUNTS) \ - --env PATH=/opt/texlive/x86_64-linux/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ - --entrypoint /opt/texlive/bin/x86_64-linux/pdflatex \ - $(DOCKER_IMAGE) /var/task/test.latex - -all result/bin/x86_64-linux/latex: build result cache +all: build result cache $(DOCKER) $(MOUNTS) --entrypoint /usr/bin/make -t $(DOCKER_IMAGE) TARGET_DIR=$(TARGET) -f ../Makefile_Latex $@ +example.pdf: + docker run -it --rm $(MOUNTS) \ + -w=/var/task/test \ + --env PATH=/opt/texlive/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ + --entrypoint /opt/texlive/bin/x86_64-linux/pdflatex \ + $(DOCKER_IMAGE) example.latex + STACK_NAME ?= latex-layer build/output.yaml: template.yaml result/bin/x86_64-linux/latex diff --git a/Makefile_Latex b/Makefile_Latex index eeb45ff..360a421 100644 --- a/Makefile_Latex +++ b/Makefile_Latex @@ -1,16 +1,13 @@ PROJECT_ROOT = $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) -CACHE_DIR=$(PROJECT_ROOT)build/cache +TEXLIVE_SOURCE:=install-tl-unx.tar.gz +WGET:=/usr/bin/wget +MD5_pm:=/usr/lib64/perl5/vendor_perl/Digest/MD5.pm .ONESHELL: -### step 1: texlive installer -# see https://www.tug.org/texlive/acquire-netinstall.html -TEXLIVE_SOURCE=install-tl-unx.tar.gz - $(TEXLIVE_SOURCE): curl -LO http://mirror.ctan.org/systems/texlive/tlnet/$(TEXLIVE_SOURCE) -MD5_pm=/usr/lib64/perl5/vendor_perl/Digest/MD5.pm $(MD5_pm): yum install perl-Digest-MD5 -y @@ -26,18 +23,20 @@ $(TLMGR): $(TEXLIVE_SOURCE) $(WGET) $(MD5_pm) ## see https://pandoc.org/MANUAL.html ## -## the following packages might be needed for xelatex: +## the following packages might be needed for xelatex, but xelatex +## is not included in the basic profile. change texlive.profile to +## add it if necessary ## ## fontspec polyglossia xecjk bidi mathspec upquote microtype ## csquotes natbib biblatex bibtex biber pandoc-packages: $(TLMGR) - $(TLMGR) install --repository ctan \ + $(TLMGR) install \ xcolor amsfonts amsmath lm unicode-math \ ifxetex ifluatex listings fancyvrb booktabs \ hyperref ulem geometry setspace babel upquote \ microtype parskip xurl oberdiek tools \ - graphics footnotehyper mdwtools etoolbox + graphics footnotehyper mdwtools etoolbox ec all: $(TLMGR) pandoc-packages