Total members 11696 |It is currently Fri Feb 23, 2018 8:25 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     -  
 separate table per subclass     -  
 lowercase table content     -  
 need help building table in my database!     -  
 Change table style using CSS     -  
 Relational Operators table     -  










Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com