Tables

Inkwell logo

Insert a table with the Insert Table button on the toolbar. Inkwell asks how many Rows and Columns you want — type the numbers rather than dragging out a grid — and inserts the table.

Books Author
The Old Man and the Sea Hemingway
The Iliad Homer
Fahrenheit 451 Ray Bradbury
Anna Karenina Leo Tolstoy

An example table

What goes in a cell

A cell holds ordinary content, not just a line of text. Press Enter in a cell and you get a second paragraph in that same cell rather than moving to the next row — use Tab to move on. Bulleted and numbered lists and block quotes work in a cell too, and so do footnotes, links and every character style.

The up and down arrows move between the paragraphs of a cell first, and only step to the next row from the top or bottom of one.

Two things still belong outside a table: figures and nested tables. An image in a cell goes in as an inline image, sized with the text, rather than a captioned figure.

A cell's settings — its font, alignment and margins, under Table Cell in Local Settings — apply to everything in it, so setting a cell centred centres all of its paragraphs. Give one paragraph something different and that paragraph keeps it. A list inside a cell is the exception: it keeps the list's own typography, in the book as well as on screen.

The table toolbar

Put the cursor in a table and a toolbar appears with the structural operations:

  • Add Column, Add Row, Remove Column, Remove Row, Remove Table.
  • Merge Cells — join the selected cells into one, for a heading that spans several columns.
  • Split Cells — undo a merge.
  • Caption — wrap the table in a captioned, floating table, so it gets a number, a caption, and can be placed automatically like a figure.
  • A style preset dropdown, for switching the table's whole look in one step.

Move between cells with Tab and Shift-Tab, and between rows with the up and down arrow keys.

Table settings

Tables are set up in two places, and the two do not hold the same things.

Project Settings → Tables carries what applies to every table in the project: a Default Style Preset, a Default Position, and the numbering, caption and label settings that captioned tables use — those are described under Numbering and captions below, and they are only ever set here.

These reach the tables you put in a chapter, and only those. The table of contents, the list of figures, a two-column bibliography and the running heads are laid out as tables too, but they run the full width of the page by design and are left alone by both defaults.

Project settings for tables

Everything else belongs to one table, and is set with the cursor inside it in Local Settings. The Table section there covers the table as a whole:

  • Style Preset — the named look. Left alone it follows the project default; set it and this table stops following.
  • Position — Left, Center or Right, for where the table sits across the page. It follows the project default the same way.
  • Full Width — float the table to the top of the page and, where the chapter runs in more than one column, let it span them all instead of sitting inside one. This is about the page, not the table: it will not stretch a narrow table. Only the PDF has pages to float to, so the editor and the ePub leave the table where it is.
  • Borders (all cells) and Shading (all cells) — change every cell at once, without having to select them.

Alongside it, three finer-grained sections take whatever the cursor is in:

  • Table Row — settings for the row, including Rotation (see Rotated labels), which is where you set a whole header row at once.
  • Table Column — Width (see Column widths), Alignment, Vertical Alignment, Rotation, and the four margins.
  • Table Cell — Leader, Alignment, Vertical Alignment, Rotation, and margins for one cell.

All three take a range of cells as readily as a single one. Drag across the cells you want and Table Cell changes every one of them, Table Row every row you touched, and Table Column every column — so squaring up three columns of figures is one drag and one click, not one click per column. The boxes show the values of the cell you finished the drag on.

Column widths

There is no dragging a column edge. Width is the Width box under Table Column, and it offers three things:

  • Expand — the column takes up the slack.
  • Fit contents — the column is only as wide as what you put in it.
  • Fixed — the column is exactly the width you type, in em. One em is the size of the body text, so 6em is about six characters wide and stays that way if you change the type size later.

Every column starts out expanding, which is why a fresh table fills the text width in equal columns. Set the ones holding short things — a year, a price, a single word — to Fit contents and they shrink, while the columns still expanding divide up the room that frees, in equal shares. Set them all to Fit contents and the table ends up only as wide as its contents — in the editor as well as in the book, so what you see is the width that prints.

So there are two ways to give a column of prose the space it needs: expand it and narrow its neighbours, or put a Fixed width on the neighbours and let the prose take everything left over. A fixed column takes no share of the slack, so the expanding ones divide what is left after it.

Width applies to the whole column even though you set it with the cursor in a single cell — which is why it lives under Table Column rather than Table Cell. Setting it anywhere in a column sets the whole column.

Two things to know:

  • A centred or right-positioned table has to shrink to its contents, or there would be no space left to move it into. Those tables ignore Expand — it only shows in a table positioned Left. A Fixed width is not ignored: it is a width you asked for, and the table still has room to move.
  • A cell with a Leader needs slack to stretch into, so leave that column on Expand, or give it a Fixed width for the dots to run across. That is how a contents line is built: the title column expands, the number and page-number columns do not.

Rotated labels

A table of narrow columns under long header words is mostly wasted paper: every column ends up as wide as its label. Rotation turns a cell's contents on their side so the label stops setting the width.

  • None — upright, as every cell starts out.
  • Vertical (bottom to top) — the label reads upwards. The usual choice for a header row.
  • Vertical (top to bottom) — the same turn the other way.
  • Angled 45° — the label rises to the right on the diagonal.

Set it on the Table Row to turn a whole header row at once, on the Table Column for row labels down the left, or on the Table Cell for a single one.

Two things make the difference between a rotated label and a useful rotated label:

  • Rotating does not narrow the column. The column keeps whatever width policy it had, so set the columns under the labels to Fit contents or a Fixed width (see Column widths) and the table shrinks to the numbers rather than to the words above them.
  • Alignment still means the cell's directions, not the label's. A vertical label in a cell set to Middle floats in the row; set the header row's Vertical Alignment to Bottom and the labels sit on the line above the numbers, which is what a rotated header is supposed to look like.

An angled label leans out over the columns to its right rather than making room for itself — that is what the angle is for, and it is why the column under it can be as narrow as the numbers in it. The last label leans past the edge of the table, so leave it a little room there.

The editor and the ePub draw the same arrangement, with every label standing on its own column, but they are approximate about the space it takes: a browser has no way to reserve exactly what a 45° label needs, so the header row comes out taller than it prints and the column a hair wider. The PDF measures it exactly. Read the preview for which column a label belongs to, and the PDF for how much room it takes.

Leaders

Leader fills the space between a cell's content and the next column: Dots for the run of dots you see in a contents list, Blank for the same stretch without them, None to leave it alone. It follows the cell's last paragraph, and it is meant for a cell holding a single line — a leader on a cell with a list or several paragraphs in it stops at the column edge instead of carrying across. Whatever room is left in the cell, the leader takes, which is what makes Chapter One .......... 17 line up. See Table of Contents, which is built this way.

In the PDF and the ePub the cell joins with the one to its right, so the dots carry on past the column edge and run right up to what follows. The editor cannot do that — those are cells you are still editing, and they have to stay separate — so on screen the dots stop at the edge of their own cell. The stretch is the same; only that last step is missing.

Numbering and captions

A captioned table is numbered and labelled like a figure, with the same three groups of settings:

Layout

  • Numbered By — numbering per chapter or continuous through the project.
  • Numbering — the format: Numeric (Table 1.1), Alphabetic (Table 1.a), Roman lower or upper case, Greek (Table 1.α), Star and Dagger (Table 1.*), or English Words (Table 1.One).
  • Whether to prefix the chapter number.
  • Top Margin and Bottom Margin — space around the table.
  • Gap — space between the table and its label.
  • Automatic Placement — let Inkwell float the table to the top or bottom of a page so it does not interrupt the text mid-paragraph.

Caption — Alignment, Position (above or below), Font, Font Size, Line Height, Bold, Italic.

Label — Font, Font Size, Line Height, Bold, Italic.

To refer to a table from the text, type Table and pick it from the list; the number stays correct if tables are added or moved.

Numbered per chapter, a table in an appendix takes the appendix letter — Table A.1 — and one in a chapter with no number of its own, such as a preface, counts plainly: 1, 2, 3.