# best practice international template

I would like to have a template which can be internationalised (i.e. is suited for latin script languages) and uses the microtype package. I suppose that we therefore need the following packages:

• babel (we can always set it to english)
• inputenc (for using international characters)
• fontenc (for printing international characters correctly)
• lmodern (since fontenc changes the font, we want to change is back)
• microtype (better looking text)
• possibly csquotes

Below is the document now, please provide suggestions for improving the template e.g. the sequence in which the packages are called.

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[babel=true]{microtype}
\usepackage{csquotes}

\begin{document}

Hello World!

\end{document}

-
If you're going to be accommodating non-latin scripts, it's probably best to set things up for XeLaTeX rather than LaTeX. this means replacing babel with polyglossia. It will also require otehr changes to your list of packages but I can't remember exactly what now. –  Seamus Jun 18 '12 at 12:29
I would recommend loading inputenc after lmodern, otherwise some characters can be incorrect (e.g. \textbackslash). As well, it is really unclear what do you mean by "internationalised", please try to make clear what are your intentions. –  tohecz Jun 18 '12 at 12:31
Ok thanks for the comments. I changed the order of inputenc and lmodern. With Internationalised I mean, for other languages which use latin scripts. –  bquast Jun 18 '12 at 12:47
@tohecz inputenc has nothing to do with output encodings; it reads some files depending on the loaded output encodings, but LaTeX eventually relies on fontenc to assign the meaning to \textbackslash. lmodern says nothing about \textbackslash. –  egreg Jun 18 '12 at 12:58
@bquast There's no T1 option to lmodern. –  egreg Jun 18 '12 at 12:58

Using cleveref complicates it a bit. You must pass the desired language(s) either to the documentclass or directly to cleveref. Furthermore it does not work together with polyglossia's version of \selectlanguage{}.

csquotes supports \selectlanguage{}, but states in its manual that "polyglossia support is currently in a preliminary state".

So until better support for polyglossia my documents looks like this:

\documentclass[english,danish]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{lmodern}
\usepackage[kerning,spacing,babel]{microtype}
\usepackage[autostyle]{csquotes}
\begin{document}
\selectlanguage{danish}
...


Now I don't have to edit my preamble every time I want to switch language. It even support switching language during a document.

-

Since the decimal separator can be different in different countries (either a full stop or a comma), I will suggest that you either add the icomma-package or adapt the code from Claudio Beccari's article in The PracTEX Journal, 2011, No. 1.

Another intelligent comma-package is ncccomma, which, according to the author and other sources I found on Internet, is even smarter than icomma. According to its documentation:

The solution used in this package is more expansive (i.e. compared to icomma. My comment) because we compare the next character with up to ten decimal chars. But this solution needs less number of spaces to be inserted into original document (the space is only necessary in the place of a comma delimiting something and a decimal number).

I am not aware that these packages should be loaded in any specific order (before hyperref, of course).

You should also consider to add the siunitx-package. See this link at tex.stackexchange.com: German language: use of comma in numbers.

(microtype should have the option babel=true?)

-
Good point, Dutch (and most other European languages) also does this. Which is the proper place to put those? –  bquast Jun 18 '12 at 13:52
According to the manual, the default value is babel=false. So use babel=true or just the shorthand babel. –  Jonas Nyrup Jun 18 '12 at 17:05
ok I'll add the babel=true option –  bquast Jun 18 '12 at 17:13