Examples of Tables with Data and Lines
Basic Table with Full Lines
This table uses vertical separators and horizontal rules.
|
|
|
| ID | Name | Score |
|
|
|
| 1 | ALICE | 85 |
|
|
|
| 2 | Bob | 92 |
|
|
|
| 3 | Carol | 78 |
|
|
|
Table. Basic table with full grid lines.
Table with Partial Vertical Lines
This table uses a vertical divider only after the first column.
|
|
|
| Item | Price | Quantity |
|
|
|
| Apple | $0.50 | 10 |
| Banana | $0.30 | 15 |
| Orange | $0.60 | 8 |
|
|
|
Table. Table with a selective vertical divider.
Clean Table with Horizontal Rules
The original version used the booktabs package. This renderer-safe version uses ordinary
horizontal rules instead.
|
|
|
| City | Population | Area (km2) |
|
|
|
| New York | 8,336,817 | 783.8 |
| Los Angeles | 3,979,576 | 1,302.2 |
| Chicago | 2,693,976 | 606.1 |
|
|
|
Table. A clean table using standard LaTeX rules.
Table with a Merged Heading
The original version used the multirow package. To avoid an additional package dependency, this
version retains only the standard multicolumn feature and repeats student names in the
rows.
|
|
|
| Student Grades |
|
|
|
| Student | Subject | Grade |
|
|
|
| David | Math | A |
| David | Science | B+ |
|
|
|
| Emma | Math | B |
| Emma | Science | A- |
|
|
|
Table. A merged heading using standard multicolumn.
Table with Repeated Horizontal Rules
The original version used colortbl for colored rows and colored rules. Colored table rules require
extra package support, so this renderer-safe version uses ordinary rules.
|
|
|
| Product | Cost | Stock |
|
|
|
| Laptop | $999 | 50 |
|
|
|
| Phone | $699 | 100 |
|
|
|
| Tablet | $499 | 75 |
|
|
|
Table. Table with standard horizontal rules.