template clean-up

This commit is contained in:
Johannes Demel
2015-12-14 15:44:08 +01:00
parent a5778bc476
commit cbcf433e37
2 changed files with 22 additions and 233 deletions

View File

@@ -1,3 +1,4 @@
% Author: Johannes Demel
% This file requires quite a few texlive packages.
% texlive-lang-german / texlive-lang-european
% texlive-science
@@ -30,6 +31,7 @@
\newcommand{\thesisSignatureDate}[1]{\def \theThesisSignatureDate{#1}}
\newcommand{\thesisLanguage}[1]{\def \theThesisLanguage{#1}}
\newcommand{\thesisCC}[1]{\def \theThesisCC{#1}}
\newcommand{\thesisPythonWatermark}[1]{\def \theThesisPythonWatermark{#1}}
% Defaults
\thesisTitle{Random Thesis Title}
\thesisType{Master Thesis Type}
@@ -41,6 +43,7 @@
\thesisSignatureDate{dd.mm.yyyy}
\thesisLanguage{english}
\thesisCC{FALSE}
\thesisPythonWatermark{FALSE}
\def\dictThesisLanguageGerman{ngerman}
\def\dictThesisLanguageEnglish{english}
@@ -52,54 +55,38 @@
\usepackage[T1]{fontenc} % encoding for target files.
\usepackage[utf8]{inputenc} % UTF-8 encoding for source files
\usepackage[\theThesisLanguage]{babel}
\usepackage{pythontex}
\usepackage[printonlyused]{acronym} % use this package for abbreviations!
% Print Watermark! CAREFUL: if does not work %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % \ifx\theThesisPythonWatermark\dictThesisTRUE
% \usepackage{draftwatermark}
% \SetWatermarkText{\includegraphics{cel-thesis/logos/watermark_thesis.pdf}}
% \SetWatermarkScale{1.0}
% \SetWatermarkAngle{0}
% % \fi
% Math and Symbols %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb, amsfonts, latexsym}
\usepackage[fleqn]{amsmath}
\usepackage[right]{eurosym}
\usepackage{siunitx}
\ifx\theThesisLanguage\dictThesisLanguageEnglish
\sisetup{%
binary-units = true,
% load-configurations=binary,
% load-configurations=abbreviations,
% per-mode=fraction,
% fraction-function=\sfrac, % braucht Paket »xfrac«
% \ifx\theThesisLanguage\dictThesisLanguageEnglish output-decimal-marker={.} \else output-decimal-marker={,} \fi
output-decimal-marker={.}
}
% fft symbol
\usepackage{trfsigns}
\def\korrts{\quad \laplace \quad }
% (Matrixnotation aus NT1-/WT-Buch)
\def\matrixnue#1{%
\setbox200=\hbox{#1}%
\setbox201=\vbox{#1}%
\setbox202=\vsplit201 to .5\ht201
\vbox{\normalbaselines%
{\hrule width 1.2\wd200
\hbox{\vrule height.6\ht202 \kern1.15\wd200 \vrule height.6\ht202}}%
\kern-1.7\ht202%
\hbox{\kern.1\wd200 #1}}%
}
\def\matrixnue#1{%
\ifmeasuring@#1\else
\sbox0{$\displaystyle#1$}\rlap{%
\rule[\dimexpr\ht0+0.5pt\relax]{0.5pt}{.4ex}%
\rule[\dimexpr\ht0+.4ex\relax]{1.1\wd0}{0.5pt}%
\rule[\dimexpr\ht0+0.5pt\relax]{0.5pt}{.4ex}%
}\box0
\fi
}
\newcommand{\mybinom}[2]{%
\Big(\hspace*{-1ex}\begin{array}{c}%
#1\\[-1ex]#2%
\end{array}\hspace*{-1ex}\Big)\,%
\else
\sisetup{%
binary-units = true,
output-decimal-marker={,}
}
\fi
%% Define always missing math symbols.
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmax}{\arg\!\max}
\DeclareMathOperator\sign{sign}
% Graphics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Ueberschriften fett
@@ -111,6 +98,7 @@
\usepackage{graphicx}
\usepackage{color}
\usepackage{pgf, tikz, pgfplots}
\usetikzlibrary{shapes,arrows}
\pgfplotsset{compat=1.9}
% Layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -123,49 +111,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Schalter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Seitentrennung
\newboolean{onePerSheet}
\setboolean{onePerSheet}{false}
\ifdefined\argOnePerSheet\setboolean{onePerSheet}{true}\fi
\newcommand{\onePerSheet}{\ifdefined\argForce\else\setboolean{onePerSheet}{true}\fi}
% Anzeige der Korrektoren
\newboolean{showNames}
\setboolean{showNames}{false}
\ifdefined\argShowNames\setboolean{showNames}{true}\fi
\newcommand{\showNames}{\ifdefined\argForce\else\setboolean{showNames}{true}\fi}
% Anzeige der Lösung
\newboolean{showSolution}
\setboolean{showSolution}{false}
\ifdefined\argShowSolution\setboolean{showSolution}{true}\fi
\newcommand{\showSolution}{\ifdefined\argForce\else\setboolean{showSolution}{true}\fi}
% Anzeige der Punkte
\newboolean{showPoints}
\setboolean{showPoints}{false}
\ifdefined\argShowPoints\setboolean{showPoints}{true}\fi
\newcommand{\showPoints}{\ifdefined\argForce\else\setboolean{showPoints}{true}\fi}
% Anzeige des Einsicht Titelblatts
\newboolean{showReview}
\setboolean{showReview}{false}
\ifdefined\argShowReview
\setboolean{showReview}{true}
\setboolean{showSolution}{true}
\setboolean{showPoints}{true}
\fi
\newcommand{\showReview}{\ifdefined\argForce\else
\setboolean{showReview}{true}
\setboolean{showSolution}{true}
\setboolean{showPoints}{true}
\fi}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Titel
% Create titlepage and optional parts like a CC statement.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\header}{%
\includegraphics[width=40mm,valign=c]{cel-thesis/logos/kitlogo_de_rgb}%
@@ -220,160 +166,3 @@
\makestatutorydeclaration
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Aufgaben
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % \newcommand{\points}[1]{\def \thePointsMax {#1}}
% % \titleformat{\section}[runin]{\Large\bfseries\vspace{1em}}{}{0pt}{#1}
% % \newcommand{\aufgabe}[1][]%
% % {%
% % \ifthenelse{\boolean{onePerSheet}}{%
% % \clearpage%
% % \ifthenelse{\isodd{\thepage}}{}{\null\newpage}%
% % }{%
% % \ifthenelse{\boolean{showSolution}}{\clearpage}{}%
% % }%
% % \section{Aufgabe \thesection}%
% % \ifshowNames%
% % \hspace{1em}\textmd{\normalsize\color{red} (#1)}%
% % \else%
% % \mbox{}%
% % \fi%
% % \\[1.2ex]%
% % \setcounter{teilaufgabenInAufgabe}{0}%
% % \points{\thePointsPerExercise}
% % }
%
%
%
\makeatletter
% The command writes onto the aux file
\def\setTeilaufgabenCount#1#2{\@bsphack
\protected@write\@mainaux{}%
{\string\updateTeilaufgabenCount{#1}{#2}}%
\@esphack}
\def\updateTeilaufgabenCount#1#2{%
\expandafter\xdef\csname tafc@#1\endcsname{#2}}
\def\totalTeilaufgabenCount#1{%
\expandafter\ifx\csname tafc@#1\endcsname\relax0\else
\csname tafc@#1\endcsname\fi}
%\AtEndDocument{\def\newreference#1#2{%
% \edef\reserved@a{#2}%
% \expandafter\ifnum\csname tafc@#1\endcsname>\reserved@a\else
% \@tempswatrue\fi}}
\makeatother
%
%
%
\newcounter{punkteinAufgabe}
\newcounter{teilaufgabenInAufgabe}
%
\newenvironment{teilaufgaben}{
\begin{enumerate}
%\addtocounter{Aufgabe\thesection}{\letzterwert}
\setcounter{enumi}{\value{teilaufgabenInAufgabe}}
\setlength{\itemsep}{0pt}
%\setlength{\parskip}{0pt}
%\setlength{\parsep}{0pt}
}{
\setcounter{teilaufgabenInAufgabe}{\value{enumi}}
\setTeilaufgabenCount{Aufgabe\thesection}{\the\value{enumi}}
\ifnum \the\value{enumi}=0\totalTeilaufgabenCount{Aufgabe\thesection}
\checkPunkte
\fi
\end{enumerate}
}
%
% Item command mit Punktezählen und bei Bedarf Randnotiz
\newcommand{\labelpunkte}{%
\ifnum\thePunkte>0%
\foreach \n in {1,...,\thePunkte}{\textbullet}%
\fi%
}
\newcommand{\teil}[1][0]{%
\item%
\def\thePunkte{#1}%
\ifshowPoints\marginnote{\color{red}\labelpunkte}\fi%
\addtocounter{punkteinAufgabe}{#1}%
}
%
% Zähler für enumerate environment neu definieren.
\renewcommand{\labelenumi}{\alph{enumi})}
\renewcommand{\labelenumii}{\alph{enumii})}
%
\newcommand{\checkPunkte}{%
\ifnum 0<0\thesection
\ifnum \value{punkteinAufgabe}=0%
\ClassWarning{cel-klausur}{%
Aufgabe \thesection\space hat (noch) keine Punkteverteilung%
}
\else
\ifnum \value{punkteinAufgabe}=1%
\ClassWarning{cel-klausur}{%
Aufgabe \thesection\space hat nur 1 Punkt%
}
\else
\ifnum \value{punkteinAufgabe}<\thePointsMax%
\ClassWarning{cel-klausur}{%
Aufgabe \thesection\space hat nur \thepunkteinAufgabe\space anstatt \thePointsMax\space Punkte
}
\fi\fi\fi
\ifnum \value{punkteinAufgabe}>\thePointsMax%
\ClassWarning{cel-klausur}{%
Aufgabe \thesection\space hat \thepunkteinAufgabe\space anstatt \thePointsMax\space Punkte%
}
\fi
\fi
\setcounter{punkteinAufgabe}{0}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Loesung
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{loesung}%
{%
\ifthenelse{\boolean{showSolution}}{%
\begingroup%
\vspace*{1em}
\subsection*{Lösung}
\bgroup%
}{%
\setbox0\vbox\bgroup%
}%
}{%
\ifthenelse{\boolean{showSolution}}{%
\egroup%
\endgroup%
}{%
\egroup%
}%
}%
\newenvironment{loesungen}%
{%
\begingroup%
\begin{loesung}%
\begin{enumerate}%
}{%
\end{enumerate}%
\end{loesung}%
\endgroup%
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Anhang
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\newcommand{\anhang}[1][]{
\setcounter{punkteinAufgabe}{0}
\clearpage
\ifonePerSheet%
\ifthenelse{\isodd{\thepage}}{}{\null\newpage}%
\fi%
\appendix
\def\thesubsection{\@Alph\c@subsection}
\section{\ifx&#1&{Formelsammlung und Tabellen}\else{#1}\fi}
}
\makeatother

BIN
logos/watermark_thesis.pdf Normal file

Binary file not shown.