📘 LaTeX Practical 9
Creating tables · caption · label · referencing
❓ Question 9: Create a table with five rows and four columns in LATEX, including caption and label, and reference the table in the text.
⌨️ LaTeX Source Code
\documentclass[12pt]{article}
\title{Tables in \LaTeX}
\author{ARO Study Circle}
\date{\today}
\begin{document}
\maketitle
\section{Table Example}
Table \ref{tab:students} shows student information.
\begin{table}[htbp]
\centering
\caption{Student Information}
\label{tab:students}
\begin{tabular}{|c|c|c|c|}
\hline
Roll No. & Name & Course & Mark \\
\hline
1 & Abc & Mathematics & 85 \\
\hline
2 & Def & Physics & 78 \\
\hline
3 & Ghi & Computer Science & 90 \\
\hline
4 & Jkl & Statistics & 82 \\
\hline
\end{tabular}
\end{table}
The table is referenced using the \ref{ } command.
\end{document}
📖 Explanation of Commands
tableenvironment creates a floating table.tabularenvironment creates rows and columns.- Four
cspecifications create four columns with center aligned. &symbol separates columns.\\command ends a row.\hlinecreates horizontal lines.\caption{}provides the table caption.\label{}gives the table a reference name.\ref{}refers to the table number.- This example contains exactly five rows and four columns, including the header row.
📄 Compiled PDF Output
Tables in LaTeX
August 21, 2026
1 Table Example
Table 1 shows student information.
| Roll No. | Name | Course | Mark |
|---|---|---|---|
| 1 | Abc | Mathematics | 85 |
| 2 | Def | Physics | 78 |
| 3 | Ghi | Computer Science | 90 |
| 4 | Jkl | Statistics | 82 |
Table 1: Student Information
The table is referenced using the \ref command.
0 Comments