View Single Post
Old 06-25-2025, 03:55 PM   #42
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,858
Karma: 8821117
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Falkor View Post
Sorry, I don't have a Linux system to run Foliate on.
With a 100% height setting, things can become messy in calibre viewer. (see attachment).
You are doing something wrong. By writting "height: 100%" has no effect on children boxes (unless you also have "height: 100%" for <html> and <body> tags on ereaders based on Readium/Webkit. It has effect on ereaders based on RMSDK (ADE 2.x/3.x) but these last ones will ignore your "height: 80vh", so for that reason "height: 100%" works. But some ereaders based on Readium/Webkit won't use the full space you reserve for figure > svg (in your case "height: 80vh") unless you set "height: 100%" for figure. You must have something wrong with the width and height in your svg wrapper.

Quote:
The solution you linked places the caption on the picture in Thorium and Calibre viewer and may split the image in ADE and in Books.
What? I suppose you are working under epub3, otherwise <figure> is not honored under epub2 and you shouldn't employed it in ADE (in ADE 4.x, as epub3, it WORKS). In Thorium and Calibre Viewer my code looks great; here you have some screenshoots:

1. In Thorium (with a font-size of 100%):

Click image for larger version

Name:	One1.jpg
Views:	38
Size:	158.9 KB
ID:	216475 Click image for larger version

Name:	One2.jpg
Views:	45
Size:	76.4 KB
ID:	216476

2. In Thorium (with a font-size of 137.5%):

Click image for larger version

Name:	One3.jpg
Views:	39
Size:	134.5 KB
ID:	216477 Click image for larger version

Name:	One4.jpg
Views:	44
Size:	179.0 KB
ID:	216478

3. In Calibre Viewer (with a font-size of 14px):

Click image for larger version

Name:	One5.jpg
Views:	40
Size:	68.4 KB
ID:	216479 Click image for larger version

Name:	One6.jpg
Views:	39
Size:	31.6 KB
ID:	216480 Click image for larger version

Name:	One7.jpg
Views:	38
Size:	69.9 KB
ID:	216481

4. In Calibre Viewer (with a font-size of 18px):

Click image for larger version

Name:	One8.jpg
Views:	43
Size:	60.6 KB
ID:	216482 Click image for larger version

Name:	One9.jpg
Views:	44
Size:	59.7 KB
ID:	216483 Click image for larger version

Name:	One10.jpg
Views:	34
Size:	31.7 KB
ID:	216484 Click image for larger version

Name:	One11.jpg
Views:	46
Size:	59.7 KB
ID:	216485

I attach the respective epub so you can test it in your system. Open it in Calibre Viewer and start with a font-size: 14px; then increase the font-size to 28px. As you will be able to see, the caption remains with the picture and there is no fragmentation in the text (there is no blank space generated by the image and the change of the font-size). You must be doing something wrong, otherwise you would have the same output than me.

Quote:
Removing the div and setting the height for the SVG works better for me, but splits can still happen.
As I stated before, you have something wrong. Post your code here and I will be able to help you better.
Attached Files
File Type: epub Image_and_Caption.epub (297.3 KB, 43 views)
RbnJrg is online now   Reply With Quote