languages
This commit is contained in:
parent
70682c07ed
commit
54e783e19c
8 changed files with 33 additions and 31 deletions
|
@ -11,8 +11,8 @@ AUTHOR_LONG = f'Marc {AUTHOR_NAME}'
|
||||||
MAIN = 'main'
|
MAIN = 'main'
|
||||||
TMP = 'tmp'
|
TMP = 'tmp'
|
||||||
|
|
||||||
ENGLISH = 'en'
|
ENGLISH = 'english'
|
||||||
FRENCH = 'fr'
|
FRENCH = 'french'
|
||||||
LANGUAGES = [ENGLISH, FRENCH]
|
LANGUAGES = [ENGLISH, FRENCH]
|
||||||
|
|
||||||
DOCUMENTS = [
|
DOCUMENTS = [
|
||||||
|
|
|
@ -1,2 +1,28 @@
|
||||||
|
% set languages
|
||||||
|
\usepackage{polyglossia}
|
||||||
|
% recommended
|
||||||
|
\usepackage{csquotes}
|
||||||
|
\setmainlanguage{\mainlanguage}
|
||||||
|
\setotherlanguages{\otherlanguages}
|
||||||
|
|
||||||
|
% imports
|
||||||
|
|
||||||
\input{settings}
|
\input{settings}
|
||||||
\input{variables}
|
\input{variables}
|
||||||
|
|
||||||
|
% 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}}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
\documentclass[aspectratio=1610]{beamer}
|
||||||
|
|
||||||
\input{../common}
|
\input{../common}
|
||||||
|
|
||||||
\input{toc}
|
\input{toc}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
\documentclass[aspectratio=1610]{beamer}
|
|
||||||
\usetheme{Berkeley}
|
\usetheme{Berkeley}
|
||||||
\usecolortheme{seahorse}
|
\usecolortheme{seahorse}
|
||||||
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{../../paper}}
|
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{../../paper}}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
% set default size and document class
|
||||||
|
\documentclass[12pt]{report}
|
||||||
|
|
||||||
\input{../common}
|
\input{../common}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
% set default size and document class
|
|
||||||
\documentclass[12pt]{report}
|
|
||||||
|
|
||||||
% acronyms, glossary
|
% acronyms, glossary
|
||||||
\usepackage[acronym,toc]{glossaries}
|
\usepackage[acronym,toc]{glossaries}
|
||||||
\makeglossaries
|
\makeglossaries
|
||||||
|
@ -45,13 +42,6 @@ bmargin=20mm,lmargin=20mm,rmargin=20mm,tmargin=20mm]{geometry}
|
||||||
% lists of figures, tables
|
% lists of figures, tables
|
||||||
\usepackage{tocbibind}
|
\usepackage{tocbibind}
|
||||||
|
|
||||||
% set languages
|
|
||||||
\usepackage{polyglossia}
|
|
||||||
% recommended
|
|
||||||
\usepackage{csquotes}
|
|
||||||
\setmainlanguage{\mainlanguage}
|
|
||||||
\setotherlanguages{\otherlanguages}
|
|
||||||
|
|
||||||
% references after polyglossia
|
% references after polyglossia
|
||||||
\usepackage[sorting=anyt]{biblatex}
|
\usepackage[sorting=anyt]{biblatex}
|
||||||
\bibliography{\name}
|
\bibliography{\name}
|
||||||
|
@ -69,21 +59,3 @@ bmargin=20mm,lmargin=20mm,rmargin=20mm,tmargin=20mm]{geometry}
|
||||||
%\setlength{\parsep}{0em}
|
%\setlength{\parsep}{0em}
|
||||||
%\setlength{\parskip}{0em}
|
%\setlength{\parskip}{0em}
|
||||||
}{\end{itemize}}
|
}{\end{itemize}}
|
||||||
|
|
||||||
|
|
||||||
% handle multiple languages
|
|
||||||
|
|
||||||
\newcommand{\ifstreq}[4]{\expandafter\ifstrequal\expandafter{#1}{#2}{#3}{#4}}
|
|
||||||
|
|
||||||
\def\todo{TODO}
|
|
||||||
|
|
||||||
\newcommand{\ml}[2]{%
|
|
||||||
\ifstreq{\mainlanguage}{en}{\ifstrempty{#1}{\todo}{#1}}{%
|
|
||||||
\ifstreq{\mainlanguage}{fr}{\ifstrempty{#2}{\todo}{#2}}{%
|
|
||||||
ERROR%
|
|
||||||
}}%
|
|
||||||
}
|
|
||||||
|
|
||||||
\newcommand{\en}[1]{\textenglish{#1}}
|
|
||||||
|
|
||||||
\newcommand{\fr}[1]{\textfrench{#1}}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue