This tutorial will guide you that how to make a table in Latex? While typesetting the scientific document, you will need to create and make different types of tables in your document. So, after studying this tutorial, you will learn how to make a table in Latex? From here you can download the Latex table templates and samples. Also, you will learn to create a table in Latex of your own choice.

## Basic table template

When you understand the following given latex table, then you will be able to create a table as you wish.

\begin{table}[t]
\caption{table template}
\centering
\begin{tabular}{c c c}
\hline
\hline
data1 & data2 & data3 \ % first row
data4 & data5 & data6 \ % second row
data7 & data8 & data9 \ % third row
\hline
\end{tabular}
\end{table}

The code snippet will generate the table as below.

All the text and data should be written inside the \begin{table} and \end{table}. The term {c c c} defines the number of columns and all the entries in the table will be center aligned. For the left and right alignment use l or r, respectively. For example, you want to make all entries to be right-aligned just write {r r r}. To increase the number of column just add one alphabet c, l, or r. For example, you need to make four-column table write {c c c c}

## Adding lines between columns and rows

To add lines between rows and columns like the following table. To add lines between columns put the symbol “|” (by pressing ctrl+backslash) in the term {c c c } like {|c|c|c|}. And for inserting lines between rows write \hline after “\\” (double backslash). See the following code.

\begin{table}[t]
\caption{table template}
\centering
\begin{tabular}{|c|c|c|}
\hline
\hline
data1 & data2 & data3 \ \hline % first row
data4 & data5 & data6 \ \hline % second row
data7 & data8 & data9 \ \hline % third row
\end{tabular}
\end{table}

This will generate the following table.

Last Updated on