\babelhyphenation:为什么提高点球会导致破门?

\babelhyphenation:为什么提高点球会导致破门?

喂食

\documentclass[ngerman]{article}
\textwidth=104.2mm
\usepackage{fontspec}
\usepackage[ngerman]{babel}
\babelprovide[hyphenrules=ngerman-x-latest]{ngerman}%%% according to the documentation of dehyph-exptl.
\usepackage[math-style=ISO]{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
\newcommand{\parComp}{\Umathchar"2"2"02225 }%%% standard ‖ as a binary operator (usually, it is a relation defined as the symbol itself)
% \babelposthyphenation{ngerman}{Zu|stands|ma|schi|nen}%% set the preferences of the hyphenation points in „Zustandsmaschinen“  (German for the plural “state machines”)
% {
%   {}, {},                 % Zu
%   {pre=-,penalty=50,data=2},
%   {}, {}, {}, {}, {}, {}, % stands
%   {pre=-,penalty=50,data=9}, % we wish to have penalty=49. But 50 (default) would also do for this MWE.
%   {}, {},                 % ma
%   {pre=-,penalty=50,data=12}, % we wish to have penalty=51. But penalty=50 would also do for this MWE.
%   {}, {}, {}, {},         % schi
%   {pre=-,penalty=51,data=17},
%   {}, {}, {}              % nen
% }% the arithmetic mean of the penalties is 50.25
\begin{document}%
\noindent
Wir definieren die Komposition \((\Delta_1,\Sigma_1^0)\parComp(\Delta_i,\Sigma_2^0)\) der Zustandsmaschinen zu einer Zustandsmaschine mit
\end{document}

不会lualatex在单词内引入任何中断。但是,如果我们通过取消注释来稍微提高连字符位置“Zustandmaschi-nen”的惩罚

\babelposthyphenation{ngerman}{Zu|stands|ma|schi|nen}%% set the preferences of the hyphenation points in „Zustandsmaschinen“
{
  {}, {},                 % Zu
  {pre=-,penalty=50,data=2},
  {}, {}, {}, {}, {}, {}, % stands
  {pre=-,penalty=50,data=9}, % we wish to have penalty=49. But 50 (default) would also do for this MWE.
  {}, {},                 % ma
  {pre=-,penalty=50,data=12}, % we wish to have penalty=51. But penalty=50 would also do for this MWE.
  {}, {}, {}, {},         % schi
  {pre=-,penalty=51,data=17},
  {}, {}, {}              % nen
}% the arithmetic mean of the penalties is 50.25

,我们确实在那里得到了一个断点。下面,左侧显示了没有 的上述代码的输出\babelposthyphenation{ngerman}{…}{…},右侧显示了带有 的代码的输出 \babelposthyphenation{ngerman}{…}{…}

diffpdf 输出

  1. 为什么会发生这种情况?

  2. 谁是罪魁祸首?

  3. 如果引入

    \babelposthyphenation{ngerman}{Zu|stands|ma|schi|nen}%% set the preferences of the hyphenation points in „Zustandsmaschinen“
    {
      {}, {},                 % Zu
      {pre=-,penalty=50,data=2},
      {}, {}, {}, {}, {}, {}, % stands
      {pre=-,penalty=49,data=9},
      {}, {},                 % ma
      {pre=-,penalty=51,data=12},
      {}, {}, {}, {},         % schi
      {pre=-,penalty=51,data=17},
      {}, {}, {}              % nen
    }% the arithmetic mean of the penalties is 50.25
    

    导致之前没有被破坏的“Zustandsmaschinen”完全被破坏,连字符会是“Zustands-maschinen”吗?

顺便说一句,单数单词“Zustandsmaschine”(德语,意为“状态机”)也会出现类似的情况:

\documentclass[ngerman]{article}
\textwidth=108.39mm
\usepackage{fontspec}
\usepackage[ngerman]{babel}
\usepackage{unicode-math}
\setmainfont{TeX Gyre Termes}
\setmathfont{TeX Gyre Termes Math}
% \babelposthyphenation{ngerman}{Zu|stands|ma|schi|ne}%% set the preferences of the hyphenation points in „Zustandsmaschine“
% {
%   {}, {},                 % Zu
%   {pre=-,penalty=50,data=2},
%   {}, {}, {}, {}, {}, {}, % stands
%   {pre=-,penalty=49,data=9},
%   {}, {},                 % ma
%   {pre=-,penalty=51,data=12},
%   {}, {}, {}, {},         % schi
%   {pre=-,penalty=51,data=17},
%   {}, {}                  % ne
% }% the arithmetic mean of the penalties is 50.25
\begin{document}\noindent
Eine Menge \(M\subseteq A\) von Aktionen stellt ein \emph{Angebot} für eine Zustandsmaschine in einem Zustand \(\sigma\) dar.
Das Angebot wird angenommen, wenn in dem

\noindent
Eine Menge \(M\subseteq A\) von Aktionen stellt ein \emph{Angebot} für eine Zustandsmaschine in einem Zustand \(\sigma\) dar.
Das Angebot wird angenommen, wenn in dem Zustand
\end{document}

在左侧,我们看到没有 的输出\babelposthyphenation{…}{…}{…},在右侧,我们看到带有 的输出\babelposthyphenation{…}{…}{…}

diffpdf 输出

这不应该发生。

相关内容