Create template
This commit is contained in:
parent
1615b0d254
commit
1cae1942f3
5 changed files with 159 additions and 0 deletions
2
tex/.vscode/ltex.dictionary.en-US.txt
vendored
Normal file
2
tex/.vscode/ltex.dictionary.en-US.txt
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Vatthauer
|
||||||
|
mycase
|
27
tex/.vscode/settings.json
vendored
Normal file
27
tex/.vscode/settings.json
vendored
Normal file
|
@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
15
tex/Makefile
Normal file
15
tex/Makefile
Normal file
|
@ -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)
|
BIN
tex/main.pdf
Normal file
BIN
tex/main.pdf
Normal file
Binary file not shown.
115
tex/main.tex
Normal file
115
tex/main.tex
Normal file
|
@ -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}
|
Loading…
Reference in a new issue