I’d like to produce variant versions of my book from a single master version, where the main differences are just in the formatting.
The simplest example is creating a 4"x7" edition by just unzipping a 4x7 template .odt and the book’s master 5"x8" edition, copying the 5"x8" edition’s content.xml file into the unzipped template, editing the ISBN and then re-zipping.
I use the same name paragraph styles in all variants.
To make the document amenable to diff tools like meld and human editing, I can break up the XML into something semantically identical (I believe!) by only folding lines after an end-text XML tag
</text...>
(I can also safely fold lines at any right angle-bracket before the XML for any element starts.)
AN advice on what I should be alert to?
One thing I’ve noticed comparing my manually constructed (by cutting and pasting the whole master text into the 4x7 template and then fixing all the formatting errors), is that the two documents have
<text:soft-page-break/>
sprinkled through in the middle of the text of paragraphs for no reason I can imagine. I certainly didn’t intend yo make any kind of page break in the middle of a paragraph.
I also observe that the names of the XML tags used for paragraphs and text styles differ (e.g. P20 in one is P15 in the other, T5 is T3, and so on, and there are about ten times the number I expected).
I also see things I don’t understand in the paragraph styles XML, like names that seem to reference page styles I have (like Body_N_HdrFtr for body pages with no header or footer), and entities like a paragraph-rsid.
<style:style style:name="P63" style:family="paragraph" style:parent-style-name="Text_20_body" style:master-page-
name="Body_5f_N_5f_HdrFtr">
<style:paragraph-properties style:page-number="auto"/>
<style:text-properties fo:language="en" fo:country="US"/>
</style:style>
<style:style style:name="P64" style:family="paragraph" style:parent-style-name="Text_20_body" style:master-page-name="Body_5f_N_5f_HdrFtr">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto"/>
<style:text-properties fo:language="en" fo:country="US"/>
</style:style>
<style:style style:name="P65" style:family="paragraph">
<style:text-properties fo:language="en" fo:country="US"/>
</style:style>
<style:style style:name="P66" style:family="paragraph" style:parent-style-name="Chapter_20_Title" style:list-style-name="">
<style:paragraph-properties fo:text-align="center" style:justify-single-word="false" fo:hyphenation-ladder-count="no-limit">
<style:tab-stops/>
</style:paragraph-properties>
<style:text-properties fo:language="en" fo:country="US" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
</style:style>
<style:style style:name="P67" style:family="paragraph" style:parent-style-name="Chapter_20_Title">
<style:paragraph-properties fo:margin-top="36pt" fo:margin-bottom="10.01pt" loext:contextual-spacing="false" fo:break-before="page" style:writing-mode="page"/>
</style:style>
<style:style style:name="P68" style:family="paragraph" style:parent-style-name="Chapter_20_Title">
<style:paragraph-properties fo:margin-top="100.01pt" fo:margin-bottom="10.01pt" loext:contextual-spacing="false" style:writing-mode="page"/>
<style:text-properties style:font-name="Times New Roman3" officeooo:paragraph-rsid="00438e2a"/>
</style:style>
So: any advice, such as some reading about the workings of the .odt XML I should be careful of?
I only vaguely understand direct formatting - just enough to know that it’s likely to trip me up. I’m not aware of any description of what it is, in detail. (Like, how you create it, and how you would create documents that avoid it.)