% !TeX program = xelatex
% !TeX encoding = utf8
% !TeX root = ProjectPlan.tex

\documentclass[a4paper, twosided, 11pt]{scrartcl}

%% Language configuration
\usepackage{polyglossia}
\setdefaultlanguage{english}

%$ Specify where floatings go and make nicer looking tables
\usepackage{float}
\usepackage{array}
\usepackage{booktabs}
\usepackage{tabularx}

%% graphics
\usepackage{graphicx}

%% Set up font
\usepackage[T1]{fontenc}
\usepackage[usefilenames, DefaultFeatures={Ligatures=Common}]{plex-otf}
\renewcommand*\familydefault{\sfdefault}

%% Header and Footers
\usepackage[automark]{scrlayer-scrpage}
\ihead{Project Plan}
\chead{}
\ohead{\headmark}

\ifoot{}
\cfoot{}
\ofoot{\pagemark}

%% Access metadata
\usepackage{titling}

%% gantt configuration
\usepackage{pgfgantt}
\usepackage[]{geometry}


%% Landscape pages
\usepackage{pdflscape}

% Metadata
\title{Project Plan}
\author{Naoki Pross, Sara Cinzia Halter}


% Document
\begin{document}
\begin{titlepage}
  \includegraphics[height=3cm]{fig/ost-logo}
  \begin{flushright}
    % TODO: OST logo
    \vspace{5cm}
    {\Huge \bfseries \thetitle} \\
    \vspace{5mm}
    {\LARGE Project: \textit{Fading illustration with SDR}} \\
    \vspace{5mm}
    {\LARGE \bfseries Version 0.1}
  \end{flushright}
\end{titlepage}

\section*{Changelog}
\begin{tabularx}{\textwidth}{lrlX}
  \toprule
  \bfseries Date & \bfseries Version & \bfseries Author & \bfseries Description \\
  \midrule
  2021-09-21 & 0.1 & Pross N.  & Crated empty document \\
  \bottomrule
\end{tabularx}

\vfill
{
  \renewcommand{\arraystretch}{2}
  \begin{tabularx}{\textwidth}{lp{.2\textwidth}X}
                       & \bfseries Date & \bfseries Signature\\
    Pross Naoki        & \hrulefill & \hrulefill \\
    Halter Cinzia Sara & \hrulefill & \hrulefill \\
  \end{tabularx}
}

\clearpage
\tableofcontents
\listoffigures
\listoftables
\clearpage

\section{Introduction}

\clearpage

\section{Project Schedule}
\newgeometry{vmargin=5mm, hmargin = 1cm} 
\begin{landscape}
	\begin{figure}[h] %%\centering
%		\begin{ganttchart}{1}{12}
%			\gantttitle{Project Schedule}{12} \\
%			\gantttitlelist{1,...,12}{1} \\
%			\ganttgroup{Group 1}{1}{7} \\
%			\ganttbar{Task 1}{1}{2} \\
%			\ganttlinkedbar{Task 2}{3}{7} \ganttnewline
%			\ganttmilestone{Milestone}{7} \ganttnewline
%			\ganttbar{Final Task}{8}{12}
%			\ganttlink{elem2}{elem3}
%			\ganttlink{elem3}{elem4}
%		\end{ganttchart}
	
	 

% https://mirror.foobar.to/CTAN/graphics/pgf/contrib/pgfgantt/pgfgantt.pdf



		\begin{ganttchart}[
			hgrid,
			vgrid,
			x unit=2.5mm,
		%	y unit title=.6cm,
		%	y unit chart=1.5cm,
			time slot format=isodate
			]{2021-09-20}{2021-12-26}
			\gantttitlecalendar{year, month=name, week=38} \\
			\ganttmilestone{Milestone 1}{2021-12-24}\ganttnewline
			\ganttbar{Research}{2021-09-20}{2021-12-26}\ganttnewline
			\ganttbar{Simulation}{2021-09-20}{2021-12-26}\ganttnewline
			\ganttbar{Measurements}{2021-09-20}{2021-12-26}\ganttnewline
			\ganttbar{\textbf{Documentation}}{2021-09-21}{2021-12-20}\ganttnewline
			%%\ganttbar{Projectplan \& Specification}{2021-09-21}{2021-10-05}\ganttnewline
			\ganttbar{Abstract}{2021-09-20}{2021-12-26}\ganttnewline
			\ganttbar{Abstract}{2021-09-20}{2021-12-26}\ganttnewline
			\ganttbar{Print}{2021-12-20}{2021-12-24}\ganttnewline
			\ganttbar{Reserve}{2021-12-01}{2021-12-24}\ganttnewline
			\ganttmilestone{Submission}{2021-12-24}\ganttnewline
			\ganttbar{Presentation prep.}{2021-12-13}{2021-12-24}\ganttnewline
			\ganttmilestone{Presentation}{2021-12-23}
		
			
		\end{ganttchart}
	\end{figure}
\end{landscape}
\restoregeometry % Wieder die alten Ränder
\end{document}
