Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-13-2023, 08:51 AM   #1
z537815
Enthusiast
z537815 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
<figure> and <figcaption>

If I code a picture with a caption:

<figure>
<img...>
<figcaption>...</figcaption>
</figure>

isn't this picture+caption then supposed to be 1 unit?

I'm asking because I specified a style="height:100vh" on the <figure>, but it looks as if the "height" only affects the <img> and not the caption. At least in ADE 4.5.11.187658 it does.
z537815 is offline   Reply With Quote
Old 07-13-2023, 09:51 AM   #2
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: 74,019
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Are you doing this coding for yourself or is it for a book that's going to be for sale? I ask because how you code it depends on what you are going to do with the book.
JSWolf is online now   Reply With Quote
Old 07-13-2023, 10:37 AM   #3
z537815
Enthusiast
z537815 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
It's all for myself. I started doing this - or at least, trying to do it - when I found that ADE didn't properly display several pictures in the book. They kind of "disappear" at the bottom of the page, and I cannot scroll down then to see the rest.

So I'm trying to get the (pretty large) picture and its caption onto a separate page. I thought that framing the <IMG and its <FIGCAPTION with <FIGURE this way, would allow me to do it. But - according to ADE - I do manage that with the <IMG (it gets onto a new page) but the <FIGCAPTION doesn't.

The <IMG occupies the whole page (top to bottom) and the caption is displayed on the next page.
z537815 is offline   Reply With Quote
Old 07-13-2023, 11:47 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,097
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Not sure if it'll work but have you tried setting the size of the img and figcaption separately?

figure: height:100vh
figure image: height:80%
figure caption: height:20%
Turtle91 is online now   Reply With Quote
Old 07-13-2023, 12:24 PM   #5
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
Quote:
Originally Posted by z537815 View Post
It's all for myself. I started doing this - or at least, trying to do it - when I found that ADE didn't properly display several pictures in the book. They kind of "disappear" at the bottom of the page, and I cannot scroll down then to see the rest.

So I'm trying to get the (pretty large) picture and its caption onto a separate page. I thought that framing the <IMG and its <FIGCAPTION with <FIGURE this way, would allow me to do it. But - according to ADE - I do manage that with the <IMG (it gets onto a new page) but the <FIGCAPTION doesn't.

The <IMG occupies the whole page (top to bottom) and the caption is displayed on the next page.
This may or may not work for what you are after, as you have to either have the image at the top of the XHTML file or in its own separate XHTML file. But you can play with it, see if it suits your needs or not.

https://github.com/jstallent/ImagesSingleFile
graycyn is offline   Reply With Quote
Old 07-15-2023, 01:49 PM   #6
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: 74,019
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
But if the image and figure do not fit the screen together, then they would have to slit. There's no way to prevent this.
JSWolf is online now   Reply With Quote
Old 07-16-2023, 12:04 AM   #7
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,097
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
What I was thinking was the <figure> would take the full viewport height (100 vh), then the image would take 80% and the caption would get 20% of the parent container (the figure). That should fit everything on one page. Of course you may need to adjust the ratio of image to caption size as needed for your image/caption.

If your device/app is too old to support vh then this method obviously wouldn’t work.
Turtle91 is online now   Reply With Quote
Old 07-16-2023, 02:33 PM   #8
z537815
Enthusiast
z537815 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
I might give that a try, but in the meantime I'm starting to think that the problem might be with ADE.

If I load the original Epub in ADE, it displays just a part of this (very) large picture. Without any scrollbars. I thought: what if it's clipping, because the picture simply won't fit in the viewbox, and "overflow: hidden"?

So I set "overflow:auto" in the CSS-class for the picture, expecting scrollbars to appear. They don't. The picture's now visible completely, as if it's been put onto a new page, but the caption still appears on the next page.

So, a lot better, but still not quite what I wanted. I think I'm going to post this in an ADE forum.
z537815 is offline   Reply With Quote
Old 07-16-2023, 02:35 PM   #9
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: 74,019
Karma: 129333114
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 z537815 View Post
I might give that a try, but in the meantime I'm starting to think that the problem might be with ADE.

If I load the original Epub in ADE, it displays just a part of this (very) large picture. Without any scrollbars. I thought: what if it's clipping, because the picture simply won't fit in the viewbox, and "overflow: hidden"?

So I set "overflow:auto" in the CSS-class for the picture, expecting scrollbars to appear. They don't. The picture's now visible completely, as if it's been put onto a new page, but the caption still appears on the next page.

So, a lot better, but still not quite what I wanted. I think I'm going to post this in an ADE forum.
What version of ADE are you using? If it's old enough, vh will not work.
JSWolf is online now   Reply With Quote
Old 07-17-2023, 03:29 AM   #10
z537815
Enthusiast
z537815 began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Aug 2019
Device: Lenovo TB-X704F
Adobe Digital Editions Version 4.5.11.187658.
z537815 is offline   Reply With Quote
Reply

Tags
<figcaption>, <figure>, ade


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prettify removes space between bold an italic inside figcaption repilo Sigil 7 05-11-2022 06:35 PM
Could someone help me figure this out? juniemarie Audiobook Hardware & Software 65 03-30-2016 07:29 PM
<figure> and <figcaption> refused by Sigil tosca30 Sigil 7 12-05-2014 04:27 AM
Can't figure it out. mwhiteway Introduce Yourself 9 09-02-2011 04:19 AM
Can't figure this out, HELP! chilady1 PDF 1 09-26-2010 12:13 AM


All times are GMT -4. The time now is 06:41 PM.


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