How to see odt source? Is there an editor. I want to remove junk styles - my epub gets confused.

Hi, I miss the good WordPerfect function right now: How to see odt source. Is there an editor? I want to remove junk styles - my epub gets confused. I see a lot junk in the xhtml file.

There might be a simpler method to achieve what you’re after, but there are two ways to see .ODT “source”:

  1. *.odt files are just ZIP archives. Rename as *.zip (if necessary in your context - see comment below) and uncompress. You’ll see all the files that make up the “source”.
  2. Even easier, just use “Save as…” and save your *.odt file as *.fodt. This is the “Flat XML ODF Text Document” type (.fodt). That’s just a a plain XML file (of course) and you can edit in your favourite text editor.

7-Zip is smart enough to realize the OpenDocument Format files are ZIP files and opens them like one.

@kaemingkdelange - What do you suppose to be “junk styles”? I suppose there may be a lot of automatic styles created to handle the direct formatting the author applied to objects contained in the document. I would guess using (next to) no direct formatting, and a few actually needed named styles for all the objects named styles can be applied to, should result in lean xml files describing the document. The xml will then contain rather few styles (and no “junk styles”). Removing styles acutally needed might cause damage. If you select all your document and apply > ‘Format’ > ‘Clear Direct Formatting’ (Ctrl+M) you might get surprising results.

In the very few cases I had to edit one of the xml files inside an odt file (always content.xml) I used notepad++ (portable) with the “XML Tools” plug-in. It is limited, however.