cnam.marc/cnam/travaux/thesis/settings.tex

95 lines
1.9 KiB
TeX
Raw Normal View History

2020-10-18 01:15:58 +02:00
% variables
2020-10-18 01:20:02 +02:00
2020-10-18 01:15:58 +02:00
\def\authorname{BENINCA}
\def\authorshort{M. \authorname}
\def\authorlong{Marc \authorname}
2020-10-18 01:20:02 +02:00
\def\dateshort{2021}
\def\datelong{\ml{Month DD, \dateshort}{JJ Mois \dateshort}}
2020-10-18 01:33:33 +02:00
\def\instituteshort{CNAM}
\def\institutelong{Conservatoire National des Arts et Métiers}
2020-10-18 00:24:08 +02:00
% 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}
2020-10-29 08:52:33 +01:00
% return text, according to variable mainlanguage
% 1: english text
% 2: french text
% FIXME english→\ENGLISH, french→\FRENCH
2020-10-18 00:24:08 +02:00
\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}}
2020-10-18 01:53:11 +02:00
% 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}}
2020-10-19 12:25:26 +02:00
\ml
{\def\typeshort{Thesis}}
{\def\typeshort{Mémoire}}
\ml
{\def\typelong{\instituteshort\ Master's \typeshort}}
{\def\typelong{\typeshort\ d’Ingénieur \instituteshort}}
2020-10-19 16:11:13 +02:00
% set key words
2020-10-19 16:27:51 +02:00
\def\kwaen{one, two, three, four}
\def\kwafr{un, deux, trois, quatre}
\def\kwben{five, six, seven, eight}
\def\kwbfr{cinq, six, sept, huit}
2020-10-19 16:11:13 +02:00
\newcommand{\kwa}[1]{%
2020-10-29 08:15:16 +01:00
\ifstreq{#1}{\ENGLISH}{\kwaen}{}%
\ifstreq{#1}{\FRENCH}{\kwafr}{}%
2020-10-19 16:11:13 +02:00
}
\newcommand{\kwb}[1]{%
2020-10-29 08:15:16 +01:00
\ifstreq{#1}{\ENGLISH}{\kwben}{}%
\ifstreq{#1}{\FRENCH}{\kwbfr}{}%
2020-10-19 16:11:13 +02:00
}
2020-10-19 12:25:26 +02:00
2020-10-19 16:27:51 +02:00
\ml
{\def\kw{\kwaen, \kwben}}
{\def\kw{\kwafr, \kwbfr}}
2020-10-19 12:25:26 +02:00
% links and pdf metadata
\usepackage{hyperref}
\hypersetup{
pdfinfo={
Subject={\typelong},
2020-10-19 16:27:51 +02:00
Keywords={\kw},
2020-10-19 12:25:26 +02:00
},
}
2020-10-18 10:55:36 +02:00
% imports
\input{settings}
2020-10-18 01:53:11 +02:00
% begin document
\begin{document}