aboutsummaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorlwolfsonkin <lawrencews@jhu.edu>2017-05-18 16:42:18 -0400
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-18 22:42:18 +0200
commitb45e47735c4f7f2a0e4493d156a43e603615f398 (patch)
treeeda369c0d66efc91858703eb4f3453299a9e9f7e /data/templates
parent689a8dcd5f5447be9a479f500269119a8e41c137 (diff)
downloadpandoc-b45e47735c4f7f2a0e4493d156a43e603615f398.tar.gz
modified template.latex to fix XeLaTex being used with tables (#3661)
- reordered `lang` variable handling to immediately before `bidi`
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/default.latex29
1 files changed, 15 insertions, 14 deletions
diff --git a/data/templates/default.latex b/data/templates/default.latex
index 7630d34f4..156c43985 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -112,20 +112,6 @@ $endif$
$if(geometry)$
\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
$endif$
-$if(lang)$
-\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
- \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
-$if(babel-newcommands)$
- $babel-newcommands$
-$endif$
-\else
- \usepackage{polyglossia}
- \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
-$for(polyglossia-otherlangs)$
- \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
-$endfor$
-\fi
-$endif$
$if(natbib)$
\usepackage{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
@@ -191,6 +177,21 @@ $else$
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
$endif$
+$if(lang)$
+\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
+ \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
+$if(babel-newcommands)$
+ $babel-newcommands$
+$endif$
+\else
+ % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic)
+ \usepackage{polyglossia}
+ \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
+$for(polyglossia-otherlangs)$
+ \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
+$endfor$
+\fi
+$endif$
$if(dir)$
\ifxetex
% load bidi as late as possible as it modifies e.g. graphicx