From 660aa56a1778e719f586a81f7476698557e8e907 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 24 Aug 2022 17:24:49 +0200 Subject: [PATCH] thesis: makefile and subfiles update --- documents/thesis/Makefile | 20 +++++++++++++++--- documents/thesis/chapters/Makefile | 20 ++++++++++++++++++ documents/thesis/chapters/airshowers.tex | 8 ++++++- .../thesis/chapters/beacon_discipline.tex | 3 ++- documents/thesis/chapters/conclusion.tex | 8 ++++++- .../chapters/grand_characterisation.tex | 8 ++++++- documents/thesis/chapters/introduction.tex | 8 ++++++- documents/thesis/chapters/timing.tex | 8 ++++++- documents/thesis/chapters/titlepage.tex | 8 ++++++- documents/thesis/thesis.tex | 21 +++++++++++-------- 10 files changed, 93 insertions(+), 19 deletions(-) create mode 100644 documents/thesis/chapters/Makefile diff --git a/documents/thesis/Makefile b/documents/thesis/Makefile index 449c34a..42fd566 100644 --- a/documents/thesis/Makefile +++ b/documents/thesis/Makefile @@ -1,21 +1,35 @@ # vim:ft=make -include config.mk -.PHONY: all clean dist-clean +.PHONY: all clean dist-clean chapters chapters-clean ### Variables MAIN_SRC ?= main.tex TEXENGINE ?= latexmk --pdf +CHAPTERS_DIR = ./chapters + MAIN_TARGET = $(patsubst %.tex,%.pdf,$(MAIN_SRC)) +CHAPTER_SRC = $(wildcard $(CHAPTERS_DIR)/*.tex) +CHAPTER_TARGET = $(patsubst %.tex,%.pdf,$(CHAPTER_SRC)) +CHAPTER_TARGET_NAMES = $(notdir $(CHAPTER_TARGET)) ### Targets all: $(MAIN_TARGET) dist: all clean -$(MAIN_TARGET): $(MAIN_SRC) - $(TEXENGINE) $^ +chapters: $(CHAPTER_TARGET) + make -C "chapters" all +chapters-clean: + make -C "chapters" clean + +$(CHAPTER_TARGET) $(CHAPTER_TARGET_NAMES) : %.pdf: + #$(TEXENGINE) -cd $^ + make -C "chapters" $(patsubst $(CHAPTERS_DIR),,$@) + +$(MAIN_TARGET): $(MAIN_SRC) $(CHAPTER_SRC) + $(TEXENGINE) $< dist-clean: clean @rm -vf *.pdf *.eps *.dvi *.ps diff --git a/documents/thesis/chapters/Makefile b/documents/thesis/chapters/Makefile new file mode 100644 index 0000000..67629ea --- /dev/null +++ b/documents/thesis/chapters/Makefile @@ -0,0 +1,20 @@ +# vim:ft=make +.PHONY: all clean dist-clean + +TEXENGINE ?= latexmk --pdf + +SOURCES = $(wildcard *.tex) +OBJECTS = $(patsubst %.tex,%.pdf,$(SOURCES)) + +all: $(OBJECTS) + +dist: all clean + +$(OBJECTS): %.pdf: %.tex + $(TEXENGINE) $^ + +dist-clean: clean + @rm -vf *.pdf *.eps *.dvi *.ps + +clean: + @rm -vf *.dat *.log *.out *.aux *.nav *.snm *.toc *.vrb *~ *.fls *.fdb_latexmk *-blx.bib *.bbl *.blg *.run.xml diff --git a/documents/thesis/chapters/airshowers.tex b/documents/thesis/chapters/airshowers.tex index c88d1c7..1e385e4 100644 --- a/documents/thesis/chapters/airshowers.tex +++ b/documents/thesis/chapters/airshowers.tex @@ -1,4 +1,10 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} + +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} \begin{document} \chapter{Airshowers} diff --git a/documents/thesis/chapters/beacon_discipline.tex b/documents/thesis/chapters/beacon_discipline.tex index b47e71d..9e1e0d5 100644 --- a/documents/thesis/chapters/beacon_discipline.tex +++ b/documents/thesis/chapters/beacon_discipline.tex @@ -1,4 +1,5 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} +\graphicspath{{.}{../../../figures/}} \begin{document} \chapter{Disciplining by Beacon} diff --git a/documents/thesis/chapters/conclusion.tex b/documents/thesis/chapters/conclusion.tex index 6326c2e..c52096d 100644 --- a/documents/thesis/chapters/conclusion.tex +++ b/documents/thesis/chapters/conclusion.tex @@ -1,4 +1,10 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} + +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} \begin{document} \chapter{Conclusion} diff --git a/documents/thesis/chapters/grand_characterisation.tex b/documents/thesis/chapters/grand_characterisation.tex index 3c52d09..abf55b5 100644 --- a/documents/thesis/chapters/grand_characterisation.tex +++ b/documents/thesis/chapters/grand_characterisation.tex @@ -1,4 +1,10 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} + +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} \begin{document} \chapter{GRAND characterisation} diff --git a/documents/thesis/chapters/introduction.tex b/documents/thesis/chapters/introduction.tex index df7ca42..386102c 100644 --- a/documents/thesis/chapters/introduction.tex +++ b/documents/thesis/chapters/introduction.tex @@ -1,4 +1,10 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} + +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} \begin{document} \chapter{Introduction} diff --git a/documents/thesis/chapters/timing.tex b/documents/thesis/chapters/timing.tex index d4bb75c..03fb86e 100644 --- a/documents/thesis/chapters/timing.tex +++ b/documents/thesis/chapters/timing.tex @@ -1,4 +1,10 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} + +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} \begin{document} \chapter{Timing Mechanisms} diff --git a/documents/thesis/chapters/titlepage.tex b/documents/thesis/chapters/titlepage.tex index 5608e2c..cc5e536 100644 --- a/documents/thesis/chapters/titlepage.tex +++ b/documents/thesis/chapters/titlepage.tex @@ -1,4 +1,10 @@ -\documentclass[../main.tex]{subfiles} +\documentclass[../thesis.tex]{subfiles} + +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} % Thesis titling \def\thesistitle{Enhancing Timing Accuracy \\[0.3cm] in Air Shower Radio Detectors} diff --git a/documents/thesis/thesis.tex b/documents/thesis/thesis.tex index ab1d33b..783409d 100644 --- a/documents/thesis/thesis.tex +++ b/documents/thesis/thesis.tex @@ -16,8 +16,12 @@ % Graphics \usepackage{xcolor} \usepackage{graphicx} -\graphicspath{{.}{../../figures/}} \usepackage{epstopdf} +\graphicspath{ + {.} + {../../figures/} + {../../../figures/} +} \usepackage{caption} \usepackage{subcaption} @@ -65,19 +69,18 @@ % Math \newcommand{\dif}[1]{\mathop{}\!\mathrm{d} #1} \newcommand{\pdif}[1]{\mathop{}\!\mathrm{\partial} #1} -\newcommand{\dbyd}[2]{\ensuremath{\mathrm{d}{#1}/\mathrm{d}{#2}}\xspace} +\newcommand{\dbyd}[2]{\ensuremath{\mathrm{d}{#1}/\mathrm{d}{#2}}} % Units -\newcommand{\eV}{\text{e\kern-0.15exV}\xspace} -\newcommand{\MeV}{\text{M\eV}\xspace} -\newcommand{\GeV}{\text{G\eV}\xspace} -\newcommand{\TeV}{\text{T\kern-0.1ex\eV}\xspace} +\newcommand{\eV}{\text{e\kern-0.15exV}} +\newcommand{\MeV}{\text{M\eV}} +\newcommand{\GeV}{\text{G\eV}} +\newcommand{\TeV}{\text{T\kern-0.1ex\eV}} -\newcommand{\ns}{\text{ns}\xspace} - -\newcommand{\MHz}{\text{MHz}\xspace} +\newcommand{\ns}{\text{ns}} +\newcommand{\MHz}{\text{MHz}} %%%%%%%%%%%%%%%%%%% Start Document %%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%