diff --git a/tex/.vscode/ltex.dictionary.en-US.txt b/tex/.vscode/ltex.dictionary.en-US.txt new file mode 100644 index 0000000..c55e3aa --- /dev/null +++ b/tex/.vscode/ltex.dictionary.en-US.txt @@ -0,0 +1,2 @@ +Vatthauer +mycase diff --git a/tex/.vscode/settings.json b/tex/.vscode/settings.json new file mode 100644 index 0000000..fdce008 --- /dev/null +++ b/tex/.vscode/settings.json @@ -0,0 +1,27 @@ +{ + "latex-workshop.latex.tools": [ + { + "name": "latexmk-main", + "command": "latexmk", + "args": [ + "-synctex=1", + "-interaction=nonstopmode", + "-file-line-error", + "-shell-escape", + "-pdf", + "-xelatex", + "-outdir=%OUTDIR%", + "main.tex" + ], + "env": {} + } + ], + "latex-workshop.latex.recipes": [ + { + "name": "latexmk-main", + "tools": [ + "latexmk-main" + ] + } + ] +} \ No newline at end of file diff --git a/tex/Makefile b/tex/Makefile new file mode 100644 index 0000000..a6b7fd5 --- /dev/null +++ b/tex/Makefile @@ -0,0 +1,15 @@ +src = $(wildcard *.tex) +pdf = $(src:.tex=.pdf) + +.PHONY: all clean + +all: $(pdf) + +%.pdf: %.tex $(wildcard src/*.tex) $(wildcard *.bib) + latexmk -pdf -xelatex -shell-escape -file-line-error -synctex=1 -halt-on-error -shell-escape $< + +clean: + latexmk -C $(src) + rm -f $(wildcard *.out *.nls *.nlo *.bbl *.blg *-blx.bib *.run.xml *.bcf *.synctex.gz *.fdb_latexmk *.fls *.toc *.loe *.tdo *.bbl-SAVE-ERROR) + rm -f $(wildcard src/*.aux) + rm -rf $(wildcard _minted-main src/.auctex-auto _region_.prv) diff --git a/tex/main.pdf b/tex/main.pdf new file mode 100644 index 0000000..85ab2fe Binary files /dev/null and b/tex/main.pdf differ diff --git a/tex/main.tex b/tex/main.tex new file mode 100644 index 0000000..751dc81 --- /dev/null +++ b/tex/main.tex @@ -0,0 +1,115 @@ +\documentclass[a4paper,11pt,titlepage]{scrartcl} + +%%%% Document Setup +\usepackage[top=2cm,lmargin=1in,rmargin=1in,bottom=3cm,hmarginratio=1:1]{geometry} +\usepackage{scrlayer-fancyhdr} +\usepackage{extramarks} +\usepackage{anyfontsize} +\usepackage{unicode-math} +\usepackage[scale=.85]{noto-mono} % TODO find better unicode mono font +\usepackage[final]{hyperref} +\pagestyle{fancy} +\lhead{\DocTitle} +\chead{\UniCourse} +\rhead{\firstxmark} +\lfoot{\lastxmark} +\cfoot{\thepage} +\renewcommand\headrulewidth{0.4pt} +\renewcommand\footrulewidth{0.4pt} +%%%% + +%%%% Metadata +\newcommand{\DocTitle}{Lecture notes} +\newcommand{\UniCourse}{Algebra of Programming} +\newcommand{\UniProf}{Prof.\ Dr.\ Stefan Milius} +\author{Leon Vatthauer} +%%%% + +%%%% Title +\title{ + \vspace{2in} + \textmd{\textbf{\UniCourse\\\DocTitle}}\\ + \vspace{0.1in}\large{\textit{\UniProf\ }} + \vspace{3in} +} +%%%% + +%%%% Math packages +\usepackage{amsthm} +\usepackage{thmtools} +\usepackage{tikz} +\usetikzlibrary{cd, quotes} +\declaretheorem[name=Definition,style=definition,numberwithin=section]{definition} +\declaretheorem[name=Example,style=definition,sibling=definition]{example} +\declaretheorem[style=definition,numbered=no]{exercise} +\declaretheorem[name=Remark,style=definition,sibling=definition]{remark} +\declaretheorem[name=Assumption,style=definition,sibling=definition]{assumption} +\declaretheorem[name=Observation,style=definition,sibling=definition]{observation} +\declaretheorem[name=Theorem,sibling=definition]{theorem} +\declaretheorem[sibling=definition]{corollary} +\declaretheorem[name=Fact,sibling=definition]{fact} +\declaretheorem[sibling=definition]{lemma} +\declaretheorem[sibling=lemma]{proposition} +%%%% + +\makeatletter +\hypersetup{ + pdfauthor={\@author}, + pdftitle={\@title}, + % kill those ugly red rectangles around links + hidelinks, +} +\makeatother + +%%%% Custom definitions: Commands and environments + +%%% Case distinction environment +% Defines the `mycase` environment, copied from https://tex.stackexchange.com/questions/251053/how-to-use-case-1-case-2-in-a-proof-ieee-confs +\newcounter{cases} +\newcounter{subcases}[cases] +\newenvironment{mycase} +{ + \setcounter{cases}{0} + \setcounter{subcases}{0} + \newcommand{\case} + { + \par\indent\stepcounter{cases}\textbf{Case \thecases.} + } + \newcommand{\subcase} + { + \par\indent\stepcounter{subcases}\textit{Subcase (\thesubcases):} + } +} +{ + \par +} +\renewcommand*\thecases{\arabic{cases}} +\renewcommand*\thesubcases{\roman{subcases}} +%%% + +%%% Custom label command +\makeatletter +\newcommand{\customlabel}[2]{% + \protected@write \@auxout {}{\string \newlabel {#1}{{#2}{\thepage}{#2}{#1}{}} }% chktex 1 + \hypertarget{#1}{#2}% +} +\makeatother +%%% +%%%% + + +\begin{document} +%% Titlepage +\maketitle +\setcounter{page}{1} +%% + +%% TOC +\tableofcontents +\pagebreak +%% + +%% Contents + +%% +\end{document} \ No newline at end of file