TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create the table like this (with row and column each names individually and also in a group): enter image description here I can create the table, but I do not know how to write those column and row names. How can I selectively remove the vertical line on table in some cells?

share|improve this question
Related : tex.stackexchange.com/questions/80392/… – percusse Nov 5 '12 at 12:33
up vote 3 down vote accepted

You can use \multicolumn{1}{|c|}{($-1,C$)} to selectively remove/add vertical lines. Also, to merge two rows in a cell, you can use multirow.

& &\multicolumn{2}{c}{$p_{2}$}\\
& & $F$ &$D$ \\\cline{3-4}
\multirow{2}{*}{$p_{1}$}& $F$ & \multicolumn{1}{|c|}{($1-C$,$1-C$)} & \multicolumn{1}{c|}{($-C,1$)} \\\cline{3-4}
& $D$ & \multicolumn{1}{|c|}{($-1,C$)} &\multicolumn{1}{c|}{($0,0$)}\\\cline{3-4}


enter image description here

share|improve this answer
Thank you very much. Here you have started with no vertical bars and built whenever necessary. Can we start with all vertical bars and remove wherever necessary? – DurgaDatta Nov 5 '12 at 16:32
@DurgaDatta: Yes. you have to use \multicolumn{1}{c}{($-1,C$)}. Note {c} without vertical bars. But here it will add too many `\multicolumns, an over kill. – Harish Kumar Nov 5 '12 at 22:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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