From e3cfba292613faa21c61d539f6e33929fd08fade Mon Sep 17 00:00:00 2001 From: mb21 Date: Sat, 17 Oct 2015 17:48:06 +0200 Subject: [PATCH] LaTeX and beamer templates: add babel-otherlangs and babel-newcommands --- default.beamer | 7 ++++--- default.latex | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/default.beamer b/default.beamer index 8cab25b8e..f3f038833 100644 --- a/default.beamer +++ b/default.beamer @@ -67,14 +67,15 @@ $endif$ \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} $if(lang)$ -\ifxetex +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$$sep$,$endfor$,main=$babel-lang$]{babel} + $babel-newcommands$ +\else \usepackage{polyglossia} \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} $for(polyglossia-otherlangs)$ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} $endfor$ -\else - \usepackage[shorthands=off,$babel-lang$]{babel} \fi $endif$ $if(natbib)$ diff --git a/default.latex b/default.latex index 0579f304d..4189141ca 100644 --- a/default.latex +++ b/default.latex @@ -80,14 +80,15 @@ $endif$ $if(hidelinks)$,hidelinks,$endif$} \urlstyle{same} % don't use monospace font for urls $if(lang)$ -\ifxetex +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$$sep$,$endfor$,main=$babel-lang$]{babel} + $babel-newcommands$ +\else \usepackage{polyglossia} \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} $for(polyglossia-otherlangs)$ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} $endfor$ -\else - \usepackage[shorthands=off,$babel-lang$]{babel} \fi $endif$ $if(natbib)$