View Single Post
Old 03-12-2018, 11:39 AM   #1
futurecycle
Junior Member
futurecycle began at the beginning.
 
futurecycle's Avatar
 
Posts: 3
Karma: 10
Join Date: Mar 2018
Device: Kindle
Exporting actual style names to HTMLZ even possible?

Poetry for the Kindle is very tricky, and the only way to handle it well is to style everything. We convert all our for-print books (in ODT format) to HTMLZ via Calibre's DEBUG, then from there revise the structure index.html prior to uploading to KDP. Everything we do is style-based, for example (in Libre Office):

h1 style = Poem Title

NewStanza style = Start new stanza with extra space above the line, hanging indentation if the line runs over, and keep with next text flow control

NewLine style = Regular lines with no extra spacing, hanging indentation if the line runs over

All of these styles (and more) are in our stylesheet that we include with our Kindle editions. Because poetry for the Kindle requires control-freakness, we do NOT want to export to Kindle format from Calibre.

We've tried to put our CSS style coding into Calibre, hoping that DEBUG would read the style names appropriately. But what we wind up with always is weird style naming that has to be globally search/replaced. Even using RegExes and BBEdit to revise more than one file at a time, we still spend too much time.

Is it even possible on EXPORT to wind up with code that looks, e.g., like this:

<p class="NewLine">A line of the poem</p>

instead of this:

<p class="P-P1">A line of the poem</p>?

What am I missing? I've tried both, e.g., p.NewLine and (in desperation) NewLine in the Calibre Styling CSS, but it doesn't transfer to the exported file. I still have to spend hours revising these files.

My suspicion is that it's not even possible, which is what I'm asking. If it IS possible, can somebody point me in the right direction?
futurecycle is offline   Reply With Quote