From f49badf6a5278985a9bfad7b35771af756829096 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Thu, 25 Aug 2022 16:04:54 +0200 Subject: [PATCH] thesis: extract preambule --- documents/thesis/Makefile | 2 +- documents/thesis/preamble.tex | 82 +++++++++++++++++++++++++++++++++++ documents/thesis/thesis.tex | 80 +++------------------------------- 3 files changed, 89 insertions(+), 75 deletions(-) create mode 100644 documents/thesis/preamble.tex diff --git a/documents/thesis/Makefile b/documents/thesis/Makefile index 42fd566..bfe6ec9 100644 --- a/documents/thesis/Makefile +++ b/documents/thesis/Makefile @@ -28,7 +28,7 @@ $(CHAPTER_TARGET) $(CHAPTER_TARGET_NAMES) : %.pdf: #$(TEXENGINE) -cd $^ make -C "chapters" $(patsubst $(CHAPTERS_DIR),,$@) -$(MAIN_TARGET): $(MAIN_SRC) $(CHAPTER_SRC) +$(MAIN_TARGET): $(MAIN_SRC) $(CHAPTER_SRC) preamble.tex $(TEXENGINE) $< dist-clean: clean diff --git a/documents/thesis/preamble.tex b/documents/thesis/preamble.tex new file mode 100644 index 0000000..0b7c713 --- /dev/null +++ b/documents/thesis/preamble.tex @@ -0,0 +1,82 @@ +%% +%% Thesis Preamble +%% + + +%%% +%%% Packages +%%% + +% For Bibliography +\usepackage[sorting=none,natbib=true,citestyle=numeric-comp,backend=bibtex]{biblatex} + +% Document +\usepackage{amsmath} +\usepackage{mathtools} +%\usepackage{cancel} +\usepackage{todo} + +% Graphics +\usepackage{xcolor} +\usepackage{graphicx} +\usepackage{epstopdf} + +\usepackage{caption} +\usepackage{subcaption} +\usepackage[colorlinks=true]{hyperref} +\usepackage{cleveref} +\usepackage{grffile} + +\usepackage[english]{babel} % for proper word breaking at line ends +\usepackage[switch]{lineno} + +%\usepackage{listings} +\usepackage{csquotes} +\usepackage[margin=1.0in]{geometry} +\usepackage[nobottomtitles]{titlesec} +\usepackage{subfiles} + + +%%% +%%% Settings +%%% + +\titleformat{\chapter}[hang] % shape +{\normalfont\bfseries\huge} % format +{\thechapter.} % label +{0.5ex} % sep +{ +} % before-code +[ +] % after-code + +\setlength{\parindent}{0cm} + + +%%% +%%% Shortcuts +%%% + +\newcommand*{\captionsource}[2]{% + \caption[{#1}]{% + #1% + \\\hspace{\linewidth}% + \textbf{Source:} #2% + }% +} + +% 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}}} + + +% Units +\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}} + +\newcommand{\MHz}{\text{MHz}} diff --git a/documents/thesis/thesis.tex b/documents/thesis/thesis.tex index 783409d..6fe6a77 100644 --- a/documents/thesis/thesis.tex +++ b/documents/thesis/thesis.tex @@ -1,86 +1,18 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%% Document %%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[notitlepage,oneside]{book} -% Pre-Ambule -% For Bibliography -\usepackage[sorting=none,natbib=true,citestyle=numeric-comp,backend=bibtex]{biblatex} + +\input{preamble.tex} + +%% +%% Attach resources +%% \addbibresource{../../bibliotheca/bibliography.bib} - -% Document -\usepackage{subfiles} -\usepackage{amsmath} -\usepackage{mathtools} -%\usepackage{cancel} -\usepackage{todo} - -% Graphics -\usepackage{xcolor} -\usepackage{graphicx} -\usepackage{epstopdf} \graphicspath{ - {.} {../../figures/} {../../../figures/} } -\usepackage{caption} -\usepackage{subcaption} -\usepackage[colorlinks=true]{hyperref} -\usepackage{cleveref} -\usepackage{grffile} - -\usepackage[english]{babel} % for proper word breaking at line ends -\usepackage[switch]{lineno} - -%\usepackage{listings} -\usepackage{csquotes} -\usepackage[margin=1.0in]{geometry} -\usepackage[nobottomtitles]{titlesec} - - - - -%%%%%%%%%%%%%%%%%%% Settings %%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\titleformat{\chapter}[hang] % shape -{\normalfont\bfseries\huge} % format -{\thechapter.} % label -{0.5ex} % sep -{ -} % before-code -[ -] % after-code - -\setlength{\parindent}{0cm} - - - - -%%%%%%%%%%%%%%%%%%% Shortcuts %%%%%%%%%%%%%%%%%% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\newcommand*{\captionsource}[2]{% - \caption[{#1}]{% - #1% - \\\hspace{\linewidth}% - \textbf{Source:} #2% - }% -} - -% 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}}} - - -% Units -\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}} - -\newcommand{\MHz}{\text{MHz}} %%%%%%%%%%%%%%%%%%% Start Document %%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%