From 2217f62253791f1f430f05c61ff85672d565a078 Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Tue, 25 Oct 2022 17:23:07 +0200 Subject: [PATCH] Added SW readme and latex build files --- .gitignore | 2 ++ latex/Makefile | 35 ++++++++++++++++++++++++++++ latex/README.md | 26 +++++++++++++++++++++ latex/src/thesis.tex | 54 ++++++++++++++++++++++++++++++++++++++++++++ sw/README.md | 5 ++++ 5 files changed, 122 insertions(+) create mode 100644 .gitignore create mode 100644 latex/Makefile create mode 100644 latex/README.md create mode 100644 latex/src/thesis.tex create mode 100644 sw/README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..127a77b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +latex/build/ +latex/tmp/ diff --git a/latex/Makefile b/latex/Makefile new file mode 100644 index 0000000..bb28025 --- /dev/null +++ b/latex/Makefile @@ -0,0 +1,35 @@ +BUILDDIR = build +SRCDIR = src +RESDIR = res +TEMPDIR = tmp + +CC = latexmk +CFLAGS = -pdf -shell-escape -halt-on-error + + +TARGETS = $(BUILDDIR)/thesis.pdf + + +all: precomp $(TARGETS) postcomp + +precomp: + @mkdir -p $(TEMPDIR) + @cd $(TEMPDIR) && ln -s ../$(SRCDIR)/* . + @cd $(TEMPDIR) && ln -s ../$(RESDIR)/* . + +postcomp: + @rm -r $(TEMPDIR) + +$(BUILDDIR)/thesis.pdf: $(TEMPDIR)/thesis.tex + $(CC) $(CFLAGS) -output-directory=../$(BUILDDIR) -cd $< + +f: clean all + +clean: + rm -r $(BUILDDIR) + +show: + okular $(TARGETS) & + + +.PHONY: all precomp postcomp show clean f diff --git a/latex/README.md b/latex/README.md new file mode 100644 index 0000000..04a274c --- /dev/null +++ b/latex/README.md @@ -0,0 +1,26 @@ +# Bachelorarbeit + +## Latex Quellcode + +#### Kompilieren + +Durch ausführen des Befehls +```bash +$ make +``` +wird ein neuer `build` ordner erstellt, in welchem das kompilierte Dokument, +`thesis.pdf` zu finden ist. + +Wenn der `build` ordner bereits existiert, kann +```bash +$ make f +``` +genutzt werden, um eine neu-Kompilierung zu erzwingen. + +#### Auto-Formatierung + +Die Auto-Formatierung scheint aus Gründen manchmal noch nicht richtig zu funktionieren + +```bash +$ latexindent -w -s -l -m [filename] -c build +``` diff --git a/latex/src/thesis.tex b/latex/src/thesis.tex new file mode 100644 index 0000000..4d462f1 --- /dev/null +++ b/latex/src/thesis.tex @@ -0,0 +1,54 @@ +% +% Default template copied from Overleaf +% + + +%-------------------- +% Packages +% ------------------- +\documentclass[11pt,a4paper]{article} +\usepackage[utf8x]{inputenc} +\usepackage[T1]{fontenc} +%\usepackage{gentium} +\usepackage{mathptmx} % Use Times Font + + +\usepackage[pdftex]{graphicx} % Required for including pictures +\usepackage[swedish]{babel} % Swedish translations +\usepackage[pdftex,linkcolor=black,pdfborder={0 0 0}]{hyperref} % Format links for pdf +\usepackage{calc} % To reset the counter in the document after title page +\usepackage{enumitem} % Includes lists + +\frenchspacing % No double spacing between sentences +\linespread{1.2} % Set linespace +\usepackage[a4paper, lmargin=0.1666\paperwidth, rmargin=0.1666\paperwidth, tmargin=0.1111\paperheight, bmargin=0.1111\paperheight]{geometry} %margins +%\usepackage{parskip} + +\usepackage[all]{nowidow} % Tries to remove widows +\usepackage[protrusion=true,expansion=true]{microtype} % Improves typography, load after fontpackage is selected + +\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template + + +%----------------------- +% Set pdf information and add title, fill in the fields +%----------------------- +\hypersetup{ +pdfsubject = {}, +pdftitle = {}, +pdfauthor = {} +} + +%----------------------- +% Begin document +%----------------------- +\begin{document} %All text i dokumentet hamnar mellan dessa taggar, allt ovanför är formatering av dokumentet + +\section{Introduction} + +\lipsum[1-3] + + +\subsection*{Subtitle} +\lipsum[4-5] +\end{document} diff --git a/sw/README.md b/sw/README.md new file mode 100644 index 0000000..abf10aa --- /dev/null +++ b/sw/README.md @@ -0,0 +1,5 @@ +# Bachelorarbeit + +## Software + +`TODO`