# Is there a vertical equivalent for \rlap?

I'm looking for some sort of vertical equivalent for \rlap, which can be used to typeset maybe one or more paragraphs (or minipages), but do not advance vertically the content that would appear immediately following this command. Are there anywhere some implementations of \tlap and \blap?

-

Usually I define those by hand. I don't know any package that provides them. Roughly something like:

\documentclass{article}

\newcommand{\tlap}[1]{\vbox to 0pt{\vss\hbox{#1}}}
\newcommand{\blap}[1]{\vbox to 0pt{\hbox{#1}\vss}}

\begin{document}

\hrulefill\blap{\shortstack{haha\\huhu}}\hrulefill
\tlap{\shortstack{haha\\huhu}}\hrulefill\par

\end{document}

-

You can use \raisebox for this:

\raisebox{-\height}[0pt][0pt]{<content>}% blap
\raisebox{0pt}[0pt][0pt]{<content>}% tlap, without changing the baseline
\raisebox{+\depth}[0pt][0pt]{<content>}% tlap, with lapping it completely upwards


As Stephane pointed out you can also use \vbox to 0pt and \vss for this. See also my post and the discussion about this on comp.text.tex:
Vertical versions of \llap and \rlap: \tlap and \blap

I would write it now as follows to avoid any issues if used at the begin or between paragraphs:

\newcommand{\tlap}[1]{\mbox{\vbox to 0pt{\vss\hbox{#1}}}}
\newcommand{\blap}[1]{\mbox{\vbox to 0pt{\hbox{#1}\vss}}}

-
 but that would require me to measure the \height or \depth, no? – Juan A. Navarro Jul 22 '11 at 18:36 @Juan: \raisebox does this for you. It stores the content in a register for this, so using \vbox is more efficient, but you have more freedom with \raisebox. – Martin Scharrer♦ Jul 22 '11 at 18:41

You can use \smash Here a small introduction: TUGboat, Volume 22 (2001), No. 4

-
 Thanks, that works but seems to be something like \tlap while I was looking for \blap. – Juan A. Navarro Jul 22 '11 at 18:36 This works similar like \tlap without changing the baseline, but not for \blap or for lapping it complete upwards including the depth. Good article BTW, I wanted to link to it as well. – Martin Scharrer♦ Jul 22 '11 at 18:41 Just for information, the Tugboat article referenced in the answer was published in TUGboat Volume 22, Number 4, December 2001, on page 350. – mas Aug 5 '11 at 15:34 @mas: Thanks. I edited my post – Marco Daniel Aug 6 '11 at 6:10 Reading the linked article leaves me wondering how come it doesn't mention \hidewidth at all. – morbusg Aug 6 '11 at 11:31