Designing great tables using LaTeX

Slashdot it! Delicious Share on Facebook Tweet! Digg!

WYSIWYG

If you normally work with a spreadsheet, the LaTeX table setup might seem nonintuitive at first. Instead of an easy-to-read table grid, you have to enter abstract code. If you insist on using a WYSIWYG application, you can create the tables with LibreOffice Calc and convert them into LaTeX code with Calc2LaTeX-Makro [12] (Figure 3).

Figure 3: The CalcLaTeX office macro creates LaTeX code out of LibreOffice Calc spreadsheets.

Highlight the relevant cells in the Calc file and select the menu item Tools | Macros | Run macro… . This step opens a dialog where you must click on Calc2LaTeX under Libraries | My macros and then on Calc2LaTeX in the unfolded menu. From the list of macros, select Main and then click on the Run button on the right. The macro's dialog presents some further settings. The LaTeX code then appears, which you can copy directly into your LaTeX document or save as a file.

An alternative is the online Table Editor [13], where you can create tables in a web browser and export them as LaTeX code in a LaTeX document (Figure 4).

Figure 4: Use the online Table Editor to create the table code in a browser.

Conclusion

LaTeX provides extensive opportunities for creating professional tables if used with the proper add-on packages. Not only is it ideal for static tables, but it can compete with spreadsheet programs. To write new values in a table, you unfortunately need to open the source file, edit it, and start a compile with LaTeX again. Only then will new values appear in the output.

Both solutions have a significant drawback, however. Calc2LaTex and the online editor both use the tabular environment without additional packages, with the resulting limitations. The cell colorization pretty much stays intact, though. l

Installing the Calc2LaTeX Macro

Download the Calc2LaTeX macro and unzip the file. Open LibreOffice and choose Tools | Macros | Organize macros | LibreOffice Basic… . A dialog appears where you click Manage… ; then click the Libraries tab and Import… . Move to the folder where you unzipped Calc2LaTeX and choose the script.xlb file, followed by OK to confirm.

Buy this article as PDF

Express-Checkout as PDF

Pages: 4

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content