commit 1b85697938768767d33d067dd0ba0d0a1395dea8 Author: Simon Bruder Date: Sat Oct 3 14:56:13 2020 +0200 Initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..0dc31a4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,8 @@ +kind: pipeline +name: default +type: exec + +steps: + - name: build + commands: + - nix-build diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..1d953f4 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..61d42e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +*.aux +*.bbl +*.bcf +*.blg +*.fdb_latexmk +*.fls +*.log +*.out +*.pdf +*.run.xml +*.synctex.gz +*.toc +*.xdv + +/result +/textidote.html diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..edcb984 --- /dev/null +++ b/Makefile @@ -0,0 +1,17 @@ +seminararbeit.pdf: seminararbeit.tex bibliography.bib + latexmk -xelatex seminararbeit.tex + +.PHONY: clean +clean: + rm -f \ + *.aux \ + *.bbl \ + *.blg \ + *.fdb_latexmk \ + *.fls \ + *.log \ + *.out \ + *.pdf \ + *.synctex.gz \ + *.toc \ + *.xdv diff --git a/bibliography.bib b/bibliography.bib new file mode 100644 index 0000000..ceaabbd --- /dev/null +++ b/bibliography.bib @@ -0,0 +1,7 @@ +@book{latexcompanion, + author = "Michel Goossens and Frank Mittelbach and Alexander Samarin", + title = "The \LaTeX\ Companion", + year = "1993", + publisher = "Addison-Wesley", + address = "Reading, Massachusetts" +} diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..f2a6ab3 --- /dev/null +++ b/default.nix @@ -0,0 +1,28 @@ +{ pkgs ? import {} }: + +let + texlive = pkgs.texlive.combine { + inherit (pkgs.texlive) scheme-medium + biber + biblatex + biblatex-iso690 + csquotes + datetime2 + datetime2-german + lipsum; + }; +in +pkgs.stdenv.mkDerivation { + name = "seminararbeit.pdf"; + + nativeBuildInputs = [ + texlive + ]; + + src = pkgs.nix-gitignore.gitignoreSource [] ./.; + + # We only build a PDF + dontFixup = true; + + installPhase = "cp $name $out"; +} diff --git a/seminararbeit.tex b/seminararbeit.tex new file mode 100644 index 0000000..48cf666 --- /dev/null +++ b/seminararbeit.tex @@ -0,0 +1,71 @@ +%! TEX program = xelatex +\documentclass{scrreprt} + +\KOMAoptions{ + %twocolumn=on, + %DIV=24, + parskip=half, + twoside=on, +} + +% hyphenation +\usepackage[ngerman]{babel} + +% hyperlinks and pdf toc +\usepackage[unicode, hidelinks]{hyperref} +\usepackage{bookmark} + +% cretion of nice dates from numbers +\usepackage[useregional]{datetime2} + +% dummy text +\usepackage{lipsum} + +% roman font for title +\addtokomafont{disposition}{\rmfamily} + +% heading +\usepackage[automark, headsepline]{scrlayer-scrpage} +\pagestyle{scrheadings} + +% bibliography +\usepackage{csquotes} +\usepackage[ + style=iso-authoryear, +]{biblatex} +\addbibresource{bibliography.bib} + +\subject{Seminararbeit} +\title{Titel der Arbeit} +\subtitle{Untertitel} +\author{Simon Bruder} +\date{\DTMdisplaydate{2021}{01}{01}{-1}} + +\begin{document} +\maketitle + +% pre +\pagenumbering{Roman} +\phantomsection{} +\addcontentsline{toc}{chapter}{Inhaltsverzeichnis} +\tableofcontents{} + +% main +\clearpage{} +\pagenumbering{arabic} + +\chapter{Einleitung} + +\section{lol} +\lipsum + +\section{foo} +\lipsum\cite{latexcompanion} + +% bibliography +\clearpage +\phantomsection +\addcontentsline{toc}{chapter}{Literatur} +\printbibliography + +\end{document} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..95da550 --- /dev/null +++ b/shell.nix @@ -0,0 +1 @@ +import ./default.nix