polyglossia:如何为所有地方的所有语言设置“\frenchspacing”?

polyglossia:如何为所有地方的所有语言设置“\frenchspacing”?

如何在以下 MEW 中禁用所有语言的句子之间的双倍空格?

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}

\setmainlanguage{german}
\setotherlanguages{english}

\parindent=0pt

\begin{document}

This. Is a sentence in the main language (german). 

\begin{english}
This. Is a sentence in english environment.
\end{english}

This. Is a sentence in the main language (german). 

\textenglish{This. Is a sentence in textenglish [double space between
sentences].}

This. Is a sentence in the main language (german). 

\end{document}

在此处输入图片描述

奇怪的是,非法语间距仅出现在\textenglish英文文本的内联版本中,而不是块版本中。

答案1

% !TeX TS-program = xelatex

\documentclass{article}
\usepackage{fontspec}
\usepackage{polyglossia}

\setmainlanguage{german}
\setotherlanguages{english}

\parindent=0pt

\appto{\textenglish}{\frenchspacing}


\begin{document}

\frenchspacing

This. Is a sentence in the main language (german). 

\begin{english}
This. Is a sentence in english environment.
\end{english}

This. Is a sentence in the main language (german). 

\textenglish{This. Is a sentence in textenglish [double space between
sentences].}

This. Is a sentence in the main language (german). 

\end{document}

在此处输入图片描述

相关内容