Total members 11638 |It is currently Thu May 25, 2017 6:35 pm 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
 table creation     -  
 row highlight of table     -  
 table row hover     -  
 Creating table using div tag     -  
 Div Table with css row span     -  
 Table with colored background     -  
 separate table per subclass     -  
 lowercase table content     -  
 need help building table in my database!     -  
 Change table style using CSS     -  










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