Data & Tables

Tables & Tabular Designs

Master LaTeX tables with detailed explanations of positioning flags [htbp], column specifiers (l, c, r, p{w}, m{w}), publication booktabs rules, and multi-page tables.

📊 7 Essential Table Styles & Best Practices

LaTeX tables support various visual styles depending on your document type. Choose between borderless minimal tables, full grid matrices, academic booktabs, multi-row merged cells, colored zebra stripes, or paragraph-wrapped multi-page tables below.

Tables & Floating Figures

Tables & Floating Figures

Comprehensive syntax, arguments, options, and copyable snippets for tables & floating figures.

Command

\hline

Horizontal line across a table

Example Code
\begin{tabular}{cc}
\hline
A & B \\
\hline
\end{tabular}
Command Mandatory { }

\cline{i-j}

Partial horizontal line spanning columns i to j

Example Code
\cline{1-2}
Command Mandatory { }

\multicolumn{n}{cols}{text}

Merges n columns in a table row

Example Code
\multicolumn{2}{c}{Merged Header}
Command Mandatory { }

\multirow{n}{width}{text}

Merges n rows in a table column (multirow package)

Example Code
\multirow{2}{*}{Merged Cell}
Command

\toprule

Top rule line (booktabs)

💡 Deep Dive Explanation & Options

Booktabs Heavy Top Rule: Replaces \hline at the table header top with a professional publication-grade rule.

Example Code
\begin{tabular}{cc}
\toprule
A & B \\
\end{tabular}
Command

\midrule

Middle rule line (booktabs)

💡 Deep Dive Explanation & Options

Booktabs Middle Rule: Thin horizontal divider separating table headers from data rows.

Example Code
\midrule
Command

\bottomrule

Bottom rule line (booktabs)

💡 Deep Dive Explanation & Options

Booktabs Heavy Bottom Rule: Clean closing horizontal rule at the table bottom.

Example Code
\bottomrule
Command Mandatory { }

\caption{text}

Adds a caption to a figure or table

Example Code
\caption{Scattering intensity vs. angle.}
Command Mandatory { }

\includegraphics{file}

Inserts an image (graphicx)

Example Code
\includegraphics{scattering_plot.png}
Command Mandatory { } Optional [ ]

\includegraphics[options]{file}

Inserts an image with sizing/rotation options

💡 Deep Dive Explanation & Options

Key Image Options:
width=0.8\textwidth (relative width)
height=5cm (explicit height)
scale=0.5 (scaling factor)
angle=90 (rotation in degrees)
keepaspectratio (prevents aspect ratio distortion)
trim=10 20 10 20, clip (crops image boundaries).

Example Code
\includegraphics[width=0.8\textwidth]{scattering_plot.png}
Command

\centering

Centers a figure or table content

Example Code
\centering
Command

\hfill

Horizontal fill/stretch space

Example Code
Left\hfill Right
Command

\vfill

Vertical fill/stretch space

Example Code
\vfill