cnam.marc/cnam/travaux/thesis/settings.tex
2020-10-19 16:11:13 +02:00

80 lines
1.7 KiB
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\instituteshort{CNAM}
\def\institutelong{Conservatoire National des Arts et Métiers}
% set languages
\usepackage{polyglossia}
% recommended
\usepackage{csquotes}
\setmainlanguage{\mainlanguage}
\setotherlanguages{\otherlanguages}
% 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}}
% variables
\def\titleshort{\ml{Incremental Live OS}{SE autonomes incrémentaux}}
\ml
{\def\titlelong{Incremental Live Operating Systems}
\def\titlesub{a reversal of conventional approaches}}
{\def\titlelong{Systèmes d’Exploitation autonomes incrémentaux}
\def\titlesub{une inversion des approches conventionnelles}}
\ml
{\def\typeshort{Thesis}}
{\def\typeshort{Mémoire}}
\ml
{\def\typelong{\instituteshort\ Master's \typeshort}}
{\def\typelong{\typeshort\ d’Ingénieur \instituteshort}}
% set key words
\newcommand{\kwa}[1]{%
\ifstreq{#1}{english}{one, two, three, four}{}%
\ifstreq{#1}{french}{un, deux, trois, quatre}{}%
}
\newcommand{\kwb}[1]{%
\ifstreq{#1}{english}{five, six, seven, eight}{}%
\ifstreq{#1}{french}{cinq, six, sept, huit}{}%
}
% links and pdf metadata
\usepackage{hyperref}
\hypersetup{
pdfinfo={
Subject={\typelong},
Keywords={\kwa{\mainlanguage}, \kwb{\mainlanguage}},
},
}
% imports
\input{settings}
% begin document
\begin{document}