View Single Post
Old 07-21-2023, 10:50 AM   #2
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 876
Karma: 3501146
Join Date: Jan 2017
Location: Poland
Device: Various
Your problem is relatively easy to fix. It all depends on the book code (i.e., that further part after alt="").

Here's the solution, which you may have to adapt to your actual code.

1. [Very important] Make yourself a copy of the EPUB file, just in case.
2. [Just in case] Check the file with the EpubCheck plugin.
3. Run the Access-Aide plugin, where all your Egyptian hieroglyphics + all other images in the book will be displayed.
Yes, where there are hieroglyphs on the right insert manually numbering 1, 2, 3 etc. This will change the alt attribute (specifies an alternate text for an image).
4. Now just do the replacement

Code:
<p class="(.+?)"><img src="../images/00003.jpeg" alt="(\d+)"/>
to
Code:
<h1 title="\2"></h1><p class="\1"><img src="../images/00003.jpeg" alt="\2"/>
5. Generate a table of contents.
6. [Optional] Generate HTML table of contents.

Check your image code and adapt it to your book, as my solution is more educational (maybe useful to someone) than definitive.
BeckyEbook is online now   Reply With Quote