6

In another question, Harald showed how to make vertical leaders. Armed with this knowledge, I set sail to answer another question, but as I've tried to put such leaders into a page with other material as well, the leaderfill always takes up the whole page.

Is there a general way to typeset something onto a page, which then would be handled by TeX as if nothing had been typeset at all (i.e., it wouldn't take any kind of space away from other material)?

Example:

\newbox\needlebox\setbox\needlebox=\vbox{\hsize=2em$\cdot$}
\def\needlefill{\cleaders\copy\needlebox\vskip0pt plus 1fill}
\llap{\hbox to 2em{\vbox to\vsize{\hsize=2em\needlefill}}} Blah
\bye

(The "Blah" goes to second page)

morbusg
  • 25,490
  • 4
  • 81
  • 162

2 Answers2

2

\llap is the right direction, but you still need a vertical version of it:

\newbox\needlebox\setbox\needlebox=\vbox{\hsize=2em$\cdot$}
\def\needlefill{\cleaders\copy\needlebox\vskip0pt plus 1fill}
\llap{\vbox to 0pt{\hbox to 2em{\vbox to\vsize{\hsize=2em\needlefill}}\vss}} Blah
\bye

See also this discussion on c.t.t I started about \blap and \tlap macros.

Martin Scharrer
  • 262,582
2

(not tested)

a box in vertical mode gets set and stays in vertical mode. you need to get out of vertical mode.

precede the \llap by \leavevmode to put you into horizontal mode.

you may also want to give \vbox the height of a line of text to avoid having it line up at the bottom. \vbox to Npt{...} where N = the height of the first line; the height of \mathstrut is probably a good value.