View Single Post
Old 08-08-2020, 06:57 AM   #6
angharad09
Enthusiast
angharad09 began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Aug 2011
Device: none
Just in case it's helpful to someone down the line ... I think I have sorted the endnotes.
(If a CSS guru sees a potential problem here, please sing out!) Here goes:

Calibre treats each note like a dl (descriptive list), with dt for the endnote number and dd for the text.
If you set ...
the dt to page-break-after: avoid
the dd to page-break-before: avoid
the dl to page-break-inside: avoid
... the endnotes behave.
(I'm not sure whether the first two are essential; it was the third one that did the trick.)

I also took "page-break-inside: avoid" off of the dd (because I'd rather see an endnote break in the middle of the text than between the number and the text).

It makes me nervous to make any changes to the endnote coding for fear of breaking the complicated links between the note and the text. But I think these should be safe changes because I didn't touch the HTML ... right?

It took me awhile to start to "get" Calibre-produced coding, but the Edit Book screen is super helpful for seeing what code is attached to what and how the different codes compare.

The other related problems were more straightforward and/or related to bad formatting in the original Word document, so not too interesting to discuss here further, but I thought I'd mention the endnotes. Again, big caveat, not a power user here, use with caution -- but it seems like it ought to work.
angharad09 is offline   Reply With Quote