문자 돌출에 대한 pdfTeX의 정확한 규칙은 무엇입니까? 그리고 \leftmarginkern/\rightmarginkern의 확장을 위해서는?

문자 돌출에 대한 pdfTeX의 정확한 규칙은 무엇입니까? 그리고 \leftmarginkern/\rightmarginkern의 확장을 위해서는?

pdfTeX가 영리한 방법으로 문자 돌출을 적용하려고 한다는 것은 잘 알려져 있습니다. 가로 목록을 줄로 나눌 때 문자 돌출에 대한 (암시적) 커닝은 줄의 가장 왼쪽/오른쪽 문자의 / \hbox에서 추정되는 커닝 양에 대해 결과 'es 각각의 가장자리 근처에 삽입됩니다. 문자는 중첩된 '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}

이 예에서 생성된 성적표를 조사해 보면 문자 돌출이 있음을 알 수 있습니다.~이다"Now we typeset..."으로 시작하는 단락 마지막 줄의 오른쪽 가장자리에 적용됩니다. 그럼에도 불구하고 \rightmarginkern해당 줄의 를 요청하면 0pt반환됩니다.

이것이 pdfTeX의 버그일까요? 그리고 그렇지 않은 경우(기능인 경우) \leftmarginkern및 설정에 대한 정확한 규칙은 무엇입니까 \rightmarginkern?

답변1

예, 이것이 의 버그라고 말하고 싶습니다 pdftex. (이와 관련이 있는 것 같습니다.이 버그, 이는 몇 년 전에 수정되었습니다.) \rightmarginkern에 접착 구성 요소가 포함된 경우 커닝이 0으로 보고되는 \parfillskip반면, 접착 구성 요소에도 불구하고 여백 커닝 자체는 적용되는 것으로 보입니다. \parfillskip로 설정하면 둘 다 동의합니다 0pt.

정확한 규칙에 대해서는 다음을 참고하시기 바랍니다.pdftex원천cp_skipable, 여기서 건너뛸 수 있는 항목은 (에서 ) 다음과 같이 정의됩니다 .

  • 삽입
  • 점수
  • 노드 조정
  • 처벌
  • Whatsits(이미지 제외)
  • 빈 재량품
  • 빈 수학 노드
  • 제로컨
  • 글루 없음(실제 여백 커닝과 보고된 여백 커닝 간의 불일치는 다음과 같습니다.)
  • 빈 hbox

안타깝게도 더 이상 버그 추적기가 없는 것 같아서 pdftex이 문제가 어디에 보고될 수 있는지 모르겠습니다.

관련 정보