cnam.marc/cnam/travaux/thesis/common.tex
2020-10-18 01:20:02 +02:00

40 lines
844 B
TeX

% variables
\def\authorname{BENINCA}
\def\authorshort{M. \authorname}
\def\authorlong{Marc \authorname}
\def\dateshort{2021}
\def\datelong{\ml{Month DD, \dateshort}{JJ Mois \dateshort}}
\def\typeshort{\ml{Thesis}{Mémoire}}
\def\typelong{\ml{CNAM Master's \typeshort}
{\typeshort\ d’Ingénieur CNAM}}
% set languages
\usepackage{polyglossia}
% recommended
\usepackage{csquotes}
\setmainlanguage{\mainlanguage}
\setotherlanguages{\otherlanguages}
% imports
\input{settings}
% handle multiple languages
\newcommand{\ifstreq}[4]{\expandafter\ifstrequal\expandafter{#1}{#2}{#3}{#4}}
\def\todo{TODO}
\newcommand{\ml}[2]{%
\ifstreq{\mainlanguage}{english}{\ifstrempty{#1}{\todo}{#1}}{%
\ifstreq{\mainlanguage}{french}{\ifstrempty{#2}{\todo}{#2}}{%
ERROR%
}}%
}
\newcommand{\en}[1]{\textenglish{#1}}
\newcommand{\fr}[1]{\textfrench{#1}}