17.4.15

Generating tables in LaTeX

Typ­ing tables in LaTeX can get messy, but there are some good tools to sim­plify the process. One I dis­cov­ered this week is tables​gen​er​a​tor​.com, a web-​​based tool for gen­er­at­ing LaTeX tables. It also allows the table to saved in other for­mats includ­ing HTML and Mark­down. The inter­face is sim­ple, but it does most things. For com­pli­cated tables, some addi­tional for­mat­ting may be necessary.

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

Sim­i­lar func­tion­al­ity is avail­able via plu­g­ins in ExcelOpenOf­fice and Libre­of­fice — use­ful if the data for the table is already stored in a spreadsheet.
Good LaTeX edi­tors also have built-​​in table gen­er­a­tors. For exam­ple, TeX­studio has the “Quick tab­u­lar wiz­ard” and TeX­maker has the “Tab­u­lar wiz­ard”. The one in TeX­studio is too sim­ple to be very use­ful, but the TeX­maker wiz­ard has a few more features.
Another use­ful tool to avoid the mess is the “Align columns” func­tion within TeX­studio (nor­mally shown as a blue but­ton at the top of the screen). Place the cur­sor within a table and click the but­ton, and spaces are mag­i­cally added until the columns are aligned. It also works for align, array and matrix envi­ron­ments. Here is a small exam­ple from a recent paper of mine show­ing what it does.
Before:
Screenshot from 2014-04-15 09:25:44
After:
Screenshot from 2014-04-15 09:17:22
It is much eas­ier to spot prob­lems if the columns are aligned.

No hay comentarios:

Publicar un comentario