Total members 11621 |It is currently Wed Mar 29, 2017 7:58 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka

All times are UTC [ DST ]



  Using table in latex
Tue Jul 31, 2012 12:01 pm 

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: 2704
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     -  
 Creating SQL Table     -  
 table creation     -  
 hide cell in table     -  
 HTML Scrollable table     -  
 SQL RENAME TABLE Command     -  
 JDBC Table Model example     -  

All times are UTC [ DST ]










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