Tables and Figures in LaTeX

Tables and figures are essential for presenting data and illustrations in academic and professional documents. LaTeX provides environments for creating structured tables, inserting images, and referencing them consistently.

Basic Tables (tabular)

The tabular environment is used to create tables. You specify column alignment using l (left), c (center), and r (right). Rows are separated by \\, and columns by &.

Borders, Alignment, and Merging Cells

You can add borders with | in the column definition and \hline for horizontal lines. The command \multicolumn merges columns, while multirow requires the multirow package.

Floating Tables and Figures

The table and figure environments allow LaTeX to place content optimally (called floating). This ensures tables and figures don’t break text flow.

Captions and Labels

Captions describe tables/figures, while labels allow you to reference them later with \ref. This ensures numbering updates automatically.

Inserting Images

To insert images, you need the graphicx package. You can control the size using width, height, or scaling options.