# Make an invisible vbox

I'm placing a PDF meta information in a \vbox in a plain XeTeX document, and I would like it to behave as if there were no box at all (so any additional \vskip after the \vbox will appear). Right now, I'm using the following:

\nointerlineskip\vbox to 0pt { … }\nointerlineskip


I've tried \nointerlineskip{\offinterlineskip\vbox …} as well, but that left a gap afterwards, even when there was no skip meant to be.

How can I make this vertical box seamless in every context?

-
I did not thought to tag this question as "xetex" nor "pdf", since I though, that the question itself does not have to do anything with XeTeX nor PDF, (which is make a vertical box seamless,) beside that I described the full scenario, as in I'm using XeTeX, and do this with a PDF meta info, a \special command, to be precise. –  Adam L. S. Jul 5 '11 at 8:28
Can't you put the pdf information in the header or the footer? Or use e.g. atbegshi (it supports plain tex)? –  Ulrike Fischer Jul 5 '11 at 9:28
I'm using a PDF annotation, so no. –  Adam L. S. Jul 8 '11 at 23:18

I'd say that the correct procedure is

\edef\theprevdepth{\the\prevdepth}\nointerlineskip
\vbox to 0pt{...}\prevdepth=\theprevdepth


## Example

\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 }%
\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 }%
\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

-
Could a \vadjust be used, too? –  morbusg Jan 14 '12 at 9:53
@morbusg I'd say no: \vadjust has to be issued in horizontal mode. –  egreg Jan 14 '12 at 10:00