Jambunathan K <kjambunat...@gmail.com> writes:

> Benjamin Slade <sl...@jnanam.net> writes:
>
>> One potential solution would be an orgmode setup which produces
>> borderless tables with an "optimal width" column setting. I don't know
>> how to do this in orgmode though (or if it can be done currently).

In Office XML, the style:table-column-properties has
style:use-optimal-column-width="true".  Based on my little
experimentation, I find that LibreOffice doesn't honor this setting.
This is the reason why columns are emitted unoptimized.

>From LibreOffice UI, if you choose "Optimal Column Width", then the
table columns are emitted NOT with above XML attribute but with
hard-coded on-the-fly widths.

May be someone can take the above issue with LibreOffice folks...

> 2. Open OrgOdtContentTemplate.xml and find a style named
> "CustomTableCell".  Edit it so that it has no borders.

Ignore the above suggestion.  It is too tedious.  I have flushed out a
fix as part of the following ELPA tar

    
http://repo.or.cz/w/org-mode/org-kjn.git/blob_plain/master:/org-odt-20140124.tar

With this fix, the behaviour of the rules in the ODT table will be much
the same as that in

    (info "(org) Tables in ODT export")

except for the following modification:

The ODT table will have top rule (or bottom rule) only if the Org-mode
table has one.

Similarly, ODT table will have left rule (resp. right rule) only if the
leftmost (resp. rightmost) data column has "<" and ">" markers.

----------------------------------------------------------------

To cut the long story short, here is how you produce a borderless table.
Use the :widths and :rel-width property to have the table look compact
and nice.


--8<---------------cut here---------------start------------->8---

This table has no rules.  It occupies 80% of page width.  The columns
will be in the ratio of 4:7:10.

#+ATTR_ODT: :rel-width 80
#+ATTR_ODT: :widths 3,6,9
| a   | b | c |
| d   | e | f |

--8<---------------cut here---------------end--------------->8---

Attachment: test.odt
Description: application/vnd.oasis.opendocument.text

Reply via email to