TEXT TABLE BASICS
LaTeX table basics: columns, alignment and borders
Literal text table examples · browser preview is not TeX compilation
Use the Table Generator for literal text, measurements and comparison rows. Use the Matrix Generator for mathematical cell expressions. These tools have different input and output rules.
Describe the columns
The tabular environment starts with a column specification.
l aligns left, c centers and r aligns
right. For a name and an amount, {lr} keeps names on the left
and amounts on the right. Change each column selector in the generator
instead of inserting alignment commands into a cell.
Read the generated source
An ampersand separates cells and two backslashes end a row. This specimen uses literal text; no mathematical evaluation is implied.
| Item | Amount |
|---|---|
| Length | 12.5 |
| Mass | 250 |
Browser specimen · compile the source in your LaTeX application to check the final layout.
\begin{tabular}{lr}
\hline
\textbf{Item} & \textbf{Amount} \\
\hline
Length & 12.5 \\
Mass & 250 \\
\hline
\end{tabular}Open the Table Generator Choose rules deliberately
Use the border control to compare a plain table, horizontal rules and a full grid. A header row gives the first row a distinct role. More lines do not fix unclear labels: put units in a heading and keep precision consistent yourself. The generator does not align decimal points with a specialist number package.
Compile in the destination
Copy tabular source into a LaTeX document, or download the .tex document. The browser preview approximates structure and alignment; it does not predict page breaks, fonts or final float placement. Merged cells, automatic line wrapping and arbitrary LaTeX packages are outside this builder. Compile the document in your chosen LaTeX application to check final typography.
Syntax reference
LaTeX table syntax reference. The examples above are limited to the features described here; additional packages are not implied.
Continue with LaTeX Table Generator.