From 305fcfdc2031aff0f53aabe787c282b699fe2ac3 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Thu, 3 Nov 2016 19:44:14 +0100 Subject: [PATCH] Make preamble --- .gitignore | 4 ++++ Makefile | 28 ++++++++++++++++++++-------- make.tex | 23 +---------------------- preamble.tex | 22 ++++++++++++++++++++++ 4 files changed, 47 insertions(+), 30 deletions(-) create mode 100644 preamble.tex diff --git a/.gitignore b/.gitignore index 211afd9..e13ad12 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,7 @@ *.snm *.nav *.toc +*.mlog +*.ps* +*.fmt +*.dvi diff --git a/Makefile b/Makefile index f62a2c6..fa986e7 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,24 @@ -DOCUMENTS:=make -PDFLATEXFLAGS:=-halt-on-error -PDFLATEX:=pdflatex $(PDFLATEXFLAGS) +DOC:=make +LATEX:=latex +LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape -all: $(addsuffix .pdf,$(DOCUMENTS)) +TEXS:=$(wildcard *.tex) -%.pdf: %.tex - $(PDFLATEX) $< - $(PDFLATEX) $< +.PHONY: all +.SECONDARY: $(DOC).fmt + +all: $(DOC).dvi + +%.fmt: preamble.tex + $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump" + +%.ps.gz: %.dvi + dvips -o- $< | gzip -9 > $@ + +%.dvi: %.tex %.fmt $(TEXS) + $(LATEX) $(LATEXFLAGS) $< | tee $(basename $<).mlog + grep -qF '(rerunfilecheck)' $(basename $<).mlog &&\ + $(LATEX) $(LATEXFLAGS) $< || true clean: - $(RM) -v $(addprefix $(DOCUMENTS).,pdf log aux nav toc out snm) + $(RM) $(addprefix $(DOC).,dvi pdf log aux nav toc out snm mlog fmt ps*) diff --git a/make.tex b/make.tex index f3f4cd1..de70cff 100644 --- a/make.tex +++ b/make.tex @@ -1,25 +1,4 @@ -\documentclass{beamer} - -\usepackage{url} -\usepackage[british]{isodate} - -\newcommand{\Make}{\textsc{make}} - -\AtBeginSection[]{ - \begin{frame} - \frametitle{Table of Contents} - \tableofcontents[currentsection] - \end{frame} -} - -\author[Lubbers M]{Mart Lubbers\inst{1}} -\institute{\inst{1}\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}} - -\title[\Make]{(GNU) \Make{} (Files)} - -\subtitle{\url{https://www.gnu.org/software/make/}} -\date[LUGN50]{\printdate{08.11.2016}} - +%&make \begin{document} \frame{\maketitle} diff --git a/preamble.tex b/preamble.tex new file mode 100644 index 0000000..bda3f32 --- /dev/null +++ b/preamble.tex @@ -0,0 +1,22 @@ +\documentclass{beamer} + +\usepackage{geometry} +\usepackage{hyperref} +\usepackage[british]{isodate} + +\newcommand{\Make}{\textsc{make}} + +\AtBeginSection[]{ + \begin{frame} + \frametitle{Table of Contents} + \tableofcontents[currentsection] + \end{frame} +} + +\author[Lubbers M]{Mart Lubbers\inst{1}} +\institute{\inst{1}\href{mailto:mart@martlubbers.net}{mart@martlubbers.net}} + +\title[\Make]{(GNU) \Make{} (Files)} + +\subtitle{\url{https://www.gnu.org/software/make/}} +\date[LUGN50]{\printdate{08.11.2016}} -- 2.20.1