Generating tables in LaTeX


15 April 2014


Typing tables in LaTeX can get messy, but there are some good tools to simplify the process. One I discovered this week is, a web-based tool for generating LaTeX tables. It also allows the table to saved in other formats including HTML and Markdown. The interface is simple, but it does most things. For complicated tables, some additional formatting may be necessary.

Screenshot from 2014-04-15 08:57:38

Similar functionality is available via plugins in Excel, OpenOffice and Libreoffice — useful if the data for the table is already stored in a spreadsheet.

Good LaTeX editors also have built-in table generators. For example, TeXstudio has the “Quick tabular wizard” and TeXmaker has the “Tabular wizard”. The one in TeXstudio is too simple to be very useful, but the TeXmaker wizard has a few more features.

Another useful tool to avoid the mess is the “Align columns” function within TeXstudio (normally shown as a blue button at the top of the screen). Place the cursor within a table and click the button, and spaces are magically added until the columns are aligned. It also works for align, array and matrix environments. Here is a small example from a recent paper of mine showing what it does.

Before: Screenshot from 2014-04-15 09:25:44

After: Screenshot from 2014-04-15 09:17:22

It is much easier to spot problems if the columns are aligned.