Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 08-29-2023, 08:46 PM   #1
jma1
Connoisseur
jma1 began at the beginning.
 
Posts: 82
Karma: 10
Join Date: Dec 2015
Device: Kindle
Epoch Times problem formatting image caption

Having difficulty applying format to the captions for images that are in-line within the article text. For the leading (featured) photo the tag post_caption can be reformatted to small font as in latest built-in recipe.

The in-line photos have captions which appear to use tag 'figcaption' within figure within a div. This example article has the html section shown in attached file. Adding figcaption to extra css does not change the font from the article text font.

Why does this not work? Thanks.
Attached Thumbnails
Click image for larger version

Name:	Epoch Times in-line figure caption.JPG
Views:	67
Size:	39.9 KB
ID:	203437  
jma1 is offline   Reply With Quote
Old 08-29-2023, 11:49 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,966
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
because figcaption is converted to div as various ereaders tend to have trouble with HTML5 tags like <figure>, <figcaption> etc. You should use preprocess_html to either add your style to the figcaption tags directly or to add a class to them that you can reference in extra_css
kovidgoyal is offline   Reply With Quote
Advert
Old 08-30-2023, 12:21 AM   #3
unkn0wn
Evangelist
unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.unkn0wn can do the Funky Gibbon.
 
Posts: 459
Karma: 82692
Join Date: May 2021
Device: kindle
i think i already did that in the default recipe, try it.
unkn0wn is offline   Reply With Quote
Old 08-30-2023, 03:04 PM   #4
jma1
Connoisseur
jma1 began at the beginning.
 
Posts: 82
Karma: 10
Join Date: Dec 2015
Device: Kindle
OK now I see it, and was able to add to my version of recipe. Somehow the order of the commands within preprocess_html mattered but got it to work. Thanks.
jma1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Epoch Times has titles no content jma1 Recipes 0 08-20-2023 09:15 AM
Epoch Times Feed still failing jma1 Recipes 8 08-14-2023 09:31 AM
Epoch Times Feed failing jma1 Recipes 5 08-01-2023 01:20 PM
The Epoch Times recipie request jma1 Recipes 2 11-14-2021 03:13 PM


All times are GMT -4. The time now is 10:20 PM.


MobileRead.com is a privately owned, operated and funded community.