0

i tried to create code in latex  for this table but  i couldnt get for multi columns can anyone help me with this table

 \begin{tabular}{|l|l|l|l|}\hline
    Criterion & Discretization method & Dataset & Rank mean\\
    \hline
    \multirow{7}{*}{Cair mean value
     through all intervals} & Equal width \\
      & Equal frequency \\
     & Maximum entropy \\
     & IEM \\ 
     & CADD\\
     & CAIM\\
     \hline
     \multirow{7}{*}{Total no of intervals} & Equal width \\
      & Equal frequency \\
     & Maximum entropy \\
     & IEM \\ 
     & CADD\\
     & CAIM\\
     \hline
     \multirow{7}{*}{Time[s]} & Equal width \\
      & Equal frequency \\
     & Maximum entropy \\
     & IEM \\ 
     & CADD\\
     & CAIM\\
     \hline

here is the code that i tried but i dont understand how to write code from datasets multiple columns can anyone please help me?

4
  • Welcome to TeX.SX! Unhelpful statement: This table looks awful and should not be reproduced at all (it's hard to read it) – user31729 Jan 14 '16 at 19:38
  • can anyone help me how to write this table in latex – user58954 Jan 14 '16 at 19:42
  • Possible duplicate of Table with multirow and multicolumn – James Jan 14 '16 at 19:43
  • Make your table with 19 columns. Then make the "Dataset" header span 16 of the columns using the \multicolumn command. – James Jan 14 '16 at 19:45
1

This will do it. I've also used the array package to handle the varying font sizes.

\documentclass{article}
\usepackage[centering,width=9.5in,height=7in]{geometry}
\usepackage{multirow}
\usepackage{array}
\geometry{landscape}
\begin{document}

\begin{center}

% Define column width as a command so it is easier to change
\newcommand{\ColIWidth}{.7in}

% p{\ColIWidth}      - column of specific width
% *{8}{...}          - Do "c|>{\footnotesize}c|" 8 times
% >{\footnotesize}c  - Centered column but prefix each with \footnotesize
\begin{tabular}{|p{\ColIWidth}|l|*{8}{c|>{\footnotesize}c|}c|}\hline
  % multirows and multicolumns where appropriate
  \multirow{2}{\ColIWidth}{\textbf{Criterion}} & \textbf{Discretization} & \multicolumn{16}{c|}{Dataset} & \textbf{RANK}\\\cline{3-18}
  & \textbf{method} & iris & std & sat & std & thy & std & wav & std & ion & std & smo & std & hea & std & pid & std & mean\\
  \hline
  % Need a width in the multirow in order to get desired wrapping.
  % The \vfil helps with vertical alignment.
  \multirow{7}{\ColIWidth}{CAIR mean value
   through all intervals\vfil} & Equal width & 0.40 & 0.01 & 0.24 & 0 \\
    & Equal frequency \\
   & Maximum entropy \\
   & IEM \\
   & CADD\\
   & CAIM\\
   \hline
   \multirow{7}{\ColIWidth}{Total no of intervals\vfil} & Equal width \\
    & Equal frequency \\
   & Maximum entropy \\
   & IEM \\
   & CADD\\
   & CAIM\\
   \hline
   \multirow{7}{\ColIWidth}{Time[s]\vfil} & Equal width \\
    & Equal frequency \\
   & Maximum entropy \\
   & IEM \\
   & CADD\\
   & CAIM\\
   \hline
\end{tabular}
\end{center}

\end{document}

Screenshot of The Table

2
  • thankyou so much and can you please close all the lines – user58954 Jan 15 '16 at 0:53
  • @user58954 The lines will close when the rows are full. – Dean Serenevy Jan 15 '16 at 14:09

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.