08-29-2023, 08:46 PM | #1 |
Connoisseur
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. |
08-29-2023, 11:49 PM | #2 |
creator of calibre
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
|
Advert | |
|
08-30-2023, 12:21 AM | #3 |
Evangelist
Posts: 459
Karma: 82692
Join Date: May 2021
Device: kindle
|
i think i already did that in the default recipe, try it.
|
08-30-2023, 03:04 PM | #4 |
Connoisseur
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.
|
|
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 |