Search code examples
emacsorg-modeorg-table

emacs org-mode: How to remove <colgroup> tag generated by HTML export?


Environment: emacs 24.3 (9) for os x with org-mode version: 8.2.1.21

I used org-mode to convert org files with tables into html tables format. However, the html files always include the following snippets whenever a table exists:

<colgroup>
<col  class="left" />

<col  class="right" />

<col  class="right" />
</colgroup>

I have tried several ways to eliminate that snippet output but those tags just won't go way; some include M-x customize-variable 1. org-html-* 2. org-export-table-* 3. org-export-html-* 4. org-table-*

I can see that snippet may be generated by ox-html.el but I cannot nil that action.

I just want to have plain HTML tables exported from my org files. Nothings else. No extra default attribute, no other default HTML tags, no css, etc. How can I achieve that?


Solution

  • There's currently no customization options to remove <colgroup>. But you can do this if you know that you don't want them at all:

    (defun org-export-table-cell-starts-colgroup-p (table-cell info))
    (defun org-export-table-cell-ends-colgroup-p (table-cell info))