From f6fc58c6c701acd1e2eb01815e7a2e10c359bc3a Mon Sep 17 00:00:00 2001 From: Benjamin Weiss Date: Tue, 23 Jun 2015 14:24:02 +0200 Subject: [PATCH] added minimal demo for faster option testing + Makefile changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the process I reorganized the Makefile - renamed manual to doc (mainly because I’m too lazy to write `make manual`) - fixed missing dependency in for DOC_PDF - sorted macros (directories, files, commands) --- Makefile | 48 ++++++++++++++++++++++++++--------------------- demo-minimal.tex | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 demo-minimal.tex diff --git a/Makefile b/Makefile index c921248..a5e7eed 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,28 @@ -INS = mtheme.ins -CONTRIB_SRC = contributors.py -CONTRIB_TEX = contributors.tex -DTX = $(wildcard *.dtx) -STY = $(patsubst %.dtx,%.sty,$(wildcard beamer*.dtx pgfplotsthemetol.dtx)) TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME) INSTALL_DIR = $(TEXMFHOME)/tex/latex/mtheme -MANUAL_DIR = $(TEXMFHOME)/doc/latex/mtheme +DOC_DIR = $(TEXMFHOME)/doc/latex/mtheme TEMP_DIR = .temptex +INS = mtheme.ins DEMO_SRC = demo.tex DEMO_PDF = demo.pdf -MANUAL_SRC = mtheme.dtx -MANUAL_PDF = mtheme.pdf -TEXC := latexmk -xelatex -output-directory=$(TEMP_DIR) +DEMO_MIN_SRC = demo-minimal.tex +DEMO_MIN_PDF = demo-minimal.pdf +DOC_SRC = mtheme.dtx +DOC_PDF = mtheme.pdf +DTX = $(wildcard *.dtx) +STY = $(patsubst %.dtx,%.sty,$(wildcard beamer*.dtx pgfplotsthemetol.dtx)) +CTAN_CONTENT = $(INS) $(DTX) $(DOC_PDF) -CTAN_CONTENT = $(INS) $(DTX) $(MANUAL_PDF) +TEXC := latexmk -xelatex -output-directory=$(TEMP_DIR) DOCKER_IMAGE = latex-image DOCKER_CONTAINER = latex-container -.PHONY: sty manual demo ctan clean install uninstall docker-run docker-build docker-rm +.PHONY: sty doc demo demo-min ctan clean install uninstall docker-run docker-build docker-rm -all: sty manual demo +all: sty doc demo $(STY): $(DTX) $(INS) @latex $(INS) @@ -31,16 +31,22 @@ $(DEMO_PDF): $(STY) $(DEMO_SRC) $(TEXC) $(DEMO_SRC) @cp $(TEMP_DIR)/$(DEMO_PDF) . -$(MANUAL_PDF): $(MANUAL_SRC) - @$(TEXC) $(MANUAL_SRC) - @cp $(TEMP_DIR)/$(MANUAL_PDF) . +$(DEMO_MIN_PDF): $(STY) $(DEMO_MIN_SRC) + $(TEXC) $(DEMO_MIN_SRC) + @cp $(TEMP_DIR)/$(DEMO_MIN_PDF) . + +$(DOC_PDF): $(DOC_SRC) $(DTX) + @$(TEXC) $(DOC_SRC) + @cp $(TEMP_DIR)/$(DOC_PDF) . sty: $(STY) -manual: $(MANUAL_PDF) +doc: $(DOC_PDF) demo: $(DEMO_PDF) +demo-min: $(DEMO_MIN_PDF) + ctan: $(CTAN_CONTENT) @mkdir -p mtheme @cp $(CTAN_CONTENT) mtheme/ @@ -50,17 +56,17 @@ ctan: $(CTAN_CONTENT) clean: @git clean -xfd -install: $(STY) $(MANUAL_PDF) +install: $(STY) $(DOC_PDF) @mkdir -p $(INSTALL_DIR) @cp $(STY) $(INSTALL_DIR) - @mkdir -p $(MANUAL_DIR) - @cp $(MANUAL_PDF) $(MANUAL_DIR) + @mkdir -p $(DOC_DIR) + @cp $(DOC_PDF) $(DOC_DIR) uninstall: @rm -f $(addprefix $(INSTALL_DIR)/, $(STY)) - @rm -f $(MANUAL_DIR)/$(MANUAL_PDF) + @rm -f $(DOC_DIR)/$(DOC_PDF) @rmdir $(INSTALL_DIR) - @rmdir $(MANUAL_DIR) + @rmdir $(DOC_DIR) docker-run: docker-build docker run --rm=true --name $(DOCKER_CONTAINER) -i -t -v `pwd`:/data $(DOCKER_IMAGE) make diff --git a/demo-minimal.tex b/demo-minimal.tex new file mode 100644 index 0000000..cbbed46 --- /dev/null +++ b/demo-minimal.tex @@ -0,0 +1,49 @@ +\documentclass[10pt]{beamer} + +\usetheme{m} +\metropolisset{ + numbering=fraction, + progressbar=top, +} + +\title{A modern beamer theme} +\subtitle{} +\date{\today} +\author{Matthias Vogelgesang} +\institute{Institute or miscellaneous information} + +\begin{document} + +\maketitle + +\section{Section 1} + +\begin{frame}{Frame 1} + Content 1 +\end{frame} + +\begin{frame}{Frame 2} + Content 2 +\end{frame} + +\section{Section 2} + +\begin{frame}{Frame 3} + Content 3 + \begin{block}{Block 1} + Block 1 content + \end{block} +\end{frame} + +\metropolisset{ + block=fill, +} + +\begin{frame}{Frame 4} + Content 4 + \begin{block}{Block 2} + Block 2 content + \end{block} +\end{frame} + +\end{document}