Improvements to Tables

published Aug 27, 2013

We’ve made a few changes to make tables a little better.

Width and wrapping

The first thing to note is that there are now three widths that you can choose for tables: default, narrow and wide. default will stretch the table to about 80% of the page width. wide will fill up the page width. narrow is the old style of table, which will make the table as narrow as possible. All of these will be centered on the page.

The narrow setting is exactly the same as what we had before: it will make the table as narrow as possible, and you’ll have to add line-wrapping yourself if any of the table cells are wide. The default and wide settings will wrap text for you, and look better as well.

You can set the default table style for your book on the “Edit Formatting” tab for your book. We highly recommend either default or wide.

You can also over-ride the width for individual tables. So, if your book has the table-width setting set to default, but you really want one table to be narrow, you would do that by adding {width="narrow"} right above the table (with no blank lines in between)

{width="narrow"} | one | two | three | |-------------------| | a | b | c | |-------------------| | d | e | f |

Width can be set to default, narrow, wide or a percentage of the page-width. For example, this will make the table 50% of the page width:

{width="50%"} | one | two | three | |-------------------| | a | b | c | |-------------------| | d | e | f |

Multi-page tables

We’ve also made some improvements for multi-page tables.

The first improvement was to try to avoid multi-page tables. We’ve made it so that the first ten rows of a table will always be together and not broken across a page

For tables longer than that, we’ll repeat the table headers and titles at the top of every new page the table is on.

More Reading

Full documentation on tables is in the tables section of the Leanpub manual.

Originally published at

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.