Total members 11653 |It is currently Thu Jul 27, 2017 5:43 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka






Add tables using latex is done using table tags, is very easy , following is a simple example for adding a table:


Code:
\begin{table}
\centering

\begin{tabular}{lcccc}
\hline
\textbf{Type} & \textbf{Prop1} & \textbf{Prop2} & \textbf{Prop3} \\
\hline
\textbf{class1} & X &  Y & Z \\
\textbf{class2} & X &  Y & Z    \\
\textbf{class3} & X &  Y &  Z    \\
\hline
\end{tabular}
\caption{Add your table caption here }
\label{tab:LabelRef}
\end{table}



To add border to this table you will change the following part:

Code:
\begin{tabular}{lcccc}


into this part :

Code:
\begin{tabular}{|l|c|c|c|c|}


There are some cases you may need to change the size of the table while keeping the number of columns and rows as it is, in such case you use the \resizebox tag which takes one parameter:
Code:
\begin{table}
\centering
\resizebox{14cm}{!}{
\begin{tabular}{|l|c|c|c|c|}
\hline
\textbf{class1} & X &  Y & Z \\
\textbf{class2} & X &  Y & Z    \\
\textbf{class3} & X &  Y &  Z    \\
\hline
\end{tabular}
}
\caption{Add your table caption here }
\label{tab:tableRef}
\end{table}




Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Using table in latex
 row highlight of table     -  
 table row hover     -  
 Creating table using div tag     -  
 Div Table with css row span     -  
 table creation     -  
 hide cell in table     -  
 SQL RENAME TABLE Command     -  
 Get table column flag in php     -  
 JDBC Table Model example     -  
 Table with marked cell     -  



cron







Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team