Quote:
Originally Posted by mrevent
I'm sending you the files (the bundle of html files + the epub file), Thank you so much!
|

Okay. All done.
Quote:
Originally Posted by mrevent
The only thing I could do with the epub though was applying for Regex search/ replace instructions and removing the color and font from the Css file (which had made the text whiteish).
|
Yeah, you typically want to get rid of nearly all hardcoded colors.
They tend to make problems when users switch to Night Mode, etc.
See
2020: "Colored Text, EPUB, Android Dark Mode".
Quote:
Originally Posted by mrevent
A python script to do that sounds great! It would definitely be most useful for me as well, when trying to convert other html texts from that as site at least.
|
Yeah, I created it because of OCR. Many footnotes are left smack dab in the middle of the text.
I wrote about it back in
2020: "I have a DOCX with footnotes that I wanna turn to pop-up notes in ePub on Kobo Forma":
Spoiler:
Quote:
Originally Posted by Tex2002ans
Quote:
Originally Posted by Hitch
What you have now, you have to go through and recreate the footnotes, in Word, using the automated functionality, one-by-one. OR, you could open it up in HTML and code them--one by one. But those are pretty much your two choices.
|
There's an HTML method I mentioned in passing over the years:
A superscript number being the first thing in a paragraph "is most likely a footnote".
This allows you to markup something like:
Code:
<p><sup>123</sup> Example footnote.</p>
as:
Code:
<p class="footnote"><sup>123</sup> Example footnote.</p>
so if this is your original:
Code:
<p>This is a sent-</p>
<p class="footnote"><sup>123</sup> Example footnote.</p>
<p class="footnote"><sup>124</sup> Another example footnote.</p>
<p>ence that gets split across pages.</p>
you can rip out all the "footnote" classes and place at the end of the HTML:
Code:
<p>This is a sent-</p>
<p>ence that gets split across pages.</p>
[...]
<p class="footnote"><sup>123</sup> Example footnote.</p>
<p class="footnote"><sup>124</sup> Another example footnote.</p>
</body>
</html>
The downfall is it can't handle more complicated multi-paragraph footnotes*, or footnotes that go across pages, etc., but it can get you most of the way there.
I've tested this method across tons of books, and it works, but it requires some initial massaging of the HTML.
* Note: If the multi-paragraph footnotes are also smaller text, and nothing else in the book is, this can also be used to mark paragraphs as "footnote" class. From what droopy said in Post #7, it seems like this may be the case for this specific book.
|