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
  • 1
    You are looking for multirow.
    – user156344
    Apr 20, 2019 at 18:08

1 Answer 1

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

1
  • You folks are so helpful. Thanks so very much! (accept) Apr 20, 2019 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .