眾所周知,pdfTeX 試圖以一種巧妙的方式應用字元突出。將水平列表分成行時,字符突出的(隱式)字距調整會插入到每個結果 'es 的邊緣附近,\hbox
以根據行中最左邊/最右邊字符的 / 推測字距調整量,即使字符被埋在嵌套的'es 內,或者如果其他粘合或緊排,甚至空'es,介入字符本身和行邊緣之間。另一方面,縮排框的存在抑制了「左邊距」緊縮。因此,我們看到字元突出會繞過水平列表中的某些類型的節點,但不會繞過其他類型的節點。\lpcode
\rpcode
\hbox
\hbox
我試圖找到管理“邊距”緊排插入的規則的確切規範,但沒有成功。然而,我注意到設定值的規則,例如, \rightmarginkern
並不總是與插入此類緊排的“同步”。例如,考慮以下程式碼:
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[protrusion]{microtype} % protrusion option is actually redundant,
% but I want to be safe!
\begin{document}
First of all, \( \verb|\parfillskip| = \mbox{\the\parfillskip} \).
Secondarily, the main font is ``\fontname\the\font'': in this font the
\verb|\rpcode| of the character~``.'' is \the\rpcode\font`. \space and the
\verb|\lpcode| of the character~``('' is \the\lpcode\font`( . % paren match )
Now we typeset a paragraph which, while containing the usual \verb|\parfillskip|
glue, whose value is specified above, ends flush with the right margin because
it contains a \verb|\hfill| command:\hfill
(here!).\special{comment:Do you see the kern?}
(Another example for protrusion into the left margin,\hfill using
parentheses.)\linebreak (We force a left parenthesis at the beginning of a
line.)
\begingroup
% Show that protrusion _is_ applied "through" the \parfillskip glue:
\showboxbreadth = 1000
\showboxdepth = 5
\showlists
% But if we ask for the \rightmarginkern of the last line...
\setbox0 = \vbox{\indent
Now we typeset a paragraph which, while containing the usual \verb|\parfillskip|
glue, whose value is specified above, ends flush with the right margin because
it contains a \verb|\hfill| command:\hfill (here!).\par
\global\setbox1 = \lastbox
}
% (...here it is...)
\showbox1
\endgroup
% ...we don't see any protrusion:
Now, \( \verb|\rightmarginkern1| = \mbox{\rightmarginkern1} \).
\end{document}
對本例產生的文字記錄的檢查表明,字元突出是應用於以「現在我們排版...」開頭的段落最後一行的右邊緣;儘管如此,當我們請求\rightmarginkern
該行的 時,0pt
它會返回。
這可能是 pdfTeX 中的錯誤嗎?如果不是(如果它是一個功能),那麼設定\leftmarginkern
和 的確切規則是什麼\rightmarginkern
?