1

I have a simple table with three columns, split (by an \hline) into the first two rows and the last two rows. Here is a minimum working example:

\documentclass{article}

\begin{document}

\begin{tabular}{cc|c}
a & b & xx \\
c & d & xx \\ \hline
e & f & yy \\
g & h & yy
\end{tabular}

\end{document}

The entries in the right-most column represent a comparison of the associated two rows: thus the xx refers to a comparison of the first two rows and the yy refers to a comparison of the last two rows. As such, there should be just a single entry of xx and a single entry of yy. I would like a single xx to lie vertically between the first and second rows (to make it clear it refers to both rows), and likewise the yy to lie vertically between the third and fourth rows.

  • 1
    You are looking for multirow. – user156344 Apr 20 '19 at 18:08
2

Like this?

\documentclass{article}
\usepackage{multirow}
\begin{document}

\begin{tabular}{cc|c}
a & b & \multirow{2}{*}{xx} \\
c & d & \\ \hline
e & f & \multirow{2}{*}{yy} \\
g & h & 
\end{tabular}

\end{document}

enter image description here

  • You folks are so helpful. Thanks so very much! (accept) – David G. Stork Apr 20 '19 at 18:11

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.