[Tex/LaTex] best practice international template

babelbest practicesfont-encodingsinput-encodingsmicrotype

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}

Best Answer

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}
\usepackage[capitalize,nameinlink,noabbrev]{cleveref}
\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.

Related Question