1
votes

I want to write a table using emacs org-mode with caption. org-mode has two methods for write tables: org-table and table.el.

when exporting to html, org-table works fine, but table.el not display caption.

#+caption: org-table
|------+------|
| name |  age |
|------+------|
| jim  | 8888 |
|------+------|


#+caption: table.el
  +-----+-----+
  |name |age  |
  +-----+-----+
  |jim  |8888 |
  +-----+-----+

what should do to get table.el's caption working? Because table.el can write complex tables, which is very useful.

2

2 Answers

0
votes

This is a very old question but I managed to get a caption by adding an empty table (||). Probably not the best solution but it works.

#+caption: table.el
||
  +-----+-----+
  |name |age  |
  +-----+-----+
  |jim  |8888 |
  +-----+-----+
0
votes

You can solve that by adding width attribute to center the caption on empty org-table with just one bar | followed by table.el

#+CAPTION: table.el
#+ATTR_HTML: :width 100%
|
+------+------+
| name |  age |
+------+------+
| jim  | 8888 |
+------+------+