View Single Post
Old 10-20-2020, 06:09 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,915
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by retiredbiker View Post
If you are really, really lucky, you can just delete the image files in the file browser and the alt text will take over. But as others have said, it may not work in some e-reader, or it may be ugly, or just not work at all.

I usually find some combination of regex S&R and manual editing to do the job. Like maybe search for <img.*?> and replace with <h1 class="chapter">Chapter </h1>, and then go through and number the chapters manually (using replace all only if chapter heads are the only images).

If you actually like the alt text available, you might get fancy enough to pull the text out of the "alt=" part of the <img... line with a regex expression and then stuff it into a replacement string. Depends on the coding you have how hard that would be.
Even if the alt text displays, it won't be styled as a chapter header. So even if it works, it doesn't work.
JSWolf is offline   Reply With Quote