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

2017-09-12 Thread jiewuza
Eric S Fraga  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.  

Well, I am thinking whether this proposal would work:
1. `|@` as a separator, meaning the next cell will span multiple columns
2. `|$` as a separator, meaning the next cell will span multiple rows
3. the span will terminate when it meats a regular cell separator `|`
4. the content of the "multi-rows/columns cell"(the big cell) should be
placed in the right-bottom single cell of the big one

For example, these two tables have the same effect.
#+BEGIN_SRC org
   |@   | header |$   |
   | h1 | h2 | h3 |
   |++|
   | a  |@$  |$   |
   | d  |@   | f  |

   +-+-+-+
   | h | |
   +-+-+  h3 |
   |  h1 | h2  | |
   +-+-+-+
   |  a  |   |
   +-+ f |
   |  d  |   |
   +-+---+

#+END_SRC

I do not know if it can be implemented in a clear and simple way based
on the current org-table and ox-* code. Maybe '|@n$m' like separator
(m,n is a number) would be simpler. I do not know. But it is great if
org supports multi-row/column cells in tables.




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

2017-09-12 Thread jiewuza
Eric S Fraga  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

  

  h


  
  h3
  

  
  

  h1


  h2

  
  

  a


  b


  c

  
  

  d


  e


  f

  

#+END_SRC

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




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

2017-09-12 Thread Grant Rettke
If you set the column width like this

http://orgmode.org/manual/Column-width-and-alignment.html#Column-width-and-alignment

then you can hit C-` to edit the cell and that works nicely.

Sincerely,

Grant Rettke

On Mon, Sep 11, 2017 at 4:47 AM, Eric S Fraga  wrote:

> 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).
>
> --
> : Eric S Fraga via Emacs 24.5.1, Org release_9.1-57-gc6e563
>


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

2017-09-11 Thread Eric S Fraga
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).

-- 
: Eric S Fraga via Emacs 24.5.1, Org release_9.1-57-gc6e563


signature.asc
Description: PGP signature


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

2017-09-10 Thread jiewuza

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.

So I turned to the emacs built-in table, and create a simple example:
#+BEGIN_SRC org
   +-+-+-+
   | h | |
   +-+-+  h3 |
   |  h1 | h2  | |
   +-+-+-+
   |  a  |  b  |  c  |
   +-+-+-+
   |  d  |  e  |  f  |
   +-+-+-+
#+END_SRC

It works. However, when I export it to HTML, I find it does not contain
 tag (I would like to style the table head).

So I'd like to know how do you guys to create such tables in org-mode.

p.s. One workaround would be add support for the exporter to recognize
`===` as a separator of table head and body

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