I want to create a table like
There are 2 cells in the 4th column which are merged vertically on the right side.
While it is easy to merge them on the left side using multirow
, I'm at a loss on how to merge on the right side
Here is my source code (using IEEEtran.cls
):
\documentclass[conference]{IEEEtran}
% Add the compsoc option for Computer Society conferences.
% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
\usepackage[pdftex]{graphicx}
% declare the path(s) where your graphic files are
% \graphicspath{{../pdf/}{../jpeg/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.pdf,.jpeg,.png,.eps}
\else
% or other class option (dvipsone, dvipdf, if not using dvips). graphicx
% will default to the driver specified in the system graphics.cfg if no
% driver is specified.
\usepackage[dvips]{graphicx}
% declare the path(s) where your graphic files are
% \graphicspath{{../eps/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.eps}
\fi
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\usepackage{lscape}
\usepackage{multirow}
%\usepackage{subfig}
\usepackage{subfigure}
%\usepackage{subcaption}
\usepackage{tikz}
\def\checkmark{\tikz\fill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;}
\documentclass[conference]{IEEEtran}
\ifCLASSINFOpdf
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf,.jpeg,.png,.eps}
\else
\usepackage[dvips]{graphicx}
\DeclareGraphicsExtensions{.eps}
\fi
% correct bad hyphenation here
\hyphenation{op-tical net-works semi-conduc-tor}
\usepackage{lscape}
\usepackage{multirow}
\usepackage{subfigure}
\begin{document}
\section{Introduction}
\section{xxx}
\begin{table}[h]
\centering
\begin{tabular}{ |p{0.6cm}|p{1cm}|p{0.6cm}|p{4cm}| }
\hline
{\fontsize{7}{60}\selectfont Source IP} & {\fontsize{7}{60}\selectfont Destination IP} & {\fontsize{7}{60}\selectfont CCN Name} & Example Application Scenarios \\
\hline
$\times$ & xx & xx& Content requester wants to hide its location/IP \\
\hline
dul & $\times$ & lus & \multirow{2}{*}{Content requester wants to hide its location/IP} \\
\cline{1-3}
ddd & $\times$ & lus & \\
\hline
$\times$ & Lucus & lus & Content requester wants to hide its location/IP \\
\hline
$\times$ & Lucus & lus & Content requester wants to hide its location/IP \\
\hline
\end{tabular}
\caption{xxxx}
\label{tab:header}
\end{table}
\begin{thebibliography}{1}
\end{thebibliography}
\end{document}
The result is the width of that two cells are not equal.
multirow
package: en.wikibooks.org/wiki/LaTeX/…\multirow
goes in the upper cell, leave the lower one empty; it doesn't matter in what column you use it.\hline
?", but nobody can know where you want it.