두 개의 \epsfbox를 서로 옆에 세로 중앙에 배치합니다.

두 개의 \epsfbox를 서로 옆에 세로 중앙에 배치합니다.

비공개 통신을 통해 다음과 같은 문제가 주목되었습니다. CWEB 예제 프로그램에서왜곡-삼항-calc.w(2015) Don Knuth의 글에는 다음과 같은 구문이 여러 번 나타납니다.

$$\vcenter{\epsfbox{...}}\qquad\qquad
  \vcenter{\epsfbox{...}}$$

...MetaPost 그래픽의 이름은 어디에 있습니까?왜곡-삼항-calc.mp.

달리기

for i in skew-ternary-calc; do mpost $i; cweave $i; tex $i; dvipdfm $i; done

극도로 '과도한 상자'를 생성하고 오른쪽 그래픽이 페이지 프레임 외부에 있는 여러 디스플레이가 포함된 PDF가 생성됩니다.

\hbox{...}거의 모든 es를 추가하면 \epsfbox{...}이 문제가 해결되는 것 같습니다.

간단한 $$\vcenter{\epsfbox{...}}$$것만으로도 문제가 없지만 다른 자료가 함께 제공되자마자 \epsfbox{...}모든 것이 엉망이 됩니다.

여기서 무슨 일이 일어나고 있는지 아이디어가 있습니까?

답변1

TeX Live(at , 광고 ) 에 포함된 \epsfbox파일 의 정의는 다음과 같습니다.epsf.tex/usr/local/texlive/2017/texmf-dist/tex/generic/epsf/epsf.texThis is `epsf.tex' v2.7.4 <14 February 2011>

\def \epsfbox #1{%
    \global \def \epsfllx {72}%
    \global \def \epsflly {72}%
    \global \def \epsfurx {540}%
    \global \def \epsfury {720}%
    \def \lbracket {[}%
    \def \testit {#1}%
    \ifx \testit \lbracket
        \let \next = \epsfgetlitbb
    \else
        \let \next = \epsfnormal
    \fi
    \next{#1}%
}%

없이 호출하고 있으므로 다음을 [살펴보겠습니다 \epsfnormal.

\def \epsfnormal #1{%
    \epsfgetbb{#1}%
    \epsfsetgraph{#1}%
}%

아니요, 아직은 그렇지 않습니다. 살펴보자 \epsfsetgraph:

\def \epsfsetgraph #1%
{%
   %
   % Make the vbox and stick in a \special that the DVI driver can
   % parse.  \vfil and \hfil are used to place the \special origin at
   % the lower-left corner of the vbox.  \epsfspecial can be redefined
   % to produce alternate \special syntaxes.
   %
   \ifvmode \leavevmode \fi
   \relax
   \hbox{% so we can put this in \begin{center}...\end{center}
   <...>
}%

보시다시피 이 매크로는 \leavevmode세로 모드에서 호출될 때 수행됩니다. 이는 의 시작 부분에 해당됩니다 \vcenter. 그러면 그림은 일반 부모에 의해 들여쓰기되고 한 줄의 문단이 형성되어 \vcenter상자의 너비가 있게 됩니다 \hsize.

사용에는 \vcenter{\hbox{\epsfbox{...}}}이러한 결함이 없습니다. 상자의 너비는 이미지와 동일합니다.

답변2

Don Knuth가 사용하는 것으로 보입니다.원래epsf.tex완전히 다른 정의로\epsfbox 없이 \leavevmode.

따라서 이 문제로 "The Grand Wizard"를 괴롭히고 로컬 업데이트를 강요하는 대신epsf.tex , 저는 간단히누락된 \hboxes를 추가하세요"업데이트"된 우리를 위해 epsf.tex.

관련 정보