Add multilanguage support (polyglossia package)

This commit is contained in:
zool 2015-10-22 15:07:02 +02:00
parent f311ca6c1e
commit 274a8a503d
3 changed files with 11 additions and 3 deletions

View File

@ -3,5 +3,3 @@
1. Add support for `microtype` 1. Add support for `microtype`
2. Add icons for the links 2. Add icons for the links
3. Add ability to expand on the single jobs 3. Add ability to expand on the single jobs
4. Add support for different languages
5. Add single packages dependencies

View File

@ -50,4 +50,6 @@ education:
mainfont: Hoefler Text # Any font installed on your system should work mainfont: Hoefler Text # Any font installed on your system should work
fontsize: 10pt # possible values: 10pt, 11pt, 12pt fontsize: 10pt # possible values: 10pt, 11pt, 12pt
geometry: a4paper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in # See how the package geometry works at https://www.sharelatex.com/learn/Page_size_and_margins geometry: a4paper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in # See how the package geometry works at https://www.sharelatex.com/learn/Page_size_and_margins
mainlang: English
# otherlang: German
--- ---

View File

@ -2,7 +2,6 @@
%!TEX encoding = UTF-8 Unicode %!TEX encoding = UTF-8 Unicode
\documentclass[$fontsize$, a4paper]{article} \documentclass[$fontsize$, a4paper]{article}
\usepackage{fontspec}
% LAYOUT % LAYOUT
%-------------------------------- %--------------------------------
@ -15,8 +14,17 @@
% No page numbers % No page numbers
\pagenumbering{gobble} \pagenumbering{gobble}
% LANGUAGE
%--------------------------------
$if(lang)$
\usepackage{polyglossia}
\setmainlanguage{$mainlang$}
\setotherlanguages{$for(otherlang)$$otherlang$$sep$,$endfor$}
$endif$
% TYPOGRAPHY % TYPOGRAPHY
%-------------------------------- %--------------------------------
\usepackage{fontspec}
\usepackage{xunicode} \usepackage{xunicode}
\usepackage{xltxtra} \usepackage{xltxtra}