我将 PDF 元信息放在\vbox
纯 XeTeX 文档中,我希望它表现得好像根本没有框一样(因此会出现\vskip
后面的任何附加内容\vbox
)。现在,我正在使用以下内容:
\nointerlineskip\vbox to 0pt { … }\nointerlineskip
我\nointerlineskip{\offinterlineskip\vbox …}
也尝试过,但是之后却留下了空白,尽管本来不应该跳过。
我怎样才能使这个垂直框在任何情况下都无缝?
答案1
我认为正确的做法是
\edef\theprevdepth{\the\prevdepth}\nointerlineskip
\vbox to 0pt{...}\prevdepth=\theprevdepth
例子
\def\metabox#1{\edef\theprevdepth{\the\prevdepth}\nointerlineskip
\vbox to0pt{#1\vss}\prevdepth=\theprevdepth}
\leavevmode\vbox{\hsize=.3\hsize
some text some text some text some text
some text some text some text some text
\metabox{META INFO}
some text some text some text some text
some text some text some text some text }%
\quad
\vbox{\hsize=.3\hsize
some text some text some text some text
some text some text some text some text
some text some text some text some text
some text some text some text some text }
\vskip2cm
\hrule
\leavevmode\vbox{\hsize=.3\hsize
\metabox{META INFO}
some text some text some text some text
some text some text some text some text }%
\quad
\vbox{\hsize=.3\hsize
some text some text some text some text
some text some text some text some text }
\vskip1cm
\hrule
\leavevmode\vbox{\hsize=.3\hsize
some text some text some text some text
some text some text some text some text }
\bye