template clean-up
This commit is contained in:
253
cel-thesis.cls
253
cel-thesis.cls
@@ -1,3 +1,4 @@
|
|||||||
|
% Author: Johannes Demel
|
||||||
% This file requires quite a few texlive packages.
|
% This file requires quite a few texlive packages.
|
||||||
% texlive-lang-german / texlive-lang-european
|
% texlive-lang-german / texlive-lang-european
|
||||||
% texlive-science
|
% texlive-science
|
||||||
@@ -30,6 +31,7 @@
|
|||||||
\newcommand{\thesisSignatureDate}[1]{\def \theThesisSignatureDate{#1}}
|
\newcommand{\thesisSignatureDate}[1]{\def \theThesisSignatureDate{#1}}
|
||||||
\newcommand{\thesisLanguage}[1]{\def \theThesisLanguage{#1}}
|
\newcommand{\thesisLanguage}[1]{\def \theThesisLanguage{#1}}
|
||||||
\newcommand{\thesisCC}[1]{\def \theThesisCC{#1}}
|
\newcommand{\thesisCC}[1]{\def \theThesisCC{#1}}
|
||||||
|
\newcommand{\thesisPythonWatermark}[1]{\def \theThesisPythonWatermark{#1}}
|
||||||
% Defaults
|
% Defaults
|
||||||
\thesisTitle{Random Thesis Title}
|
\thesisTitle{Random Thesis Title}
|
||||||
\thesisType{Master Thesis Type}
|
\thesisType{Master Thesis Type}
|
||||||
@@ -41,6 +43,7 @@
|
|||||||
\thesisSignatureDate{dd.mm.yyyy}
|
\thesisSignatureDate{dd.mm.yyyy}
|
||||||
\thesisLanguage{english}
|
\thesisLanguage{english}
|
||||||
\thesisCC{FALSE}
|
\thesisCC{FALSE}
|
||||||
|
\thesisPythonWatermark{FALSE}
|
||||||
|
|
||||||
\def\dictThesisLanguageGerman{ngerman}
|
\def\dictThesisLanguageGerman{ngerman}
|
||||||
\def\dictThesisLanguageEnglish{english}
|
\def\dictThesisLanguageEnglish{english}
|
||||||
@@ -52,54 +55,38 @@
|
|||||||
\usepackage[T1]{fontenc} % encoding for target files.
|
\usepackage[T1]{fontenc} % encoding for target files.
|
||||||
\usepackage[utf8]{inputenc} % UTF-8 encoding for source files
|
\usepackage[utf8]{inputenc} % UTF-8 encoding for source files
|
||||||
\usepackage[\theThesisLanguage]{babel}
|
\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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
% Math and Symbols %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\usepackage{amssymb, amsfonts, latexsym}
|
\usepackage{amssymb, amsfonts, latexsym}
|
||||||
\usepackage[fleqn]{amsmath}
|
\usepackage[fleqn]{amsmath}
|
||||||
\usepackage[right]{eurosym}
|
\usepackage[right]{eurosym}
|
||||||
\usepackage{siunitx}
|
\usepackage{siunitx}
|
||||||
|
\ifx\theThesisLanguage\dictThesisLanguageEnglish
|
||||||
\sisetup{%
|
\sisetup{%
|
||||||
binary-units = true,
|
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={.}
|
output-decimal-marker={.}
|
||||||
}
|
}
|
||||||
% fft symbol
|
\else
|
||||||
\usepackage{trfsigns}
|
\sisetup{%
|
||||||
\def\korrts{\quad \laplace \quad }
|
binary-units = true,
|
||||||
% (Matrixnotation aus NT1-/WT-Buch)
|
output-decimal-marker={,}
|
||||||
\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
|
\fi
|
||||||
}
|
|
||||||
\newcommand{\mybinom}[2]{%
|
|
||||||
\Big(\hspace*{-1ex}\begin{array}{c}%
|
|
||||||
#1\\[-1ex]#2%
|
|
||||||
\end{array}\hspace*{-1ex}\Big)\,%
|
|
||||||
}
|
|
||||||
|
|
||||||
%% Define always missing math symbols.
|
%% Define always missing math symbols.
|
||||||
\DeclareMathOperator*{\argmin}{\arg\!\min}
|
\DeclareMathOperator*{\argmin}{\arg\!\min}
|
||||||
\DeclareMathOperator*{\argmax}{\arg\!\max}
|
\DeclareMathOperator*{\argmax}{\arg\!\max}
|
||||||
|
\DeclareMathOperator\sign{sign}
|
||||||
|
|
||||||
% Graphics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
% Graphics %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% Ueberschriften fett
|
% Ueberschriften fett
|
||||||
@@ -111,6 +98,7 @@
|
|||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\usepackage{color}
|
\usepackage{color}
|
||||||
\usepackage{pgf, tikz, pgfplots}
|
\usepackage{pgf, tikz, pgfplots}
|
||||||
|
\usetikzlibrary{shapes,arrows}
|
||||||
\pgfplotsset{compat=1.9}
|
\pgfplotsset{compat=1.9}
|
||||||
|
|
||||||
% Layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
% Layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@@ -123,49 +111,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% Schalter
|
% Create titlepage and optional parts like a CC statement.
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
||||||
% 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
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\newcommand{\header}{%
|
\newcommand{\header}{%
|
||||||
\includegraphics[width=40mm,valign=c]{cel-thesis/logos/kitlogo_de_rgb}%
|
\includegraphics[width=40mm,valign=c]{cel-thesis/logos/kitlogo_de_rgb}%
|
||||||
@@ -220,160 +166,3 @@
|
|||||||
\makestatutorydeclaration
|
\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&{Formelsammlung und Tabellen}\else{#1}\fi}
|
|
||||||
}
|
|
||||||
\makeatother
|
|
||||||
|
|
||||||
|
|||||||
BIN
logos/watermark_thesis.pdf
Normal file
BIN
logos/watermark_thesis.pdf
Normal file
Binary file not shown.
Reference in New Issue
Block a user