Prerequisites: Familiarity with basic table creation. See Creating Tables if you need a refresher.
Long Tables
Tables Spanning Multiple Pages
Longtable Features
Landscape Tables
Rotating Large Tables
Rotating Table Content
Nested and Complex Tables
Tables Within Tables
Mixed Content Tables
Professional Table Packages
Using booktabs
Using threeparttable
Advanced Formatting
Custom Column Types
Conditional Formatting
Table Automation
Generating Tables from Data
Dynamic Table Generation
Table Positioning and Float Control
Precise Table Placement
Performance Optimization
Large Table Optimization
How to Shrink a Table to Fit the Page or Column
When a table is wider than the text block, LaTeX will not shrink it for you — it runs into the margin and reports anOverfull \hbox.
Scaling the whole table, font included, is the quickest fix. \resizebox from
graphicx takes a target width: \resizebox{\textwidth}{!}{...} wraps the
tabular and scales it to the text width, with ! preserving the aspect ratio. Use
\columnwidth instead in a two-column layout.
Be aware that this shrinks the font along with the table, so a heavily scaled table
becomes hard to read. Before scaling, consider whether reducing column padding with
\setlength{\tabcolsep}{4pt}, wrapping text with a p{3cm} column, or using a
smaller font size for the table would keep it legible.
For tables that are simply too wide to ever fit, rotating with sidewaystable from
rotating, or splitting across pages with longtable, is better than scaling.
Best Practices
Troubleshooting
Quick Reference
Package Summary
Advanced Commands
Next: Ready to create your first LaTeX document? Check out our How-to Guides for practical examples and complete document templates.
