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.
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
Comprehensive syntax, arguments, options, and copyable snippets for tables & floating figures.
\hline
Horizontal line across a table
\begin{tabular}{cc}
\hline
A & B \\
\hline
\end{tabular}
\cline{i-j}
Partial horizontal line spanning columns i to j
\cline{1-2}
\multicolumn{n}{cols}{text}
Merges n columns in a table row
\multicolumn{2}{c}{Merged Header}
\multirow{n}{width}{text}
Merges n rows in a table column (multirow package)
\multirow{2}{*}{Merged Cell}
\toprule
Top rule line (booktabs)
Booktabs Heavy Top Rule: Replaces \hline at the table header top with a professional publication-grade rule.
\begin{tabular}{cc}
\toprule
A & B \\
\end{tabular}
\midrule
Middle rule line (booktabs)
Booktabs Middle Rule: Thin horizontal divider separating table headers from data rows.
\midrule
\bottomrule
Bottom rule line (booktabs)
Booktabs Heavy Bottom Rule: Clean closing horizontal rule at the table bottom.
\bottomrule
\caption{text}
Adds a caption to a figure or table
\caption{Scattering intensity vs. angle.}
\includegraphics{file}
Inserts an image (graphicx)
\includegraphics{scattering_plot.png}
\includegraphics[options]{file}
Inserts an image with sizing/rotation 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).
\includegraphics[width=0.8\textwidth]{scattering_plot.png}
\centering
Centers a figure or table content
\centering
\hfill
Horizontal fill/stretch space
Left\hfill Right
\vfill
Vertical fill/stretch space
\vfill