kjambunathan / org-mode-ox-odt

The Authoritative fork of Org mode's ODT exporter
GNU General Public License v3.0
47 stars 9 forks source link

Add support for "Transcluded Tables" (was "Nesting list tables makes it hard to see the table structure within the list table. Provide better alternatives") #112

Closed kjambunathan closed 3 years ago

kjambunathan commented 3 years ago

Nesting list tables makes it hard to see the table structure within the list table. Provide better alternatives

cf. https://github.com/kjambunathan/org-mode-ox-odt/discussions/102#discussioncomment-1422232

Cc @QiangF, @ouboub

kjambunathan commented 3 years ago

Nesting list tables makes it hard to see the table structure within the list table. Provide better alternatives

I have added support for "Transcluded Tables". They are better list tables. To use this feature, you need to turn ON the corresponding knob in 'org-odt-experimental-features.

See commit for more details.

Screenshot from 2021-10-25 18-32-50

#+begin_src emacs-lisp :exports results :results silent
(add-to-list 'org-odt-experimental-features 'transclude-sole-footnote-references-in-a-table)
#+end_src

When you export this org table

#+begin_src org
,#+ATTR_ODT: :widths "2,1,1,8"
| /       | <        | >        |         |
| Day     | Min Temp | Max Temp | Summary |
|---------+----------+----------+---------|
| Monday  | 11C      | 22C      | [fn:1]  |
|---------+----------+----------+---------|
| Tuesday | 9C       | 19C      | [fn:2]  |

[fn:1]

1. A clear day with lots of sunshine.
2. Late in the day, a strong breeze will bring down the temperatures.

[fn:2]

1. Cloudy with rain, across many northern regions.
2. Clear spells across most of Scotland and Northern Ireland, but
   rain reaching the far northwest.
#+end_src

you get this table

#+ATTR_ODT: :widths "2,1,1,8"
| /       | <        | >        |         |
| Day     | Min Temp | Max Temp | Summary |
|---------+----------+----------+---------|
| Monday  | 11C      | 22C      | [fn:1]  |
|---------+----------+----------+---------|
| Tuesday | 9C       | 19C      | [fn:2]  |

[fn:1]

1. A clear day with lots of sunshine.
2. Late in the day, a strong breeze will bring down the temperatures.

[fn:2]

    1. Cloudy with rain, across many northern regions.
    2. Clear spells across most of Scotland and Northern Ireland, but
       rain reaching the far northwest.