使用 TeXLive 2020(或 2019)中的 XeTeX,以下代码给出以下输出:
\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}
\frenchspacing
此处没有效果:句号后的空格(例如,“difficulty son” 后的空格)更大。另一方面,只需polyglossia
从相同的代码中删除,即可得到具有正确间距的输出。在第二个示例中,\frenchspacing
正确地防止了句号后的空格变长。
\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}
polyglossia
和之间的这种交互\frenchspacing
与 LuaTeX 相同,但似乎是 TeXLive 2019 和 2020 发行版所独有的。在之前的版本中(我尝试了 2014 和 2018),\frenchspacing
尽管如此,它仍然能够正常工作polyglossia
,正如这个 MWE 所示:
% 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}
您是否知道如何解决此交互问题,并坚持使用 TeXLive 2019/2020?谢谢!
答案1
polyglossia
不破坏\frenchspacing
(或\nonfrenchspacing
)宏就是这样。但不久前每次切换语言时,polyglossia
都会明确启用(\frenchspacing
)或禁用( )法语间距。\nonfrenchspacing
在您的 MWE 中,语言在 中或 周围切换/设置\begin{document}
,因此\frenchspacing
序言中的 会被文档语言的法语间距设置覆盖。因此,将 移到\frenchspacing
之后是\begin{document}
可行的
\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}
\AfterEndPreamble{\frenchspacing}
尽管polyglossia
的gloss
文件可以设置frenchspacing
选项,但我在文档中找不到任何相关内容,所以我不知道是否有官方方法可以更改frenchspacing
语言设置。如果您认为这很有用,您可以随时在https://github.com/reutenauer/polyglossia/issues(也许已经有办法了,只是没有记录下来)。
我已经展示了一种可以启用frenchspacing
所有语言的hackXeLatex 和 polyglossia 的间距不好。