Add support for indented tables in ODT export
commitbf1d5cfe95e58b1ed96a7164c45214c2a1ed01d0
authorJambunathan K <kjambunathan@gmail.com>
Mon, 16 Jan 2012 20:55:47 +0000 (17 02:25 +0530)
committerJambunathan K <kjambunathan@gmail.com>
Mon, 16 Jan 2012 20:55:47 +0000 (17 02:25 +0530)
treed91e060bda1af41abb677c72ab760d87f08cb925
parent812d0a53758d36424cf2c2044b0e43c14cde33fd
Add support for indented tables in ODT export

* etc/styles/OrgOdtContentTemplate.xml
(OrgIndentedSection-Level-*): New section styles. These
sections are indented to the same level as the corresponding
list entries.  These sections hold tables that occur within a
list.
(OrgTable): Increased relative width from 90% to 96% for
aesthetic reasons.

* lisp/org-odt.el (org-odt-table-indentedp): New variable
(org-odt-begin-table): Modified.  If the table is within a
list, temporarily leave the list and begin an indented section
before emitting the table.
(org-odt-end-table): Modified.  If the table was within a
list, close the indented section and re-open the list
immediately after ending the table.
(org-odt-continue-list, org-odt-discontinue-list): Helper
routines to temporarily discontinue and continue a list.
(org-odt-list-stack-stashed): New variable to hold the state
of a pending list.
(org-odt-begin-list, org-odt-begin-list-item)
(org-odt-end-list-item): Modified. Handle nitty-gritties for
continuing a list and list item.
(org-odt-section-count): New variable that keeps track of
section count.  Used in conjunction with naming of sections.
(org-odt-begin-section, org-odt-end-section): New defuns.
(org-odt-init-outfile): Initialize
`org-odt-list-stack-stashed' and `org-odt-section-count'.

* lisp/org-lparse.el (org-lparse-list-item-count): Removed. Was a
superfluous variable.
(org-lparse-list-level): Removed.  Now derived from
`org-lparse-list-stack'.
(org-lparse-list-stack): New.  List that records the list
types - ordered, unordered or descriptive - in the following
order: self, parent, grand-parent etc.
(org-do-lparse): Added, removed above let-bound vars.
Disallowed regular tables within list-table block.
(org-lparse-begin-list, org-lparse-end-list)
(org-lparse-begin-list-item, org-lparse-end-list-item):
Propagate above changes.

OpenDocument doesn't permit tables to occur in the middle of a
list.  Use list continuations and indented sections to typeset
indented tables.

Fixes the following bug:
http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00515.html
etc/styles/OrgOdtContentTemplate.xml
lisp/org-lparse.el
lisp/org-odt.el