diff options
Diffstat (limited to 'latex')
| -rw-r--r-- | latex/.gitignore | 2 | ||||
| -rw-r--r-- | latex/Makefile | 15 | ||||
| -rw-r--r-- | latex/libs.tex | 8 |
3 files changed, 22 insertions, 3 deletions
diff --git a/latex/.gitignore b/latex/.gitignore new file mode 100644 index 00000000..3f554dd2 --- /dev/null +++ b/latex/.gitignore @@ -0,0 +1,2 @@ +card.fmt +card.log diff --git a/latex/Makefile b/latex/Makefile index 484aee02..756a498d 100644 --- a/latex/Makefile +++ b/latex/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL = all -PDFLATEX = lualatex +PDFLATEX ?= pdflatex PDFTOPPM = pdftoppm PDFUNITE = pdfunite @@ -70,6 +70,10 @@ SPECIAL_CARDS_TEX := unit_explanation.tex SPECIAL_CARDS_PDF := $(foreach card, $(SPECIAL_CARDS_TEX), $(addprefix $(BUILDDIR)/, $(card:.tex=.pdf))) SPECIAL_CARDS_PNG := $(SPECIAL_CARDS_PDF:.pdf=.png) +CARDFMT = $(LATEX_ROOT)/card.fmt +$(CARDFMT): $(COMMON_TEX_FILES) + $(PDFLATEX) -ini -jobname="card" "&$(PDFLATEX)" mylatexformat.ltx $(CARDS_TEX_DIR)/base/archer.tex + VERBOSE ?= @ MAKEFILE_LIST = Makefile @@ -119,8 +123,15 @@ $(1)/%.pdf: $(2)%.tex $(COMMON_TEX_FILES) $(MAKEFILE_LIST) $(VERBOSE) $(PDFLATEX_ENV) $(PDFLATEX) --output-directory $$(@D) $$< endef +define generateCardPdfRules +$(1)/%.pdf: %.tex $(COMMON_TEX_FILES) $(CARDFMT) $(MAKEFILE_LIST) + @echo building $$@ + @if test \( ! \( -d $$(@D) \) \) ;then mkdir -p $$(@D);fi + $(VERBOSE) $(PDFLATEX_ENV) $(PDFLATEX) --fmt $(CARDFMT) --output-directory $$(@D) $$< +endef + # Generate cards pdf rules -$(foreach pdfdir, $(SETS_BUILDDIRS), $(eval $(call generatePdfRules, $(pdfdir),))) +$(foreach pdfdir, $(SETS_BUILDDIRS), $(eval $(call generateCardPdfRules, $(pdfdir),))) # Misc cards not in a set $(eval $(call generatePdfRules, $(BUILDDIR),)) # Generate sets pdf rule diff --git a/latex/libs.tex b/latex/libs.tex index fce0651a..facdf3e9 100644 --- a/latex/libs.tex +++ b/latex/libs.tex @@ -5,7 +5,13 @@ \usepackage[utf8]{inputenc} -\usepackage{fontspec} +\usepackage{iftex} +% TODO: investigae if we need those +\ifluatex + \usepackage{fontspec} +\else + \usepackage[T1]{fontenc} +\fi % optischer Randausgleich \usepackage{microtype} |
