![]() |
#1 |
Junior Member
![]() 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? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,164
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, it isn't. Conversion always flattens CSS. I'm not sure why you are using the workflow you describe. A better one would be to save as docx in libreoffice, then use the calibre editor to import the DOCX which will generate an EPUB that you can edit to your hearts content (the style names will be better than with a conversion, but still not identical to the input document). After perfecting the EPUB, upload that to KDP
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2018
Device: Kindle
|
Quote:
We started working directly in HTML years ago, so that's the approach we've always taken. I will try what you suggest and see if it's not an improvement. But I so distrust Microsoft Word after trying to work with it for decades that the first thing I do with a DOC or DOCX file is to get it into something else! Thank you so much for your guidance. Any chance you might add the ODT format to the Import options? Now I'm off to another learning curve...great program! |
|
![]() |
![]() |
![]() |
#4 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,611
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@futurecycle - you might alaso want to have a look at the Mammoth DOCX converter, it provides user defined mapping of the styles embedded in a DOCX document into CSS. There's a DOCX Input plugin for the Sigil Editor that uses the Mammoth converter to create an EPUB directly.
BR |
![]() |
![]() |
![]() |
#5 | |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Mar 2018
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
Tags |
export css, styling |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
automatic changing christian names and family names | sjefclaassen | Calibre | 3 | 09-29-2017 06:59 AM |
Style Sheet entry for a 'hanging' style | AThirstyMind | Kindle Formats | 6 | 12-10-2016 12:28 AM |
Custom style names in CSS | flipsake | Conversion | 0 | 11-30-2013 09:09 AM |
Paragraph Style Not Exporting / ePub | soulartist | Workshop | 5 | 12-11-2010 12:02 AM |
Mobi TOC style vs ePub style? | phearlez | Kindle Formats | 3 | 04-11-2010 06:35 AM |