Reputation: 14660
IS there a way to 'texify' an ASCII table written with Emacs' orgtabl-mode. Creating tables in this mode is extremely simple.
E.g. suppose I have this table
|------+-----+-----|
| A | B | C |
|------+-----+-----|
| 2.34 | 2.7 | 8.9 |
| 3.67 | 4.5 | 8.9 |
|------+-----+-----|
If in EMACS, I could highlight this region and do soething like M-x texify
or whatver to generate the latex code for that table that would save me a lot of pain.
Any non-emacs suggestion is also welcome.
Upvotes: 10
Views: 4233
Reputation: 1593
In org-mode, put your cursor in the table, and M-x org-table-export
exports the table in a file.
Upvotes: 1
Reputation: 8332
You could use orgtbl-mode. In your latex buffer, do M-xorgtbl-mode
, add
% BEGIN RECEIVE ORGTBL thenameofthetable
% END RECEIVE ORGTBL thenameofthetable
where you want the table to be.
add
#+ORGTBL: SEND thenameofthetable orgtbl-to-latex :splice nil :skip 0
|------+-----+-----|
| A | B | C |
|------+-----+-----|
| 2.34 | 2.7 | 8.9 |
| 3.67 | 4.5 | 8.9 |
|------+-----+-----|
after the \end{document}
and do C-cC-c on the org-mode table
The other solution is already given by Michael Hoffman: use org-mode export capability with C-cC-el
Upvotes: 16