-
Notifications
You must be signed in to change notification settings - Fork 0
Image Captions Importing above image, instead of below #24
Comments
The order of the image caption is a result of it being structured that way in the HTML of the import file: We can see this reflected once it's been imported into PB: The HTML structure in the web version of their book is different than that in the zip file: We can treat this as garbage in/garbage out or take a dive into DOM manipulation. |
I think we should treat all of these style elements including bold as garbage in garbage out. For a couple reasons:
|
sure, but this is not specifically a CSS issue. It's the HTML structure. |
In that case, we should have image captions imported to the captions caption id="attachment |
The HTML markup in the zip file is ordered like this (which is how it presents in PB):
The HTML markup on the cnx.org site:
so, adding |
So it looks like this markup is new to HTML 5. Therefore it would not make sense to use DOM to change their markup on import. https://www.w3schools.com/tags/tag_figcaption.asp. What is your and PB roadmap re HTML5? |
html 5 doesn't have a role to play in the placement of the caption in this particular instance. |
Ok I think it would NOT be a good use of your time to make this change. It does seem to be different based on books, Chemistry not as impacted as much as Physics and as the caption is centred this should be enough considering the work involved. TL;DR Low priority we will reach our to OpenStax. |
Commenting because I'd like to revisit this issue during sprint planning next week, even if just to confirm why we will not be fixing this issue. Also, I'd like to add that Figure labels/numbers (e.g., Figure 1) are removed from the "captions" during import, as you can see in previous screenshots. My guess is CNX has some sort of automatic numbering which means the figure labels are not part of the html? |
👋 Just FYI, we are switching image markup to HTML5 in Pressbooks 5.6.0 (due end of this month): This is a core WordPress feature we needed to enable; just needed to make sure it didn't cause issues with existing theme CSS. The output of the
This won't necessarily impact your approach but thought I'd let you know in case you hadn't spotted that PR come through. |
will reopen as a feature request |
Importing with the OpenStax plugins - image captions appear as paragraph text above the picture rather as caption text below the picture. This seems to be related to CSS from the original OpenStax text. When imported from OpenStax the caption code looks like this
The text was updated successfully, but these errors were encountered: