Next: , Previous: Context-sensitive commands, Up: Hacking

A.6 Tables and lists in arbitrary syntax

Because of Org's success in handling tables with Orgtbl, a frequently asked feature is to Org's usability functions to other table formats native to other modem's, such as LaTeX. This would be hard to do in a general way without complicated customization nightmares. Moreover, that would take Org away from its simplicity roots that Orgtbl has proven. There is, however, an alternate approach to accomplishing the same.

This approach involves implementing a custom translate function that operates on a native Org source table to produce a table in another format. This strategy would keep the excellently working Orgtbl simple and isolate complications, if any, confined to the translate function. To add more alien table formats, we just add more translate functions. Also the burden of developing custom translate functions for new table formats will be in the hands of those who know those formats best.

For an example of how this strategy works, see Orgstruct mode. In that mode, Bastien added the ability to use Org's facilities to edit and re-structure lists. He did by turning orgstruct-mode on, and then exporting the list locally to another format, such as HTML, LaTeX or Texinfo.