2

I'm working on multilingual documents and noticed that the command \textenglish gets extra spaces in output.

\documentclass{article}
\usepackage{polyglossia}
  \setdefaultlanguage{french}
  \setotherlanguages{english,spanish}
\begin{document}
\noindent \textbf{Résumé:} Et voilà!

\noindent \textenglish{\textbf{Summary:}} Here it is.

\noindent \textspanish{\textbf{Resumen:}} Esto está bien.    
\end{document}

Result of MWE with English text surrounded with extra spaces

The French and Spanish lines are correct, the English one is not. I'm getting too much space before Summary and before Here, that is, around \textenglish{}. (Of course, Here it is would be marked as English as well, but that's another matter. :-)

I usually work with the memoir class and xelatex.

I tried placing some \ignorespaces, inside or around the \textenglish, but to no avail.

Can anyone help correcting this?

1 Answers1

5

missing % in gloss-english but you can correct it in document:

Note This is already fixed in the sources for the next release.

\documentclass{article}
\usepackage{polyglossia}

  \setdefaultlanguage{french}
  \setotherlanguages{english,spanish}

\makeatletter
\def\english@language{%
   \polyglossia@setup@language@patterns{\english@variant}%egreg's favourite
}%
\makeatother

\begin{document}
\noindent \textbf{Résumé:} Et voilà!

\noindent \textenglish{\textbf{Summary:}} Here it is.

\noindent \textspanish{\textbf{Resumen:}} Esto está bien.    
\end{document}
David Carlisle
  • 757,742
  • The same is also happening with french, greek and portuges. The same hack fixes french and greek as well, thanks again. But portuges remains broken. Catalan, ngerman and italian all work fine in this respect. – ondelettes Feb 21 '20 at 13:21