[Tex/LaTex] Placing overlapping text on a page

positioningtables

How can I make text or tables overlap?

  • Can I place the letters "a" and "b" at the same location (based on left and downward alignment)?
  • Can I place two tabular environments in exactly the same place (one is above the other), but not inside float, figure, or table environments?

Best Answer

You can use \llap and \rlap which make boxes of zero width; in the case of tables, I first boxed them:

\documentclass{article}

\begin{document}

\noindent A\llap{B}

\noindent\rlap{A}B

\newsavebox\boxa
\savebox\boxa{\begin{tabular}{@{}c@{}}
text1 \\
text2 \\
text3 \\
\end{tabular}}

\newsavebox\boxb
\savebox\boxb{\begin{tabular}{@{}cc@{}}
column1a & column2a \\
column1b & column2b \\
\end{tabular}}

\noindent\usebox\boxb\llap{\usebox\boxa}

\noindent\rlap{\usebox\boxa}\usebox\boxb

\end{document}

enter image description here