emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to create tables with multi-rows/columns cells?


From: jiewuza
Subject: Re: [O] How to create tables with multi-rows/columns cells?
Date: Wed, 13 Sep 2017 09:49:35 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin)

Eric S Fraga <address@hidden> writes:

> On Monday, 11 Sep 2017 at 04:36, jiewuza wrote:
>> It is quite common to have multi-rows/columns cells in talbe. But as far
>> as I know, it seems impossible with the org built-in table editor.
>
> org does not support multi-row/column cells in tables.  When you say:
>
>> It works.
>
> what do you mean?  If I edit your example, org does not recognise it as
> a table (or, at least, not a properly defined one).

I mean when I export the table to html (see below), I get what I want.

#+BEGIN_SRC org
   +-----+-----+-----+
   |     h     |     |
   +-----+-----+  h3 |
   |  h1 | h2  |     |
   +-----+-----+-----+
   |  a  |  b  |  c  |
   +-----+-----+-----+
   |  d  |  e  |  f  |
   +-----+-----+-----+
#+END_SRC

#+BEGIN_SRC html
<table border="1">
  <tr>
    <td colspan="2" align="left" valign="top">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
    <td rowspan="2" align="left" valign="top">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
      &nbsp;&nbsp;h3&nbsp;<br />
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </td>
  </tr>
  <tr>
    <td align="left" valign="top">
      &nbsp;&nbsp;h1&nbsp;
    </td>
    <td align="left" valign="top">
      &nbsp;h2&nbsp;&nbsp;
    </td>
  </tr>
  <tr>
    <td align="left" valign="top">
      &nbsp;&nbsp;a&nbsp;&nbsp;
    </td>
    <td align="left" valign="top">
      &nbsp;&nbsp;b&nbsp;&nbsp;
    </td>
    <td align="left" valign="top">
      &nbsp;&nbsp;c&nbsp;&nbsp;
    </td>
  </tr>
  <tr>
    <td align="left" valign="top">
      &nbsp;&nbsp;d&nbsp;&nbsp;
    </td>
    <td align="left" valign="top">
      &nbsp;&nbsp;e&nbsp;&nbsp;
    </td>
    <td align="left" valign="top">
      &nbsp;&nbsp;f&nbsp;&nbsp;
    </td>
  </tr>
</table>
#+END_SRC

But there is no <thead> in the output. That is why I suggest maybe we
can add org support to treat "===" as a separator of thead and tbody.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]