* [ODT][BUG] Format error on export with table in list structure
@ 2022-08-10 21:17 Christian Moe
2022-08-11 4:33 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Christian Moe @ 2022-08-10 21:17 UTC (permalink / raw)
To: emacs-orgmode
Hi,
Consider the following minimal example, a nested list with a table in a
sub-item (regardless of list types and empty lines):
#+BEGIN_EXAMPLE
1. List item
- Sub-item
| Table |
#+END_EXAMPLE
This causes a format error on ODT export (I'm running Org version
9.5.4). In the content.xml file, just before the final closing
</text:list> tag, there appears a </text:list-header> tag without a
corresponding opening tag, invalidating the XML.
It may be related to this problem that, just after the table section,
for some reason there appears another numbered list item containing an
empty bulleted list, as if the list were trying to continue.
However, surrounding the table with further list items does not
help. This example causes the same error:
#+BEGIN_EXAMPLE
1. List item
- Sub-item
| Table |
- Second sub-item
2. Second top-level item
#+END_EXAMPLE
If this can be reproduced, I think it's a bug.
(It might be argued that this mix of lists and tables is an abomination
and should not be allowed anyway, but it works in the other exporters.)
What *does* help, strangely, is mixing yet another table into the list
structure. The following example exports without error.
#+BEGIN_EXAMPLE
1. List item
| Table |
- Sub-item
| Table |
#+END_EXAMPLE
Perhaps this can somehow help pin down the problem.
Yours,
Christian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ODT][BUG] Format error on export with table in list structure
2022-08-10 21:17 [ODT][BUG] Format error on export with table in list structure Christian Moe
@ 2022-08-11 4:33 ` Ihor Radchenko
2024-04-05 10:21 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2022-08-11 4:33 UTC (permalink / raw)
To: Christian Moe; +Cc: emacs-orgmode
Christian Moe <mail@christianmoe.com> writes:
> Consider the following minimal example, a nested list with a table in a
> sub-item (regardless of list types and empty lines):
>
> #+BEGIN_EXAMPLE
> 1. List item
> - Sub-item
> | Table |
> #+END_EXAMPLE
>
> This causes a format error on ODT export (I'm running Org version
> 9.5.4). In the content.xml file, just before the final closing
> </text:list> tag, there appears a </text:list-header> tag without a
> corresponding opening tag, invalidating the XML.
Confirmed.
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ODT][BUG] Format error on export with table in list structure
2022-08-11 4:33 ` Ihor Radchenko
@ 2024-04-05 10:21 ` Ihor Radchenko
0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-04-05 10:21 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Christian Moe, emacs-orgmode
Ihor Radchenko <yantar92@gmail.com> writes:
>> Consider the following minimal example, a nested list with a table in a
>> sub-item (regardless of list types and empty lines):
>>
>> #+BEGIN_EXAMPLE
>> 1. List item
>> - Sub-item
>> | Table |
>> #+END_EXAMPLE
>>
>> This causes a format error on ODT export (I'm running Org version
>> 9.5.4). In the content.xml file, just before the final closing
>> </text:list> tag, there appears a </text:list-header> tag without a
>> corresponding opening tag, invalidating the XML.
>
> Confirmed.
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ef4364287
Note that ODT format does not allow tables inside lists, so we do
nothing better than a workaround. It is generally not a good idea to
export documents like this to odt.
There is still a bug in a similar scenario when the table is nested even
further:
1. List item
- Sub-item
#+begin_textbox
| Table |
#+end_textbox
I added a FIXME to the code.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d491a74fd
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-05 10:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 21:17 [ODT][BUG] Format error on export with table in list structure Christian Moe
2022-08-11 4:33 ` Ihor Radchenko
2024-04-05 10:21 ` Ihor Radchenko
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).