Replace Eisvogel template with Cleanthesis

This commit is contained in:
coolneng 2019-10-18 16:01:19 +02:00
parent 75cab3258f
commit 7b4f9c0833
11 changed files with 1010 additions and 22 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
Assets/__backmatter.filled.tex
Assets/__frontmatter.filled.tex
Assets/__titlepage.filled.tex

18
Assets/backmatter.tex Normal file
View File

@ -0,0 +1,18 @@
%------------------------------------- Declaration Page ----------------------------
$if(declaration)$
\cleardoublepage
\thispagestyle{empty}
\vspace*{\fill}
\textbf{Eidesstattliche Erklärung}
\noindent{$declaration$}
\vspace{20mm}
\noindent\textit{Minden, den $date$}
$endif$
%------------------------------------- Declaration Page ----------------------------

733
Assets/cleanthesis.sty Normal file
View File

@ -0,0 +1,733 @@
%% cleanthesis.sty
%% Copyright 2019 R. Langner
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is R. Langner.
%
% This work consists of all files listed in MANIFEST.md.
%
%
% **************************************************
%
% Clean Thesis
% -- A LaTeX Style for Thesis Documents --
%
% **************************************************
%
% Readme:
% ----------------------------------------
% Please check out the README.md file in the root of this package.
%
% **************************************************
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{cleanthesis}[2019/06/21 v0.4.0 A clean LaTeX style for thesis documents]
%
% **************************************************
% Package options
% **************************************************
%
% -- process all available package options
%
%
% The xkeyval package enables us to handle for example key-value pairs
% in an easy way
\RequirePackage{xkeyval}
% OPTION hangfigurecaption
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangfigurecaption}[true]{}
\setkeys[ct]{cthesis}{hangfigurecaption=false}
% OPTION hangsection
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangsection}[true]{}
\setkeys[ct]{cthesis}{hangsection=true}
% OPTION hangsubsection
% --> values = true|false
\define@boolkey[ct]{cthesis}{hangsubsection}[true]{}
\setkeys[ct]{cthesis}{hangsubsection=true}
% OPTION sansserif
% --> values = true|false
\define@boolkey[ct]{cthesis}{sansserif}[false]{}
\setkeys[ct]{cthesis}{sansserif=false}
% OPTION configurelistings
% --> values = true|false
\define@boolkey[ct]{cthesis}{configurelistings}[false]{}
\setkeys[ct]{cthesis}{configurelistings=false}
% OPTION configurebiblatex
% --> values = true|false
\define@boolkey[ct]{cthesis}{configurebiblatex}[false]{}
\setkeys[ct]{cthesis}{configurebiblatex=false}
% OPTION figuresep
% --> values = none|colon|period|space|quad|endash
\define@choicekey*[ct]{cthesis}{figuresep}{none,colon,period,space,quad,newline,endash}[endash]{\def\cthesis@figuresep{#1}}
\setkeys[ct]{cthesis}{figuresep=endash}
% OPTION colorize
% --> values = full|reduced|bw
\define@choicekey*[ct]{cthesis}{colorize}[\val\colorizenr]{full,reduced,bw}[full]{\def\cthesis@colorize{\colorizenr}}
\setkeys[ct]{cthesis}{colorize=full}
% OPTION colortheme
% --> values = bluemagenta|bluegreen
\define@choicekey*[ct]{cthesis}{colortheme}[\val\themenr]{bluemagenta,bluegreen}[bluemagenta]{\def\cthesis@colortheme{\themenr}}
\setkeys[ct]{cthesis}{colortheme=bluemagenta}
% OPTION bibsys
% --> values = biber|bibtex
\define@choicekey*[ct]{cthesis}{bibsys}[\val\bibsysnr]{biber,bibtex}[bibtex]{\def\cthesis@bibsys{#1}}
\setkeys[ct]{cthesis}{bibsys=bibtex}
% OPTION bibfile
% --> values = file name of your bibtex file
\define@key[ct]{cthesis}{bibfile}[bib-refs]{\def\cthesis@bibfile{#1}}
\setkeys[ct]{cthesis}{bibfile=bib-refs}
% OPTION bibstyle
% --> values = biblatex style options
\define@key[ct]{cthesis}{bibstyle}[alphabetic]{\def\cthesis@bibstyle{#1}}
\setkeys[ct]{cthesis}{bibstyle=alphabetic}
% OPTION bibsorting
% --> values = biblatex sorting options
\define@key[ct]{cthesis}{bibsorting}[nty]{\def\cthesis@bibsorting{#1}}
\setkeys[ct]{cthesis}{bibsorting=nty}
% OPTION quotesstyle
% --> values = csquotes style options
\define@key[ct]{cthesis}{quotesstyle}[english]{\def\cthesis@quotesstyle{#1}}
\setkeys[ct]{cthesis}{quotesstyle=english}
\DeclareOptionX*{
\PackageWarning{cleanthesis}{Unknown option \CurrentOption}%
}
\ProcessOptionsX[ct]<cthesis>
% Checks if bib file exists, if not we throw an error
\IfFileExists{\cthesis@bibfile.bib}{}{\PackageError{cleanthesis}{Unable to find BibTeX file \cthesis@bibfile.bib!}{Please provide the name of your BibTeX file to the cleanthesis package parameter bibfile.}}
% **************************************************
% Color Definitions
% **************************************************
%
% -- defines color themes and color commands
%
%
% The xcolor package enables us to create/handle/name different colors
\RequirePackage[dvipsnames]{xcolor}
% updates all colors regarding the defined main and accessory
% color, as well as the defined colorize mode (full, reduced, bw)
\long\def\ct@cthesis@updatecolors{%
% sets all colors (like colorize == full)
% -- footer colors
\colorlet{ctcolorfooterpage}{ctcolorblack}
\colorlet{ctcolorfooterline}{ctcolormain}
\colorlet{ctcolorfootermark}{ctcolorblack}
\colorlet{ctcolorfootertitle}{ctcolormain}
% -- sectioning colors
\colorlet{ctcolortitle}{ctcolormain}
\colorlet{ctcolorpartnum}{ctcolormain}
\colorlet{ctcolorpartline}{ctcolorblack}
\colorlet{ctcolorparttext}{ctcolorblack}
\colorlet{ctcolorchapternum}{ctcolormain}
\colorlet{ctcolorchapterline}{ctcolormain}
\colorlet{ctcolorsection}{ctcolormain}
\colorlet{ctcolorsubsection}{ctcolormain}
\colorlet{ctcolorparagraph}{ctcolorblack}
% --> text colors
\colorlet{ctcolorfloatlabel}{ctcoloraccessory}
\colorlet{ctcolorlistlabel}{ctcolormain}
\ifcase\cthesis@colorize
% case = 0 (colorize == full)
% do nothing
\or
% case = 1 (colorize == reduced)
% --> footer colors
\colorlet{ctcolorfooterline}{ctcolorgray}
\colorlet{ctcolorfootertitle}{ctcolorgray}
% --> sectioning colors
\colorlet{ctcolorsubsection}{ctcolorblack}
\colorlet{ctcolorpartnum}{ctcolorblack}
% --> text colors
\colorlet{ctcolorlistlabel}{ctcolorblack}
\or
% case = 2 (colorize == bw)
% --> footer colors
\colorlet{ctcolorfooterline}{ctcolorgray}
\colorlet{ctcolorfootertitle}{ctcolorgray}
% --> sectioning colors
\colorlet{ctcolortitle}{ctcolorblack}
\colorlet{ctcolorpartnum}{ctcolorblack}
\colorlet{ctcolorchapternum}{ctcolorblack}
\colorlet{ctcolorchapterline}{ctcolorblack}
\colorlet{ctcolorsection}{ctcolorblack}
\colorlet{ctcolorsubsection}{ctcolorblack}
% --> text colors
\colorlet{ctcolorfloatlabel}{ctcolorblack}
\colorlet{ctcolorlistlabel}{ctcolorblack}
\else
\fi
}
% sets the main and accessory color for the document
\def\cthesissetcolor#1#2#3{%
\definecolor{ctcolormain}{#1}{#2}%
\definecolor{ctcoloraccessory}{#1}{#3}%
\ct@cthesis@updatecolors%
}
% sets the blue-magenta color theme (blue/magenta)
\def\cthesissetcolorbluemagenta{%
\cthesissetcolor{cmyk}{1, .50, .10, .01}{.18, .98, .18, 0}%
}
% sets the blue-green color theme (blue/green)
\def\cthesissetcolorbluegreen{%
\cthesissetcolor{cmyk}{.61, .47, .03, 0}{.48, .05, .91, 0}%
}
% defines general colors
\definecolor{ctcolorblack}{gray}{0}
\definecolor{ctcolorgray}{gray}{.5}
\definecolor{ctcolorgraylight}{gray}{.8}
\definecolor{ctcolorgraylighter}{gray}{.95}
% sets the color theme regarding the given package option colortheme
\ifcase\cthesis@colortheme
% case 0 (colortheme == bluemagenta)
\cthesissetcolorbluemagenta
\or
% case 1 (colortheme == bluegreen)
\cthesissetcolorbluegreen
\else
% all other cases
\cthesissetcolorbluemagenta
\fi
% **************************************************
% Font Definitions (see http://www.tug.dk/FontCatalogue/)
% **************************************************
\RequirePackage[T1]{fontenc} % font types and character verification
\ifct@cthesis@sansserif
% Using sans-serif fonts
%
%\RequirePackage{helvet} % Font: Helvetica
%\RequirePackage{nimbus} % Font: Nimbus Sans, a clone of the Helvetica
\RequirePackage{tgheros} % Font: TEX Gyre Heros
%\RequirePackage{libertine} % Font: Biolinum, the standard sans serif typeface with the Libertine package
%\RequirePackage[scaled]{berasans} % Font: Bera Sans, a a version of Bitstream Vera Sans slightly enhanced
\renewcommand*\familydefault{\sfdefault}%
\else
% Using serif fonts
%
\RequirePackage{lmodern} % font set: Latin Modern
\RequirePackage{charter} % font set: Charter
%\RequirePackage{fourier} % font set: (basically improved utopia)
\fi
% **************************************************
% Load Packages
% **************************************************
\RequirePackage{microtype} % typographic tuning
\RequirePackage{setspace} % for line spacing, e.g. \onehalfspacing
\RequirePackage[]{graphicx} % graphics import features
\RequirePackage{tabularx} % table features
%\RequirePackage{fancyhdr} % for header and footer modifications
\RequirePackage{enumitem} % for simple list modifications
\RequirePackage{blindtext} % package for blind text
\RequirePackage{textcomp} % different symbols
\RequirePackage{hyperref} % interactive link inside the document
\RequirePackage{calc}
\RequirePackage[automark]{scrlayer-scrpage}
%
\RequirePackage[ % modify figure and table captions
font={small}, % - small font size
labelfont={bf,sf,color=ctcolorfloatlabel},% - label in bold, sans-serif and magenta
labelsep=\cthesis@figuresep, % - separator: none, colon, period, space, quad, newline, endash
singlelinecheck=false % - no centered single-lined captions
]{caption}[2008/08/24]
%\ifthenelse{\boolean{@figurecaptionoutside}}%
\ifct@cthesis@hangfigurecaption
% {%
\DeclareCaptionFormat{llap}{\llap{#1#2}#3\par}%
\captionsetup{format=llap,labelsep=quad,singlelinecheck=false}%
% }{}
\fi
%
%
% **************************************************
% Page construction
% **************************************************
\KOMAoption{headinclude}{false} % include header in body?
\KOMAoption{footinclude}{false} % include footer in body?
\KOMAoption{footlines}{2.1} % number of foot lines
\KOMAoption{mpinclude}{false} % include marginpar in body?
\KOMAoption{BCOR}{25mm} % binding correction
\KOMAoption{DIV}{12} % number of page divs (divider)
%
%
\RequirePackage[ % advanced quotes
strict=true, % - warning are errors now
style=\cthesis@quotesstyle % - german quotes
]{csquotes}
%
% **************************************************
% Bibliography
% **************************************************
\ifct@cthesis@configurebiblatex
\RequirePackage[ % use biblatex for bibliography
backend=\cthesis@bibsys, % - use biber backend (bibtex replacement) or bibtex
style=\cthesis@bibstyle, % - use alphabetic (or numeric) bib style
natbib=true, % - allow natbib commands
hyperref=true, % - activate hyperref support
backref=true, % - activate backrefs
isbn=false, % - don't show isbn tags
url=false, % - don't show url tags
doi=false, % - don't show doi tags
urldate=long, % - display type for dates
maxnames=3,%
minnames=1,%
maxbibnames=5,%
minbibnames=3,%
maxcitenames=2,%
mincitenames=1,%,
sorting=\cthesis@bibsorting%
]{biblatex}
\bibliography{\cthesis@bibfile}
\DefineBibliographyStrings{ngerman}{%
andothers = {{et\,al\adddot}}, % 'et al.' instead of 'u.a.'
backrefpage = {{zitiert auf Seite}},%
backrefpages = {{zitiert auf den Seiten}},%
}
\fi
% **************************************************
% Text Format
% **************************************************
\setstretch{1.2} % value for line spacing, use \setstretch{} or \singlespacing or \onehalfspacing or \doublespacing
%\setlength{\parindent}{0em} % value for paragraph indentation
\clubpenalty = 10000 % prevent single lines at the beginning of a paragraph (Schusterjungen)
\widowpenalty = 10000 % prevent single lines at the end of a paragraph (Hurenkinder)
\displaywidowpenalty = 10000 %
% **************************************************
% Listing Format
% **************************************************
\ifct@cthesis@configurelistings
\RequirePackage{listings} % package for listings
\lstset{%
backgroundcolor=\color{ctcolorgraylighter},
linewidth=\textwidth,
xleftmargin=10pt,
captionpos=b,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
basicstyle=\footnotesize\ttfamily,
frame=leftline,
framerule=3pt,
framexleftmargin=4pt,
rulecolor=\color{ctcolorgraylight},
numbers=left,
numberstyle=\footnotesize\sffamily\color{ctcolorgray},
numbersep=15pt
}
\fi
% **************************************************
% List Definitions
% **************************************************
\newenvironment{my_list}%
{\begin{enumerate}%
\setlength{\itemsep}{1pt}%
\setlength{\parskip}{0pt}%
\setlength{\parsep}{0pt}%
}%
{\end{enumerate}}
%
\newenvironment{my_list_num}
{\begin{enumerate}[topsep=-5pt,partopsep=0pt,parsep=2pt,itemsep=3pt]}
{\end{enumerate}}%
\newenvironment{my_list_item}
{\begin{itemize}[topsep=-5pt,partopsep=0pt,parsep=2pt,itemsep=3pt]}
{\end{itemize}}%
\newenvironment{ct_version_list}
{\begin{itemize}[topsep=-5pt,partopsep=0pt,parsep=2pt,itemsep=3pt]}
{\end{itemize}}%
\newenvironment{ct_version_list_sub}
{\begin{itemize}[topsep=-0pt,partopsep=0pt,parsep=0pt,itemsep=0pt]}
{\end{itemize}}%
\renewcommand{\descriptionlabel}[1]{%
\hspace*{\labelsep}%
\color{ctcolorlistlabel}%
\tgherosfont\textbf{#1}%
}
\newenvironment{my_list_desc}
{\begin{description}[%
style=multiline,%
topsep=-5pt,%
leftmargin=3cm,%
partopsep=0pt,%
parsep=2pt,%
itemsep=3pt%
]}
{\end{description}}%
% **************************************************
% Header and Footer
% **************************************************
\automark[section]{chapter} % automatically marks sections as rightmark
% and chapters as leftmark
\setlength{\footheight}{120pt} % avoids scrlayer-scrpage warning:
% footheight to low warning
\setlength{\footskip}{185pt} % BAD HACK that moves the foot downwards
\KOMAoption{footwidth}{foot:53pt} % BAD HACK that moves the foot towards
% the outer border
\setkomafont{pagefoot}{\ctfontfootertext} % font for footer
\setkomafont{pagenumber}{\ctfontfooterpagenumber} % font for page numbers
%% Redefinition of the chaptermark (used for footer mark on even (left) pages)
\renewcommand{\chaptermark}[1]{%
\markboth{%
\ctfontfootertext
% use \@chapapp instead of \chaptername to avoid
% 'Chapter A Appendix ...', thanks to @farbverlust (issue #47)
{\color{ctcolorfootermark}\textbf{\@chapapp\ \thechapter}}%
\hspace{.25cm}%
\protect\begin{minipage}[t]{.65\textwidth}%
#1%
\protect\end{minipage}%
}{}%
}
%% Redefinition of the sectionmark (used for footer mark on odd (right) pages)
\renewcommand{\sectionmark}[1]{%
\markright{%
\ctfontfootertext
\protect\raggedleft%
{\color{ctcolorfootermark}\textbf{\thesection}}%
\hspace{.25cm}%
\protect\begin{minipage}[t]{\minof{\widthof{#1}}{.7\textwidth}}%
#1%
\protect\end{minipage}%
}%
}
%% Vertical line in the footer (between page number and mark)
\newcommand{\ctfooterline}{%
\color{ctcolorfooterline}\rule[-90pt]{1.25pt}{100pt}%
}
%% Page number for odd (right) pages
\newcommand{\ctfooterrightpagenumber}{%
\ctfooterline%
\hspace*{10pt}%
\begin{minipage}[b]{1.5cm}%
\pagemark\ %
\end{minipage}%
}
%% Page number for even (left) pages
\newcommand{\ctfooterleftpagenumber}{%
\begin{minipage}[b]{1.5cm}%
\raggedleft\pagemark%
\end{minipage}%
\hspace*{10pt}%
\ctfooterline%
}
%% Defines the content for header and footer
\lehead{}
\cehead{}
\rehead{}
\lohead{}
\cohead{}
\rohead{}
\lefoot[% > plain
\ctfooterleftpagenumber%
]{% > srcheadings
\ctfooterleftpagenumber%
\hspace*{0.75cm}%
\headmark%
}
\cefoot{}
\refoot{}
\lofoot{}
\cofoot{}
\rofoot[% > plain
\ctfooterrightpagenumber%
]{% > srcheadings
\headmark%
\hspace*{0.75cm}%
\ctfooterrightpagenumber%
}
% **************************************************
% New Commands
% **************************************************
% TODO command
\definecolor{color_todo}{rgb}{.6,.8,.2}
\newcommand{\TODO}[1]{{\color{color_todo}\textbf{[TODO #1]}}}
%
%
% ref commands, e.g. for images, tables and text labels
% --------------------------------------------------
% RESULT = (siehe Tab. 12.4)
\newcommand{\tabref}[1]{(siehe Tab.~\ref{#1})}
%
% RESULT = (siehe Tab. 12.4)
\newcommand{\tableref}[1]{(siehe Tab.~\ref{#1} Seite~\pageref{#1})}
%
% --------------------------------------------------
% RESULT = (siehe 3.4)
\newcommand{\tref}[1]{(siehe \ref{#1})}
%
% RESULT = Abschnitt 3.4
\newcommand{\treft}[1]{Abschnitt~\ref{#1}}
%
% RESULT = (siehe 3.4, Seite 12)
\newcommand{\textref}[1]{(siehe \ref{#1}, Seite~\pageref{#1})}
%
% RESULT = Abschnitt 3.4 (siehe Seite 12)
\newcommand{\textreft}[1]{Abschnitt~\ref{#1} (siehe Seite~\pageref{#1})}
%
% --------------------------------------------------
% RESULT = (siehe Abb. 10.4)
\newcommand{\fref}[1]{(siehe Abb.~\ref{#1})}
%
% RESULT = (siehe Abb. 10.4 b)
\newcommand{\frefadd}[2]{(siehe Abb.~\ref{#1}~#2)}
%
% RESULT = (siehe Abb. 10.4, Seite 12)
\newcommand{\figref}[1]{(siehe Abb.~\ref{#1}, Seite~\pageref{#1})}
%
% RESULT = (siehe Abb. 10.4 b, Seite 12)
\newcommand{\figrefadd}[2]{(siehe Abb.~\ref{#1}~#2, Seite~\pageref{#1})}
%
% RESULT = Abbildung 10.4
\newcommand{\figreft}[1]{Abbildung~\ref{#1}}
%
% RESULT = Abbildung 10.4 b
\newcommand{\figrefaddt}[2]{Abbildung~\ref{#1}~#2}
%
% --------------------------------------------------
% RESULT = (siehe Seite 12)
\newcommand{\seepage}[1]{(siehe Seite~\pageref{#1})}
% **************************************************
% Sectioning Commands
% **************************************************
%
\newcommand*{\ctSetFont}[3]{%
arg1=#1, arg2=#2, arg3=#3%
}
% own font definitions
\newcommand{\helv}{\fontfamily{phv}\fontsize{9}{11}\selectfont}
\newcommand{\book}{\fontfamily{pbk}\fontseries{m}\fontsize{11}{13}\selectfont}
\newcommand{\tgherosfont}{\fontfamily{qhv}\selectfont}
\newcommand{\thesispartlabelfont}{\color{ctcolorpartnum}\nobreak\book\fontsize{60}{60}\selectfont}
\newcommand{\thesispartfont}{\color{ctcolorparttext}\nobreak\normalfont\huge \tgherosfont\selectfont}
\newcommand{\thesischapterfont}{\color{ctcolorblack}\nobreak\normalfont\huge \fontfamily{phv}\selectfont}
%\newcommand{\thesissectionfont}{\color{ctcolormain}\nobreak\LARGE\bfseries \tgherosfont}
\newcommand{\thesissectionfont}{\color{ctcolorsection}\nobreak\normalfont\LARGE \tgherosfont}
\newcommand{\thesissubsectionfont}{\color{ctcolorsubsection}\nobreak\normalfont\Large \tgherosfont}
\newcommand{\thesisparagraphfont}{\color{ctcolorparagraph}\nobreak\tgherosfont\small\bfseries}
\newcommand{\ctfontfooterpagenumber}{%
\color{ctcolorfooterpage}%
\normalfont\normalsize\bfseries \tgherosfont%
}
\newcommand{\ctfontfootertext}{%
\color{ctcolorfootertitle}%
\normalfont\footnotesize \tgherosfont%
}
%
% headings
\setkomafont{part}{\thesispartfont} % for chapter entries
\setkomafont{chapter}{\thesischapterfont} % for chapter entries
\setkomafont{section}{\thesissectionfont} % for section entries
\setkomafont{subsection}{\thesissubsectionfont} % for section entries
\addtokomafont{subsubsection}{\tgherosfont}
%\addtokomafont{paragraph}{\tgherosfont}
\setkomafont{paragraph}{\thesisparagraphfont}
%\setkomafont{subsection}{\large} % for subsection entries
%
% **************************************************
% Sectioning
% **************************************************
%
% -- modifications regarding sectioning (structural) commands,
% i.e. \part, \chapter, \section, \subsection, \subsubsection, \paragraph
%
% ---------------------------
% > formats: \part
% ---------------------------
\renewcommand*{\partpagestyle}{empty}
\renewcommand*{\raggedpart}{\raggedleft}
\renewcommand*\partheadmidvskip{\par\vspace*{3em}}
\renewcommand*{\partformat}{%
\usekomafont{part}%
\thesispartlabelfont%
\partname\ \thepart\quad%
{\color{ctcolorpartline}\hspace*{-200pt}\rule[0pt]{600pt}{2pt}}%
}
%
% ---------------------------
% > formats: \chapter
% ---------------------------
\renewcommand*\chapterheadstartvskip{\vspace*{-8.75em}}
\renewcommand*\chapterheadendvskip{\vspace*{2.5\baselineskip}}
\renewcommand*{\chapterformat}{%
\ctchapternumber{\thechapter}%
}
\renewcommand{\chapterlinesformat}[3]{%
\ctchaptertitle{#3}%
#2%
}
%\renewcommand{\chapterlineswithprefixformat}[3]{%
% \ctchaptertitle{\@chapapp\ \thechapter: #3}%
% #2%
%}
\newcommand{\ctchapternumber}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.3\textwidth}%
\raggedleft{%
{\color{ctcolorchapterline}\rule[-5pt]{2pt}{5cm}}%
\quad%
{\color{ctcolorchapternum}\fontsize{60}{60}\selectfont#1}%
}%
\end{minipage}%
}
\newcommand{\ctchaptertitle}[1]{%
\usekomafont{chapter}%
\begin{minipage}[t]{0.7\textwidth}%
\vspace*{5.85em}%
\raggedright%
#1%
\end{minipage}%
}
%
% ---------------------------
% > formats: \section
% ---------------------------
\ifct@cthesis@hangsection
\renewcommand*{\sectionformat}{%
\usekomafont{section}%
\makebox[0pt][r]{\color{ctcolorblack}\thesection\hspace*{10pt}}%
}
\else
\renewcommand*{\sectionformat}{%
\usekomafont{section}%
{\color{ctcolorblack}\thesection\hspace*{10pt}}%
}
\fi
%
% ---------------------------
% > formats: \subsection
% ---------------------------
\ifct@cthesis@hangsubsection
\renewcommand*{\subsectionformat}{%
\usekomafont{subsection}%
\makebox[0pt][r]{\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
}
\else
\renewcommand*{\subsectionformat}{%
\usekomafont{subsection}%
{\color{ctcolorblack}\thesubsection\hspace*{10pt}}%
}
\fi
%
%
% **************************************************
% ToC, LoF, LoT, LoL
% **************************************************
%
% -- modifications regarding the table of contents,
% the list of figures, list of tables,
% and list of listings
%
% > removes indention for lists of floating environments (e.g., lof and lot)
\KOMAoption{listof}{flat}
%
%
% **************************************************
% Mishmash
% **************************************************
%
% Clean chapter quotations
\newcommand{\hugequote}{%
{\book\fontsize{75}{80}\selectfont%
\hspace*{-.475em}\color{ctcolorgraylight}%
\textit{\glqq}%
\vskip -.26em}%
}
\newcommand{\cleanchapterquote}[3]{%
\begin{minipage}{.865\textwidth}%
\begin{flushright}
\begin{minipage}{.65\textwidth}%
\begin{flushleft}
{\hugequote}\textit{#1}
\end{flushleft}
\begin{flushright}
--- \textbf{#2} \\
#3
\end{flushright}
\end{minipage}%
\end{flushright}
\end{minipage}%
\bigskip
}
%
% Clean Quotation environment
\newenvironment{thesis_quotation}%
{%
\begin{minipage}{.865\textwidth}%
\begin{flushright}
\begin{minipage}{.95\textwidth}%
}%
{%
\end{minipage}%
\end{flushright}
\end{minipage}%
}%
%
% Clean signs around word origins in definitions
%\newcommand{\cthesisorigin}[1]{\textsf{\textlangle}#1\textsf{\textrangle}}

50
Assets/frontmatter.tex Normal file
View File

@ -0,0 +1,50 @@
%------------------------------------- Custom Title (Back) Page --------------------
%------------------------------------- Custom Title (Back) Page --------------------
%------------------------------------- Custom Abstract Page ------------------------
$if(abstract-de)$
\cleardoublepage
\begin{minipage}{\linewidth}
\chapter*{Zusammenfassung}
%\addcontentsline{toc}{chapter}{Zusammenfassung}
$abstract-de$
$if(abstract-en)$
\chapter*{Abstract}
%\addcontentsline{toc}{chapter}{Abstract}
$abstract-en$
$endif$
\end{minipage}
\cleardoublepage
$endif$
%------------------------------------- Custom Abstract Page ------------------------
%------------------------------------- Acknowledgements Page -----------------------
$if(acknowledgements)$
\chapter*{Danksagung}
%\addcontentsline{toc}{chapter}{Danksagung}
$acknowledgements$
$endif$
%------------------------------------- Acknowledgements Page -----------------------
%------------------------------------- Restriction Note Page -----------------------
$if(restrictionnote)$
\chapter*{Sperrvermerk}
$restrictionnote$
$endif$
%------------------------------------- Restriction Note Page -----------------------
%------------------------------------- Clear page before TOC -----------------------
\cleardoublepage
%------------------------------------- Clear page before TOC -----------------------

View File

@ -0,0 +1,8 @@
%------------------------------------- Include Clean Thesis Style ------------------
%% Settings for cleanthesis.sty are defined in titlepage.tex since we need to set up
%% the bibfile using a metadata variable
%% We cannot put the `\usepackage{cleanthesis}` also in titlepage.tex since Pandoc
%% tries to read the local cleanthesis.sty.
\usepackage{cleanthesis}
%------------------------------------- Include Clean Thesis Style ------------------

View File

@ -2,12 +2,25 @@
title: "IGDB: Base de datos internacional de glaciares"
subtitle: "Diseño y Desarrollo de Sistemas de Información"
author: [Amin Kasrou Aouam]
date: 2019-09-27
titlepage: true
date: "18 Octubre 2019"
logo: /home/coolneng/Pictures/Logos/UGR.png
listings-no-page-break: true
toc: true
toc-own-page: true
linkcolor: DeepSkyBlue2
bibliography: /home/coolneng/Documents/Uni/DDSI/Code/IGDB/Assets/Citations.bib
reference-section-title: "Bibliografía"
lang: es-ES
documentclass: scrbook
classoption:
- open=right
- twoside=true
- cleardoublepage=empty
- clearpage=empty
papersize: a4
fontsize: 11pt
geometry:
- top=30mm
- left=25mm
- bottom=30mm
- width=150mm
- bindingoffset=6mm
colorlinks: true
numbersections: true
...

78
Assets/titlepage.tex Normal file
View File

@ -0,0 +1,78 @@
%------------------------------------- Custom Title Page ---------------------------
\renewcommand{\maketitle}{
\thispagestyle{empty}
\parindent=0pt
\vspace{20mm}
\hrule
\vspace{5mm}
\begin{center}
\LARGE
\textbf{\textsc{ $title$ }}
\end{center}
\vspace{5mm}
\hrule
\vspace{10mm}
$if(subtitle)$
\begin{center}
\Large
\textsc{ $subtitle$ }
\end{center}
$endif$
\vfill
$if(logo)$
\noindent
\includegraphics[width=$if(logo-width)$$logo-width$$else$120$endif$pt, center]{$logo$}
$endif$
\vspace{\baselineskip}\noindent
\large
\begin{tabular}{lp{\textwidth}}
Autor: & \texttt{$for(author)$$author$$sep$ \and $endfor$}\\
Fecha: & \texttt{$date$}\\
&\\[24pt]
\end{tabular}
}
%------------------------------------- Custom Title Page ---------------------------
%------------------------------------- Custom Title (Back) Page --------------------
%------------------------------------- Custom Title (Back) Page --------------------
%------------------------------------- Patch Eisvogel's frontmatter ----------------
%% Eisvogel template uses `\frontmatter` directly *after* `\maketitle`, thus there is
%% a `\doubleclearpage` after the titlepage, which prevents our title-back-page to be
%% positioned on the backside of the titlepage ...
%% (Pandocs default template uses `\frontmatter` *before* `\maketitle`)
$if(eisvogel)$
\usepackage{xpatch}
\xpretocmd{\frontmatter}{\customtitlebackpage}{}{}
\xapptocmd{\frontmatter}{\setcounter{page}{3}}{}{}
$endif$
%------------------------------------- Patch Eisvogel's frontmatter ----------------
$if(logo)$
\usepackage[export]{adjustbox}
\usepackage{graphicx}
$endif$
%------------------------------------- Workaround for CleanStyle -------------------
%% cleanthesis.sty *will* check the bibfile, even if `configurebiblatex=false` ...
%% So we need to set it appropriately using our metadata variable "cleanthesisbibfile"
$if(cleanthesis)$
\PassOptionsToPackage{
figuresep=colon,
configurelistings=true,
configurebiblatex=false,
bibfile=$cleanthesisbibfile$
}{cleanthesis}
$endif$
%------------------------------------- Workaround for CleanStyle -------------------

View File

@ -22,7 +22,9 @@
- [X] Org to Markdown
- [X] Add YAML to Markdown
- [X] Compile to PDF using Eisvogel
** TODO Update date in YAML automatically
** TODO Update date in YAML automatically [0/2] [0%]
- [ ] Awk command
- [ ] Add to Makefile
** DONE Add WGMS citation [2/2] [100%]
CLOSED: [2019-10-08 Tue 18:16]
- [X] Pandoc citations
@ -35,3 +37,7 @@
- [X] Data types
- [X] Non functional requirements
- [X] Longer description
** TODO Generate diagrams [0/3] [0%]
- [ ] Data-flow diagrams
- [ ] Conceptual diagram
- [ ] Functional diagram

Binary file not shown.

109
Makefile
View File

@ -1,20 +1,99 @@
## ---- user config ----
PANDOC_TMPL := eisvogel.latex
PANDOC_OPTIONS := --listings --toc -V lang=es --filter pandoc-citeproc
PANDOC_ORG := pandoc --toc
PANDOC_MD := pandoc --template $(PANDOC_TMPL) $(PANDOC_OPTIONS)
METADATA := Assets/metadata.yaml
DOC := Docs
## Source files
## (Adjust to your needs. Order of markdown files in $(SRC) matters!)
PANDOC = pandoc
DOC = Docs
META = Assets/metadata.yaml
SRC = $(DOC)/Project.md
BIBFILE = Assets/Citations.bib
TARGET = $(DOC)/Project.pdf
## ---- build rules ----
all: $(DOC)/Project.pdf
$(DOC)/Project.md: $(DOC)/Project.org
$(PANDOC_ORG) -o $@ $<
$(DOC)/Project.pdf: $(DOC)/Project.md
$(PANDOC_MD) -o $@ $< $(METADATA)
###############################################################################
## Internal setup (do not change)
###############################################################################
## Auxiliary files
## (Do not change!)
TITLEPAGE = titlepage.tex
FRONTMATTER = frontmatter.tex
BACKMATTER = backmatter.tex
TMP1 = Assets/$(TITLEPAGE:%.tex=__%.filled.tex)
TMP2 = Assets/$(FRONTMATTER:%.tex=__%.filled.tex)
TMP3 = Assets/$(BACKMATTER:%.tex=__%.filled.tex)
TMP = $(TMP1) $(TMP2) $(TMP3)
## Pandoc options
AUX_OPTS =
OPTIONS = -f markdown
OPTIONS += --pdf-engine=pdflatex
OPTIONS += --filter=pandoc-citeproc
OPTIONS += --metadata-file=$(META)
OPTIONS += -M bibliography=$(BIBFILE)
OPTIONS += --listings
OPTIONS += --include-in-header=$(TMP1)
OPTIONS += --include-before-body=$(TMP2)
OPTIONS += --include-after-body=$(TMP3)
## Template variables
TEMPLATE_DL_DIR = .tmp_template_dl
CLEANTHESIS_TEMPLATE = Assets/cleanthesis.sty
TEMPLATE_FILES = $(CLEANTHESIS_TEMPLATE)
###############################################################################
## Main targets (do not change)
###############################################################################
$(SRC): $(DOC)/Project.org
$(PANDOC) -o $@ $<
## Use Clean Thesis template (https://github.com/derric/cleanthesis)
cleanthesis: TEMPLATE_FILE += $(CLEANTHESIS_TEMPLATE)
cleanthesis: TEMPLATE_REPO += $(CLEANTHESIS_REPO)
cleanthesis: TEMPLATE_VERSION += $(CLEANTHESIS_VERSION)
cleanthesis: AUX_OPTS += -M cleanthesis=true -M cleanthesisbibfile=$(BIBFILE:%.bib=%)
cleanthesis: OPTIONS += --include-in-header=Assets/include-header.tex $(AUX_OPTS)
cleanthesis: $(CLEANTHESIS_TEMPLATE) $(TARGET)
## Clean-up: Remove temporary (generated) files and download folder
clean:
rm $(DOC)/*.md
rm $(DOC)/*.pdf
rm -rf $(TMP) $(TEMPLATE_DL_DIR)
## Clean-up: Remove also genereated thesis and template files
distclean: clean
rm -f $(TARGET)
###############################################################################
## Auxiliary targets (do not change)
###############################################################################
## Download template files
## Build thesis
${TARGET}: $(SRC) $(REFERENCES) $(META) $(BIBFILE) $(TMP)
$(PANDOC) ${OPTIONS} -o $@ $(SRC) $(REFERENCES)
## Build auxiliary files (title page, backmater, references)
$(TMP): Assets/__%.filled.tex: Assets/%.tex $(META)
$(PANDOC) $(AUX_OPTS) --template=$< --metadata-file=$(META) -o $@ $<
###############################################################################
## Declaration of phony targets
###############################################################################
.PHONY: cleanthesis clean distclean

BIN
Project.pdf Normal file

Binary file not shown.