45

Is it possible to merge two or more cells in an org-mode table like when using \multicolumn{}{}{} or \multirow{}{}{} in LaTeX?

Something like this does not work:

|------------+-----------+----------+----------+-------------| | | Singular | Plural | | +-----------+----------+----------+-------------| | | Masculine | Neuter | Feminine | All genders | |------------+-----------+----------+----------+-------------| | Nominative | *der* | *das* | *die* | *die* | | Accusative | *den* | *das* | *die* | *die* | | Dative | *dem* | *dem* | *der* | *denen* | | Genetive | *dessen* | *dessen* | *deren* | *deren* | |------------+-----------+----------+----------+-------------| 

Is there a way to construct such a table in org-mode?

3
  • 1
    Not as far as I know, but there's table-mode. Commented Jan 12, 2015 at 15:51
  • @wvxvw Interesting. Is it possible to integrate these tables within org-mode, perhaps even as a minor mode or between #+BEGIN_SRC and #+END_SRC tags? Commented Jan 12, 2015 at 16:00
  • 1
    I'd try #+begin_src table but you'd need to handle the exporting somehow, and that sounds like a lot of trouble, unless there's already an exporeter for that... Commented Jan 12, 2015 at 16:38

1 Answer 1

36

As @wvxvw points out, you can use table.el by Takaaki Ota. There is some built-in support for this in org-mode (see manual). Your example can be easily translated to table.el syntax by replacing some | with +:

+------------+-----------+----------+----------+-------------+ | | Singular | Plural | | +-----------+----------+----------+-------------+ | | Masculine | Neuter | Feminine | All genders | +------------+-----------+----------+----------+-------------+ | Nominative | *der* | *das* | *die* | *die* | | Accusative | *den* | *das* | *die* | *die* | | Dative | *dem* | *dem* | *der* | *denen* | | Genitive | *dessen* | *dessen* | *deren* | *deren* | +------------+-----------+----------+----------+-------------+ 

The table can be edited using C-c ' and it exports fine with the HTML and LaTeX backends, except that org-mode syntax (such as using asterisks for bold) inside the cells is not recognised. Here is an example of rendered LaTeX export: enter image description here

4
  • Perfect! Thank you. As for bold type, the <b></b> tag works just fine Commented Jan 13, 2015 at 8:34
  • 10
    The sentence "Your example can be easily translated to table.el syntax by replacing some | with +:" could be understood as recommending manual translation; but I think that it is better to use the command org-table-create-with-table\.el, bound in Org Mode to ‘C-c ~’ Commented Feb 6, 2017 at 17:01
  • Yes, I was not aware of that command - thank you! Although in this particular case the OP is starting with something that is neither a legal org-mode table nor a legal table.el table, so I doesn't work cleanly. Commented Feb 7, 2017 at 20:36
  • 2
    What if I need latex fragments inside the table? Commented Apr 15, 2020 at 11:54

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.