We use cookies on this site. By browsing our site you agree to our use of cookies. Close this message Find out more

More in this section LateX

# Basic Tables

To create a basic table in LateX, use the following code:

 \begin{tabular}{ l c r }   1 & 2 & 3 \\   4 & 5 & 6 \\   7 & 8 & 9 \\ \end{tabular} \begin{tabular}{ l | c | r | }   1 & 2 & 3 \\   4 & 5 & 6 \\   7 & 8 & 9 \\ \end{tabular} \begin{tabular}{ | l | c | r | }   \hline                          1 & 2 & 3 \\ \hline   4 & 5 & 6 \\ \hline   7 & 8 & 9 \\   \hline   \end{tabular}

Note how you can add horizontal or vertical lines wherever you please, using the "|" character or using the "\hline" command.

• You can add a column by changing "{l c r}" to "{l c c r}" at the beginning of your table.
• You can add a row by simply entering another line of data below with the appropriate formatting.

Basic Tutorials:

Advanced Tutorials:

### Comment on this page

Did you find the information you were looking for? Is there a broken link or content that needs updating? Let us know so we can improve the page.

Note: If you need further information or have a question that cannot be satisfied by this page, please call our switchboard on +44 (0)1784 434455.

This window will close when you submit your comment.

Add Your Feedback
Close