All documentation

Table

A grid of cells, printed as a LaTeX tabular with the rules you choose.

Filling a table

Insert a Table block: it starts with 3 rows and 3 columns. Click a cell and type.

  • Tab moves to the next cell, Shift+Tab to the previous one.
  • Enter moves down one row. On the last row it adds a new row.
  • Shift+Enter breaks the line inside the cell, as in a paragraph — "Mass" over "(kg)" in a header, for instance.

A cell holds up to 6 lines. The other cells of its row stay level with its first line, in the editor and in the PDF. Text pasted with more lines keeps the first ones and runs the rest into the last: nothing is lost.

Rows and columns

Select the table. Controls appear around the grid to add a row, add a column, and delete a given row or column.

The editor lets a table grow to 50 rows and 10 columns.

Caption and number

Type the caption above the table — that is where LaTeX prints a table's caption.

The caption is what numbers the table. With a caption it is "Table 1" — "Table 2.1" inside chapter 2, "Tableau" in a French document — and can be referenced. Without one it is a plain grid: no number, no reference, and it stays exactly where you put it.

Options

In the right column:

OptionChoices
Rulesbooktabs — three horizontal rules, no vertical ones: the standard of scientific journals. grid — a line around every cell. none — no lines.
Header rowHeader sets the first row in bold and separates it with a rule. Plain treats it like the others.
Column alignmentLeft, centre or right, for each column.
Placementhere, top or bottom, as for a figure. Applies only to a table with a caption.

The editor draws the rules the way LaTeX will, so the choice is visible at once.

What it cannot do

  • Cells are plain text. No bold, no italic and no formula inside a cell. A $ is printed as a dollar sign.
  • No merged cells, across columns or rows.
  • No column widths. A column is as wide as the longest line of its cells, and text does not wrap by itself: a table with long sentences may run past the margin. Break the line yourself with Shift+Enter, keep cells short, or use fewer columns.
  • No table across several pages. A long table is not split.
  • No coloured cells, no partial rules.
  • No import from a spreadsheet or CSV: pasting several cells goes into one cell.
  • A table in a column does not float.
  • A table cannot be placed inside a theorem.

An empty table is still printed: an empty grid is a valid table.

What it prints

With booktabs and a header row:

\begin{table}[H]
  \centering
  \caption{Yield by sample}
  \label{blk-…}
  \begin{tabular}{lcr}
    \toprule
    \textbf{Sample} & \textbf{Mass} & \textbf{Yield} \\
    \midrule
    A & 1.0 & 92 \\
    \bottomrule
  \end{tabular}
\end{table}

With grid, the columns are {|l|c|r|} and every row is followed by \hline.

A cell of several lines becomes a small one-column tabular of its own, hung by its first line and aligned like its column:

\textbf{\begin{tabular}[t]{@{}c@{}}Mass \\ (kg)\end{tabular}}