7

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?
8

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.