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'
|
||||
TMP = 'tmp'
|
||||
|
||||
ENGLISH = 'en'
|
||||
FRENCH = 'fr'
|
||||
ENGLISH = 'english'
|
||||
FRENCH = 'french'
|
||||
LANGUAGES = [ENGLISH, FRENCH]
|
||||
|
||||
DOCUMENTS = [
|
||||
|
|
|
@ -1,2 +1,28 @@
|
|||
% set languages
|
||||
\usepackage{polyglossia}
|
||||
% recommended
|
||||
\usepackage{csquotes}
|
||||
\setmainlanguage{\mainlanguage}
|
||||
\setotherlanguages{\otherlanguages}
|
||||
|
||||
% imports
|
||||
|
||||
\input{settings}
|
||||
\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{toc}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
\documentclass[aspectratio=1610]{beamer}
|
||||
\usetheme{Berkeley}
|
||||
\usecolortheme{seahorse}
|
||||
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{../../paper}}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
% set default size and document class
|
||||
\documentclass[12pt]{report}
|
||||
|
||||
\input{../common}
|
||||
|
||||
\begin{document}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
% set default size and document class
|
||||
\documentclass[12pt]{report}
|
||||
|
||||
% acronyms, glossary
|
||||
\usepackage[acronym,toc]{glossaries}
|
||||
\makeglossaries
|
||||
|
@ -45,13 +42,6 @@ bmargin=20mm,lmargin=20mm,rmargin=20mm,tmargin=20mm]{geometry}
|
|||
% lists of figures, tables
|
||||
\usepackage{tocbibind}
|
||||
|
||||
% set languages
|
||||
\usepackage{polyglossia}
|
||||
% recommended
|
||||
\usepackage{csquotes}
|
||||
\setmainlanguage{\mainlanguage}
|
||||
\setotherlanguages{\otherlanguages}
|
||||
|
||||
% references after polyglossia
|
||||
\usepackage[sorting=anyt]{biblatex}
|
||||
\bibliography{\name}
|
||||
|
@ -69,21 +59,3 @@ bmargin=20mm,lmargin=20mm,rmargin=20mm,tmargin=20mm]{geometry}
|
|||
%\setlength{\parsep}{0em}
|
||||
%\setlength{\parskip}{0em}
|
||||
}{\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