132 Zeilen
3.5 KiB
TeX
132 Zeilen
3.5 KiB
TeX
\NeedsTeXFormat{LaTeX2e}
|
|
\ProvidesPackage{abschlussarbeit}[2018/02/20 Latextemplate für Abschlussarbeiten]
|
|
\LoadClass{scrreprt}
|
|
%die Benötigten Pakete
|
|
\RequirePackage{datetime} %Zeit
|
|
\RequirePackage{xparse} % Argumentparsing
|
|
\RequirePackage[ngerman]{babel} % Deutsche Sprache
|
|
\RequirePackage{blindtext} % Blindtext
|
|
\RequirePackage{scrlayer-scrpage} % Paket zur besseren Kompatibelität mit anderen Paketen
|
|
\RequirePackage[
|
|
backend=biber,
|
|
sorting=nty,
|
|
style=numeric-comp,
|
|
block=ragged
|
|
]{biblatex} % Quellen
|
|
\RequirePackage{csquotes} % Zitate
|
|
\RequirePackage{graphicx} % Grafiken
|
|
\RequirePackage[rightcaption]{sidecap} % Bessere Darstellung von Graphiken
|
|
\RequirePackage[xetex, cmyk, dvipsnames, table]{xcolor} % Farben
|
|
\RequirePackage{hyperref} % Links
|
|
\RequirePackage[printonlyused]{acronym} % Akronyme
|
|
\RequirePackage{ifxetex} % XeTeX Spezifische Optionen
|
|
\RequirePackage{wrapfig} % Platz vom Text
|
|
\RequirePackage{nameref} % namensreferenzen
|
|
\RequirePackage{float} % verhindert das Tabellen ans Ende fliegen
|
|
\RequirePackage[outputdir=build,section]{minted} % Quellcode listings
|
|
\usepackage{arydshln} % Tabellendeko
|
|
% KOMA-Konfiguration
|
|
\KOMAoptions{
|
|
fontsize=11pt,
|
|
captions=tablesignature,
|
|
toc=flat,
|
|
numbers=enddot
|
|
}
|
|
\addtokomafont{caption}{\small\bfseries}
|
|
%minted Konfig
|
|
\definecolor{LightGray}{gray}{0.8}
|
|
\setminted{
|
|
bgcolor=LightGray,
|
|
breakanywhere=true,
|
|
breaklines=true,
|
|
encoding=utf-8,
|
|
tabsize=4,
|
|
python3=true,
|
|
autogobble=true,
|
|
linenos,
|
|
fontsize=\footnotesize
|
|
}
|
|
\makeatletter
|
|
\makeatother
|
|
% PDF-Konfiguration
|
|
\makeatletter
|
|
\let\orgdescriptionlabel\descriptionlabel
|
|
\renewcommand*{\descriptionlabel}[1]{%
|
|
\let\orglabel\label
|
|
\let\label\@gobble
|
|
\phantomsection
|
|
\edef\@currentlabel{#1}%
|
|
%\edef\@currentlabelname{#1}%
|
|
\let\label\orglabel
|
|
\orgdescriptionlabel{#1}%
|
|
}
|
|
\AtBeginDocument{
|
|
\hypersetup{
|
|
pdfauthor={\@author},
|
|
pdftitle={\@title},
|
|
pdfsubject={Abschlussarbeit},
|
|
pdfcreator={\@author},
|
|
hidelinks,
|
|
linktoc=page
|
|
}
|
|
\let\runauthor\@author
|
|
\let\runtitle\@title
|
|
\let\runsubtitle\@subtitle
|
|
}
|
|
\makeatother
|
|
%einstellungen für verzeichnisse
|
|
\defbibheading{bibliography}{\section{#1}}
|
|
\renewcommand{\mkccitation}[1]{\textsuperscript{#1}}
|
|
\makeatletter
|
|
\renewcommand\listoffigures{
|
|
\section{\listfigurename}
|
|
\@mkboth{\MakeUppercase\listfigurename}
|
|
{\MakeUppercase\listfigurename}
|
|
\@starttoc{lof}
|
|
}
|
|
\renewcommand\listoftables{
|
|
\section{\listtablename}
|
|
\@mkboth{\MakeUppercase\listtablename}
|
|
{\MakeUppercase\listtablename}
|
|
\@starttoc{lot}
|
|
|
|
}
|
|
\makeatother
|
|
%Bilder
|
|
\NewDocumentCommand{\bild}{m o o}{
|
|
\begin{wrapfigure}{r}{0.4\textwidth}
|
|
\centering
|
|
\includegraphics[width=0.4\textwidth]{#1}
|
|
\IfNoValueF{#2}{
|
|
\caption{#2}
|
|
\IfNoValueF{#3}{
|
|
\label{bild:#3}
|
|
}
|
|
}
|
|
\end{wrapfigure}
|
|
}
|
|
%Seitenstileinstellungen
|
|
\RequirePackage[
|
|
a4paper,
|
|
left=2.5cm,
|
|
right=2.5cm,
|
|
top=2.5cm,
|
|
bottom=2.5cm,
|
|
head=21pt,
|
|
]{geometry}
|
|
\setlength{\footheight}{21pt}
|
|
\linespread{1.5}
|
|
\RedeclareSectionCommand[beforeskip=0pt,afterskip=0cm]{chapter}
|
|
\RedeclareSectionCommand[beforeskip=0pt,afterskip=10pt]{section}
|
|
%Fonts
|
|
\ifxetex
|
|
\RequirePackage[no-config]{fontspec}
|
|
\RequirePackage{noto}
|
|
\else
|
|
\RequirePackage[T1]{fontenc}
|
|
\RequirePackage[utf8]{inputenc}
|
|
\fi
|
|
%Kommandos
|
|
\newcommand{\cori}{\textsuperscript{\textcopyright}}
|
|
\newcommand{\regi}{\textsuperscript{\textregistered}}
|