Ask Your Question
0

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

asked 2015-02-15 19:18:52 +0200

kaemingkdelange gravatar image

updated 2015-02-15 21:30:56 +0200

David gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-02-15 21:28:06 +0200

David gravatar image

updated 2015-02-16 13:41:18 +0200

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.
edit flag offensive delete link more

Comments

1

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

rautamiekka gravatar imagerautamiekka ( 2015-02-15 21:53:36 +0200 )edit
0

answered 2015-02-15 23:18:29 +0200

Lupp gravatar image

@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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-02-15 19:18:52 +0200

Seen: 2,492 times

Last updated: Feb 16 '15