* [bug] Tables in lists not exported to ODT
@ 2012-01-13 11:54 Eric S Fraga
2012-01-13 13:06 ` Eric S Fraga
0 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2012-01-13 11:54 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 458 bytes --]
Hello,
I am trying to export a document which includes small tables within a
list. The export to PDF via Latex works perfectly. However, when I
export to ODT, the tables simply disappear.
Attached is a simple example to illustrate the effect, both org and odt
files.
I have looked at the documentation but have not seen any caveat related
to tables. Have I missed something or is this a bug?
Thanks,
eric
--
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)
[-- Attachment #2: examplebug.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 9564 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: examplebug.org --]
[-- Type: text/orgmode, Size: 398 bytes --]
#+TITLE: examplebug.org
#+AUTHOR: Eric S Fraga
#+EMAIL: e.fraga@ucl.ac.uk
#+DATE: 2012-01-09 Mon
* tables in lists
- This a very simple list
- The second entry has a table
| time | temperature |
|------+-------------|
| 0 | 100 |
| 1 | 80. |
| 2 | 64. |
#+TBLFM: @3$2=0.8*@-1::@4$2=0.8*@-1
- The third one does not.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-13 11:54 [bug] Tables in lists not exported to ODT Eric S Fraga
@ 2012-01-13 13:06 ` Eric S Fraga
2012-01-16 21:24 ` Jambunathan K
0 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2012-01-13 13:06 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Hello,
>
> I am trying to export a document which includes small tables within a
> list. The export to PDF via Latex works perfectly. However, when I
> export to ODT, the tables simply disappear.
>
> Attached is a simple example to illustrate the effect, both org and odt
> files.
>
> I have looked at the documentation but have not seen any caveat related
> to tables. Have I missed something or is this a bug?
>
> Thanks,
> eric
Pursuing this, to the un-trained eye (mine), the ODT code being
generated looks fine so maybe this is a libreoffice bug?
However, when looking at content.xml, the "<table:table ..." entry is
fontified differently than if the table had been placed outside the
list. I use "nXML" mode for looing at XML files. The fontication would
seem to indicate something strange is going on but I cannot see anything
out of the ordinary.
Anyway, for the moment, I'll hack the document to put the table
elsewhere where it actually becomes visible as I need to get this
document out to somebody else!
Thanks again,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.122.g5b407)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-13 13:06 ` Eric S Fraga
@ 2012-01-16 21:24 ` Jambunathan K
2012-01-17 9:05 ` Eric S Fraga
0 siblings, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2012-01-16 21:24 UTC (permalink / raw)
To: emacs-orgmode
Hello Eric
I have pushed a fix for this. The fix is a bit tricky. So please
exercise extra care while verifying the output.
Hope I haven't overlooked any corner cases.
Jambunathan K.
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> Hello,
>>
>> I am trying to export a document which includes small tables within a
>> list. The export to PDF via Latex works perfectly. However, when I
>> export to ODT, the tables simply disappear.
>>
>> Attached is a simple example to illustrate the effect, both org and odt
>> files.
>>
>> I have looked at the documentation but have not seen any caveat related
>> to tables. Have I missed something or is this a bug?
>>
>> Thanks,
>> eric
>
> Pursuing this, to the un-trained eye (mine), the ODT code being
> generated looks fine so maybe this is a libreoffice bug?
>
> However, when looking at content.xml, the "<table:table ..." entry is
> fontified differently than if the table had been placed outside the
> list. I use "nXML" mode for looing at XML files. The fontication would
> seem to indicate something strange is going on but I cannot see anything
> out of the ordinary.
>
> Anyway, for the moment, I'll hack the document to put the table
> elsewhere where it actually becomes visible as I need to get this
> document out to somebody else!
>
> Thanks again,
> eric
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-16 21:24 ` Jambunathan K
@ 2012-01-17 9:05 ` Eric S Fraga
2012-01-20 4:18 ` Jambunathan K
2012-01-20 19:42 ` Achim Gratz
0 siblings, 2 replies; 12+ messages in thread
From: Eric S Fraga @ 2012-01-17 9:05 UTC (permalink / raw)
To: Jambunathan K; +Cc: emacs-orgmode
Jambunathan K <kjambunathan@gmail.com> writes:
> Hello Eric
>
> I have pushed a fix for this. The fix is a bit tricky. So please
> exercise extra care while verifying the output.
>
> Hope I haven't overlooked any corner cases.
Jambunathan,
my simple examples all work perfectly. Many thanks!
One comment: for tables that are indented, it probably makes sense to
have the table take up 100% of the width available to it? In any case,
is there an easy way to customise this from within LibreOffice? I note
that, in etc/styles/OrgOdtContentTemplate.xml, you have defined OrgTable
with 96% for the width but I have no idea how to change that value from
within LibreOffice. This OrgTable "style" does not appear anywhere in
the style chooser (F11).
By the way, I was surprised, upon reading your comments in the git log,
that OpenDocument doesn't support tables within lists. This seems like
a silly restriction? Given that OpenDocument uses XML for its encoding,
I would have thought that a hierarchical structure in a document would
be trivial to represent. Do you know what the reasoning was? Just
curious!
Thanks again,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.8.03 (release_7.8.03.138.gbf1d5)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-17 9:05 ` Eric S Fraga
@ 2012-01-20 4:18 ` Jambunathan K
2012-01-20 8:44 ` Eric S Fraga
2012-01-23 7:00 ` Jambunathan K
2012-01-20 19:42 ` Achim Gratz
1 sibling, 2 replies; 12+ messages in thread
From: Jambunathan K @ 2012-01-20 4:18 UTC (permalink / raw)
To: emacs-orgmode
> One comment: for tables that are indented, it probably makes sense to
> have the table take up 100% of the width available to it?
Do you want to maximize the real-estate available for tables - indented
or otherwise.
Indentation for tables consume some real estate. Are you saying that you
want no indentation for tables AND have them occupy 100% of paper-width
(save for margins).
> In any case, is there an easy way to customise this from within
> LibreOffice? I note that, in etc/styles/OrgOdtContentTemplate.xml,
> you have defined OrgTable with 96% for the width but I have no idea
> how to change that value from within LibreOffice.
I am open to bumping the number to 100% by default, if that makes the
exporter more usable.
Btw, I was trying to make the tables cute-looking (i.e., have them
occupy just the right amount of space) There is no easy way to do it
from within org-odt + LibreOffice combo.
> This OrgTable "style" does not appear anywhere in the style chooser
> (F11).
Tables and table related things are not cusotmizable through the
LibreOffice stylist. The OASIS spec does allow for "common styles" for
tables - styles that you typically see in the LibreOffice stylist or
OrgOdtStyles.xml. Since LibreOffice's implementation doesn't honor
common styles for tables and totally ignore those, I have no option but
to put them in the OrgOdtContentTemplate.xml file as automatic styles.
The only easiest way is to modify the XML file directly.
> By the way, I was surprised, upon reading your comments in the git log,
> that OpenDocument doesn't support tables within lists. This seems like
> a silly restriction? Given that OpenDocument uses XML for its encoding,
> I would have thought that a hierarchical structure in a document would
> be trivial to represent. Do you know what the reasoning was? Just
> curious!
I have no clue.
To my untrained eye, OASIS spec seems more like a documentation of an
existing system (as an after-thought) and doesn't provide any
commentaries on underlying design principle. So the user is left with
his own (subjective) judgments.
Based on your (LaTeX) experience, what is the best way to typeset
tables. Should they be put in a frame and configurable as floats?
> Thanks again,
> eric
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-20 4:18 ` Jambunathan K
@ 2012-01-20 8:44 ` Eric S Fraga
2012-01-23 7:05 ` Jambunathan K
2012-01-23 7:00 ` Jambunathan K
1 sibling, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2012-01-20 8:44 UTC (permalink / raw)
To: Jambunathan K; +Cc: emacs-orgmode
Jambunathan K <kjambunathan@gmail.com> writes:
>> One comment: for tables that are indented, it probably makes sense to
>> have the table take up 100% of the width available to it?
>
> Do you want to maximize the real-estate available for tables - indented
> or otherwise.
>
> Indentation for tables consume some real estate. Are you saying that you
> want no indentation for tables AND have them occupy 100% of paper-width
> (save for margins).
>
>> In any case, is there an easy way to customise this from within
>> LibreOffice? I note that, in etc/styles/OrgOdtContentTemplate.xml,
>> you have defined OrgTable with 96% for the width but I have no idea
>> how to change that value from within LibreOffice.
>
> I am open to bumping the number to 100% by default, if that makes the
> exporter more usable.
>
> Btw, I was trying to make the tables cute-looking (i.e., have them
> occupy just the right amount of space) There is no easy way to do it
> from within org-odt + LibreOffice combo.
I understand what you were trying to do! And I think that, for general
tables, you have taken the right approach. It is just that for tables
within an indented environment, i.e. a list, the result is not as
pretty. However, given your description of the limitations imposed by
Oasis etc., I think it would be best to keep things as they are as the
general use will benefit from your current style decisions.
Oh, and many thanks for explaining the way that ODT styling and so on
works. Very helpful.
[...]
> Based on your (LaTeX) experience, what is the best way to typeset
> tables. Should they be put in a frame and configurable as floats?
There are two use cases: floating tables with captions etc and inline
tables. In latex, both use the tabular (and other similar) environment
for the actual table contents. This is then encapsulated within a table
environment if a floating table is desired. In both cases, tables will
take up as much width as required by the contents of the table and, by
default, columns will be just as wide individually as necessary for
their respective contents.
A tabular environment is formatted as a character and so will only be
centred if that is specified for the paragraph it is in. The table
environment will centre the tabular environment within its floating
environment.
Anyway, with respect to formatting, I think you have made the right
choices, given the limitations you have to work under, so I recommend
you leave things as they are! The results are perfectly fine and look
good in the majority of cases, IMO. Whether a table should be in a
floating environment or not is more difficult to answer. My instinctive
reaction is to say that they should be. However, my experience
(limited) with MS Word and LibreOffice leads me to think that this
causes problems in general. I find the behaviour of floating frames in
word processors to be somewhat unpredictable and difficult to control,
but that could simply be me! ;-) Others may be better placed to voice
an opinion in this case.
Thanks again,
eric
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1
: using Org-mode version 7.8.03 (release_7.8.03.163.gbded9)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-17 9:05 ` Eric S Fraga
2012-01-20 4:18 ` Jambunathan K
@ 2012-01-20 19:42 ` Achim Gratz
2012-01-21 13:49 ` Eric S Fraga
1 sibling, 1 reply; 12+ messages in thread
From: Achim Gratz @ 2012-01-20 19:42 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> By the way, I was surprised, upon reading your comments in the git log,
> that OpenDocument doesn't support tables within lists. This seems like
> a silly restriction? Given that OpenDocument uses XML for its encoding,
> I would have thought that a hierarchical structure in a document would
> be trivial to represent. Do you know what the reasoning was? Just
> curious!
You would have to read the DTD for OpenDocument, but I would guess that
this is similar to the distinction between block-level and inline
elements in XHTML. In fact it is exactly the hierarchical nature of
the definition that makes it possible to prevent the inclusion of higher
level elements as sub-elements of their children.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-20 19:42 ` Achim Gratz
@ 2012-01-21 13:49 ` Eric S Fraga
0 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2012-01-21 13:49 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
Achim Gratz <Stromeko@nexgo.de> writes:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>> By the way, I was surprised, upon reading your comments in the git log,
>> that OpenDocument doesn't support tables within lists. This seems like
>
>> a silly restriction? Given that OpenDocument uses XML for its encoding,
>> I would have thought that a hierarchical structure in a document would
>> be trivial to represent. Do you know what the reasoning was? Just
>> curious!
>
> You would have to read the DTD for OpenDocument, but I would guess that
> this is similar to the distinction between block-level and inline
> elements in XHTML. In fact it is exactly the hierarchical nature of
> the definition that makes it possible to prevent the inclusion of higher
> level elements as sub-elements of their children.
>
>
> Regards,
> Achim.
Thanks.
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.92.1
: using Org-mode version 7.8.03 (release_7.8.03.179.ge760)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-20 4:18 ` Jambunathan K
2012-01-20 8:44 ` Eric S Fraga
@ 2012-01-23 7:00 ` Jambunathan K
2012-01-23 10:48 ` Andreas Leha
1 sibling, 1 reply; 12+ messages in thread
From: Jambunathan K @ 2012-01-23 7:00 UTC (permalink / raw)
To: emacs-orgmode
Jambunathan K <kjambunathan@gmail.com> writes:
> Btw, I was trying to make the tables cute-looking
Just pushed a fix whereby one can control the width of the tables.
,---- commit f9d242
| Customize table width using :rel-width option. For example, to create a
| table of width 60% use:
|
| #+attr_odt: :rel-width 60
|
| | A | B |
| |---+---|
| | | |
`----
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-20 8:44 ` Eric S Fraga
@ 2012-01-23 7:05 ` Jambunathan K
0 siblings, 0 replies; 12+ messages in thread
From: Jambunathan K @ 2012-01-23 7:05 UTC (permalink / raw)
To: emacs-orgmode
> I find the behaviour of floating frames in word processors to be
> somewhat unpredictable and difficult to control, but that could simply
> be me! ;-)
You are not alone.
See https://www.libreoffice.org/bugzilla/show_bug.cgi?id=40879
--
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-23 7:00 ` Jambunathan K
@ 2012-01-23 10:48 ` Andreas Leha
2012-01-23 11:06 ` Christian Moe
0 siblings, 1 reply; 12+ messages in thread
From: Andreas Leha @ 2012-01-23 10:48 UTC (permalink / raw)
To: emacs-orgmode
Jambunathan K <kjambunathan@gmail.com> writes:
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Btw, I was trying to make the tables cute-looking
>
> Just pushed a fix whereby one can control the width of the tables.
>
> ,---- commit f9d242
> | Customize table width using :rel-width option. For example, to create a
> | table of width 60% use:
> |
> | #+attr_odt: :rel-width 60
> |
> | | A | B |
> | |---+---|
> | | | |
> `----
Thanks for this very useful feature. Works nicely for me.
- Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [bug] Tables in lists not exported to ODT
2012-01-23 10:48 ` Andreas Leha
@ 2012-01-23 11:06 ` Christian Moe
0 siblings, 0 replies; 12+ messages in thread
From: Christian Moe @ 2012-01-23 11:06 UTC (permalink / raw)
To: Andreas Leha; +Cc: emacs-orgmode
On 1/23/12 11:48 AM, Andreas Leha wrote:
> Jambunathan K<kjambunathan@gmail.com> writes:
>> Just pushed a fix whereby one can control the width of the tables.
> Thanks for this very useful feature. Works nicely for me.
+1!
Thanks,
Christian
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-01-23 11:10 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 11:54 [bug] Tables in lists not exported to ODT Eric S Fraga
2012-01-13 13:06 ` Eric S Fraga
2012-01-16 21:24 ` Jambunathan K
2012-01-17 9:05 ` Eric S Fraga
2012-01-20 4:18 ` Jambunathan K
2012-01-20 8:44 ` Eric S Fraga
2012-01-23 7:05 ` Jambunathan K
2012-01-23 7:00 ` Jambunathan K
2012-01-23 10:48 ` Andreas Leha
2012-01-23 11:06 ` Christian Moe
2012-01-20 19:42 ` Achim Gratz
2012-01-21 13:49 ` Eric S Fraga
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).