Back to my blog Back to my projects

Dokuwiki ODT plugin

Ticket #16 (new defect)

Opened 2 years ago

Last modified 10 months ago

Heading information missing in generated odt

Reported by: Maciej Nadolski Owned by:
Priority: major Version: 20101030
Keywords: Cc:

Description

Hi,

I am trying to use odt plugin with includes plugin in a way you propose on odt plugins page http://www.dokuwiki.org/plugin:odt#include

<quote>
The include plugin will let you generate a single ODT file from multiple wiki pages, just like for XHTML. Support for the ODT format is included in the latest release.
</quote>

When generating odt document, from page created with includes plugin,

~~ODT~~
{{odt>template:odt-template.odt}}
{{page>myspace:myapi:service}}

the information about headings is missing in odt document and whole text is in the "default style".
To simplify problem and eliminate potential problem with the template itself, I did test with "odt-template.odt" template that is just an empty odt document created with OpenOffice? .

Versions of plugins:
odt - http://aurelien.bompard.org/projects/files/dokuwiki-odt/dokuwiki-odt-20101030.zip
include - https://download.github.com/dokufreaks-plugin-include-2011-01-01-2-g5534e4e.tar.gz

Change History

comment:1 Changed 10 months ago by Matt

This appears to still be current, not sure if it's a bug in plugin:odt or plugin:include, though I've opened a ticket there too:

https://github.com/dokufreaks/plugin-include/issues/92

Poking around, I found that an export of a regular page with no use of include is just fine, the headings come across correctly. And even with include being used, while the headings aren't styled (they're just left as style "default") some sort of index data is being populated: opening the resulting file in MS Word there's still navigation info based on the page sections.

comment:2 Changed 10 months ago by Matt

I've done a little more digging. It looks to be related to using a template. If you don't use a template at all (empty or otherwise) then the headings are coded correctly.

comment:3 Changed 10 months ago by Aurelien

Interesting, thanks for looking into that. I have little time for dokuwiki right now, but it should clear up next week. Thanks for reporting.

comment:4 Changed 10 months ago by Matt

What I've wound up doing is changing styles.xml in my template to use the same style names as plugin:odt is using for headings. Then it's all styled correctly.

This may be an artefact of the template originating in Word rather than OOo or LibreOffice?. It wasn't terribly difficult to hand-edit the XML in the template to match, though it does mean that a non-technical user would have difficulty changing the template.

Note: See TracTickets for help on using tickets.