org-odt.el: Put table width under user-control
commitf9d24220020964cc4e5c119a1be867107bf376d0
authorJambunathan K <kjambunathan@gmail.com>
Mon, 23 Jan 2012 06:52:53 +0000 (23 12:22 +0530)
committerJambunathan K <kjambunathan@gmail.com>
Mon, 23 Jan 2012 06:55:11 +0000 (23 12:25 +0530)
tree740b99db6031c20ff87b4c1088e865a60ccc33b1
parent32afb61b87ecc7547a5a20ff3da03b97e9f745f0
org-odt.el: Put table width under user-control

* lisp/org-odt.el (org-odt-table-style-format): New.  Template for
auto-generated table styles.
(org-odt-automatic-styles, org-odt-object-counters): New
variables.
(org-odt-add-automatic-style): New function.
(org-odt-write-automatic-styles): New function.  Create
automatic styles for tables that have custom :rel-width.
(org-odt-begin-table): Parse attributes specified with
"#+ATTR_ODT: " option and use it to create an automatic table
style.
(org-odt-save-as-outfile): Call
`org-odt-add-write-automatic-styles'.
(org-odt-init-outfile): Init newly add variables.
(org-odt-section-count): Remove it.
(org-odt-begin-section): Use `org-odt-add-automatic-style' to
generate an automatic section name.

Customize table width using :rel-width option.  For example,
to create a table of width 60% use:

    #+attr_odt: :rel-width 60
    | A | B |
    |---+---|
    |   |   |
lisp/org-odt.el