4

Using XeTeX from TeXLive 2020 (or 2019), the following code gives the following output:

\documentclass[12pt]{article}
\usepackage{polyglossia}
\frenchspacing
\begin{document}
Sociable on as carriage my position weddings raillery consider.
Peculiar trifling absolute and wandered vicinity property yet.
The and collecting motionless difficulty son. His hearing staying
ten colonel met. Sex drew six easy four dear cold deny. Moderate
children at of outweigh it. Unsatiable it considered invitation
he travelling insensible. Consulted admitting oh mr up as
described acuteness propriety moonlight.
\end{document}

enter image description here

\frenchspacing has no effect here: the spaces after the periods (e.g., after "difficulty son") are larger. On the other hand, just removing polyglossia from the same code, yields the output with the correct spacing. In this second example, \frenchspacing correctly prevents longer spaces after periods.

\documentclass[12pt]{article}
%\usepackage{polyglossia}
\frenchspacing
\begin{document}
Sociable on as carriage my position weddings raillery consider.
Peculiar trifling absolute and wandered vicinity property yet.
The and collecting motionless difficulty son. His hearing staying
ten colonel met. Sex drew six easy four dear cold deny. Moderate
children at of outweigh it. Unsatiable it considered invitation
he travelling insensible. Consulted admitting oh mr up as
described acuteness propriety moonlight.
\end{document}

enter image description here

This interaction between polyglossia and \frenchspacing replicates with LuaTeX, but seems to be exclusive of the TeXLive 2019 and 2020 distributions. In previous releases (I tried 2014 and 2018), \frenchspacing does its job despite polyglossia, as this MWE shows:

% Compiled with XeTeX from TeXLive 2018
\documentclass[12pt]{article}
\usepackage{polyglossia}
\frenchspacing
\begin{document}
Sociable on as carriage my position weddings raillery consider.
Peculiar trifling absolute and wandered vicinity property yet.
The and collecting motionless difficulty son. His hearing staying
ten colonel met. Sex drew six easy four dear cold deny. Moderate
children at of outweigh it. Unsatiable it considered invitation
he travelling insensible. Consulted admitting oh mr up as
described acuteness propriety moonlight.
\end{document}

enter image description here

Do you have any idea how this interaction can be fixed, sticking with TeXLive 2019/2020? Thanks!

efl
  • 357

1 Answers1

4

polyglossia doesn't break the \frenchspacing (or \nonfrenchspacing) macro as such. But a short while ago polyglossia started explicitly enabling (\frenchspacing) or disabling (\nonfrenchspacing) French spacing each time the language is switched.

In your MWE the language is switched/set in or around \begin{document}, so a \frenchspacing in the preamble is overridden by the French spacing settings of the document language. Hence, moving the \frenchspacing to after \begin{document} works

\documentclass[12pt]{article}
\usepackage{polyglossia}

\begin{document} \frenchspacing Sociable on as carriage my position weddings raillery consider. Peculiar trifling absolute and wandered vicinity property yet. The and collecting motionless difficulty son. His hearing staying ten colonel met. Sex drew six easy four dear cold deny. Moderate children at of outweigh it. Unsatiable it considered invitation he travelling insensible. Consulted admitting oh mr up as described acuteness propriety moonlight. \end{document}

That can also be done from the preamble via a hook as suggested in Ulrike Fischer's comment

\AfterEndPreamble{\frenchspacing}

Even though polyglossia's gloss files can set a frenchspacing option, I couldn't find anything in the documentation about that, so I don't know if there is an official way to change the frenchspacing settings for a language. If you think that would be useful, you can always open a feature request at https://github.com/reutenauer/polyglossia/issues (maybe there already is a way and it's just not documented).

I have shown a hack to enable frenchspacing for all languages in Bad spacing with XeLatex and polyglossia.

moewe
  • 175,683
  • I have a very similar issue with babel, but I can't really reproduce it in a MWE. Have you heard anything like that? – Kazi bácsi Dec 14 '20 at 20:57
  • 1
    @Kazibácsi I'm not aware of anything off the top of my head, sorry. You can of course try the suggestion from this answer, but if that doesn't help, I don't think I can offer you anything more. I'll be happy to look into your problem, but without an MWE I wouldn't even know where to start, sorry. – moewe Dec 14 '20 at 21:32