Permalink
Browse files

Better language defaults in LaTeX template.

Thansk to Francois Gannaz.  The lang variable is now included, if set,
in documentclass options.  polyglossia is used instead of babel if
xetex.
  • Loading branch information...
1 parent 5aaa69e commit 49e113d0d16abc10e77a65c9b5423306208664be John MacFarlane committed Mar 5, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 default.latex
View
@@ -1,4 +1,4 @@
-\documentclass[$if(fontsize)$$fontsize$,$endif$]{$documentclass$}
+\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$]{$documentclass$}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
@@ -93,7 +93,12 @@ $if(verbatim-in-note)$
\VerbatimFootnotes % allows verbatim text in footnotes
$endif$
$if(lang)$
-\usepackage[$lang$]{babel}
+\ifxetex
+ \usepackage{polyglossia}
+ \setmainlanguage{$lang$}
+\else
+ \usepackage[$lang$]{babel}
+\fi
$endif$
$for(header-includes)$
$header-includes$

0 comments on commit 49e113d

Please sign in to comment.