Unwanted space appears before Latin language text inside an outer French environment when using Polyglossia. This does not happen when the outer environment language is English.
In my example, when compiled with xelatex
, the first line inside the French environment looks fine, as no language commands are used. The second and third line have an extra space before the word verbum.
How to get rid of the unwanted space? Is there a canonical solution? Or am I using Polyglossia in a wrong way here?
MWE:
\documentclass[12pt]{article}
% Use polyglossia for many languages.
\usepackage{polyglossia}
\setdefaultlanguage{latin}
\setotherlanguage{french}
% Create a command to show Latin words in italics.
\newcommand{\lat}[1]{\textlatin{\textit{#1}}}
\begin{document}
Latine hic. Etiam pars Gallica sequitur:
\begin{french}
% This looks OK.
En français ici. Mais \textit{verbum} en latin!
% The word verbum has extra white space before it.
En français ici. Mais \textlatin{\textit{verbum}} en latin!
% The word verbum has extra white space before it.
En français ici. Mais \lat{verbum} en latin!
\end{french}
\end{document}