%[TLP:CLEAR]
% MANCHOT
%
% Manchot is an Astrophysics package aNd Class to Help writing dOcuments in Tex 
% (MANCHOT)
%
%@ Author: Moussouni, Yaël (MSc student; yael.moussouni@etu.unistra.fr)
%@ Institution:  Université de Strasbourg, CNRS, Observatoire astronomique
%                de Strasbourg, UMR 7550, F-67000 Strasbourg, France
%@ Date: 2025-05-03
%
% Licence:
% MSc2 Internship: SMACS Cluster
% Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr)
% 
% article_commands.tex
% Copyright (C) 2025 Yaël Moussouni (yael.moussouni@etu.unistra.fr)
% 
% This program is free software: you can redistribute it and/or modify 
% it under the terms of the GNU General Public License as published by 
% the Free Software Foundation; either version 3 of the License, or 
% (at your option) any later version.
% 
% This program is distributed in the hope that it will be useful, 
% but WITHOUT ANY WARRANTY; without even the implied warranty of 
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
% GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License 
% along with this program. If not, see www.gnu.org/licenses/.

\newcommand{\setWarning}[1]{\def\yii@warning{{#1}}}
\newcommand{\setTitle}[1]{\def\yii@title{{#1}}}
\newcommand{\setSubtitle}[1]{\def\yii@subtitle{{#1}}}
\newcommand{\setAuthor}[1]{\def\yii@author{{#1}}}
\newcommand{\setInstitution}[1]{\def\yii@institution{{#1}}}
\newcommand{\setDivision}[1]{\def\yii@division{{#1}}}
\newcommand{\setDate}[1]{\def\yii@date{{#1}}}

\newcommand{\getWarning}{\yii@warning}
\newcommand{\getTitle}{\yii@title}
\newcommand{\getSubtitle}{\yii@subtitle}
\newcommand{\getAuthor}{\yii@author}
\newcommand{\getInstitution}{\yii@institution}
\newcommand{\getDivision}{\yii@division}
\newcommand{\getDate}{\yii@date}

\newcommand{\setHeadTopLeft}[1]{\def\yii@headtopleft{{#1}}}
\newcommand{\setHeadBottomLeft}[1]{\def\yii@headbottomleft{{#1}}}
\newcommand{\setHeadTopRight}[1]{\def\yii@headtopright{{#1}}}
\newcommand{\setHeadBottomRight}[1]{\def\yii@headbottomright{{#1}}}

% Title page

\DeclareDocumentCommand\shorttitle{}{
     \setlength\varparindent{\parindent}
     \setlength\parindent{0em}
     \iftwocolumn
	  \begin{strip}
	       \vspace*{-2\baselineskip}
	       \maketitle
	  \end{strip}
     \else
	  \maketitle
     \fi
     \setlength\parindent{\varparindent}
}

\DeclareDocumentCommand\longtitle{s o m}{
     \setlength\varparindent{\parindent}
     \setlength\varparskip{\parskip}
     \setlength\parindent{0em}
     \setlength\parskip{0em}
     \iftwocolumn
	  \onecolumn
     \fi
     \thispagestyle{empty}
     \IfBooleanTF{#1}{
	  \vspace*{5cm}
     }{
	  \noindent\includegraphics[height=2cm]{#3}
	  \vspace*{3cm}
     }
     \begin{spacing}{1.7}
	  \begin{center}
	       {\huge\noindent\yii@title}

	       \vspace*{1cm}
	       
	       {\LARGE\noindent\yii@subtitle}
	       \vspace*{1cm}
	       
	       {\large\noindent\yii@author}\\
	       {\large\noindent\yii@institution}\\
	       {\large\noindent\yii@division}

	       \vspace*{1cm}
	       {\large\noindent\yii@date}
	  \end{center}
     \end{spacing}
     \IfValueT{#2}{
	  \vfill
	  \begin{center}
	       \noindent{#2}
	  \end{center}
	  \vfill
     }
     \newpage
     \tableofcontents
     \newpage
     \iftwocolumn
	  \twocolumn
     \fi
     \setlength\parindent{\varparindent}
     \setlength\parskip{\varparskip}
}

