【问题标题】:org-mode table.el export to html no caption?org-mode table.el 导出到 html 没有标题?
【发布时间】:2020-05-01 11:30:45
【问题描述】:

我想使用带有标题的 emacs org-mode 编写一个表格。 org-mode 有两种写表的方法:org-table 和 table.el。

导出为 html 时,org-table 工作正常,但 table.el 不显示标题。

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


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

应该怎么做才能让 table.el 的标题正常工作?因为table.el可以写复杂的表,非常有用。

【问题讨论】:

    标签: emacs org-mode


    【解决方案1】:

    这是一个非常古老的问题,但我设法通过添加一个空表 (||) 来获得标题。可能不是最好的解决方案,但它确实有效。

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

    【讨论】:

      【解决方案2】:

      你可以通过添加宽度属性来解决这个问题,让标题在空的 org-table 上居中,只有一个栏 |其次是table.el

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

      【讨论】:

        猜你喜欢
        • 2018-05-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多