Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 04-25-2021, 10:11 AM   #1
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
Preview by Page

Is is possible to set the preview window to treat the viewable area as its own page?

With the continuous scrolling, it seems to behave as though the file/chapter being viewed is a single page.

I have a situation where there is an image at the beginning of every chapter. I use SVG, and set the height of the image to 15%. This works as expected on the e-reader, but does not render the same in the Sigil preview window.
ChrisI is offline   Reply With Quote
Old 04-25-2021, 10:56 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
There is no fixed Preview size in Sigil and no fixed Page size. Preview is not an e-reader. Download and install a good thirdparty e-reader such as Thorium or any Readium variation and load it to see what an e-reader might show.

But be careful to try your epub in a number of e-readers as page sizes and paging can be handled quite differently.

Try setting a max-size on the css on the svg image

Or size it using 15vh (where 100vh is one window height).

Last edited by KevinH; 04-25-2021 at 11:02 AM.
KevinH is offline   Reply With Quote
Old 04-25-2021, 05:58 PM   #3
ChrisI
Connoisseur
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 55
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O, Libre 2
Using vh worked, thank you. Is vw window width?

I have been using Calibre to test view my books, but I will look into the other e-readers.

What I was trying to do with the Sigil preview was to size the window so that a page of text matched what I see on my Kobo.

Would it be possible for preview to treat the window size, whatever it is dragged to, to be the page size? What if, for example, it just interpreted height % as vh instead?

I understand that preview is not an e-reader. But it is nice to get the immediate feedback while editing. The closer it can mimic an e-reader, the more useful it is to me.
ChrisI is offline   Reply With Quote
Old 04-25-2021, 07:30 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes vw is a unit of 1/100th of the screen width. Chrome's browser engine (i.e. QtWebEngine/Preview) is a big supporter of using vh and vw with svg images over the older % format that Webkit used. Chrome's engine treats % much different from vh and vw units.

% according to css rules, is supposed to be relative to the parent element that contains it. In some cases that is a document height. The vw and vh are always relative to the viewport (screen size).


All browser based engines such as Calibre editor, Thorium, Readium, and etc should support the vh and vw. The old % for svg is just not used much given it is interpreted differently by different engines.

You should be able to detach Preview and make it be the size of a Kobo screen but I have no idea what built-in css for margins and spacing are, fonts used, etc for that e-reading device so it may take some changed css and trial and error.

I can not make Preview act more e-reader like as different e-readers with their different layout engines all react differently.

Trying to mimic one reader is pretty much worthless for epub developers who need their epubs to look good on a wide variety of devices.

Again, that is why testing on a large number of e-reading devices is so critical to find robust compromises.

KevinH


Quote:
Originally Posted by ChrisI View Post
Using vh worked, thank you. Is vw window width?

I have been using Calibre to test view my books, but I will look into the other e-readers.

What I was trying to do with the Sigil preview was to size the window so that a page of text matched what I see on my Kobo.

Would it be possible for preview to treat the window size, whatever it is dragged to, to be the page size? What if, for example, it just interpreted height % as vh instead?

I understand that preview is not an e-reader. But it is nice to get the immediate feedback while editing. The closer it can mimic an e-reader, the more useful it is to me.

Last edited by KevinH; 04-25-2021 at 07:37 PM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page preview on Kindle Oasis 2 superlu Devices 2 01-18-2019 04:41 PM
preview vs print preview isalherbo Sigil 7 04-23-2013 03:52 PM
How to preview first EPUB embedded image (not cover page!) Mdemaillard Library Management 7 01-14-2013 04:06 AM
Amazon Preview "page limit"? jayz Kindle Formats 0 10-06-2012 02:24 PM
small preview page images goodnerd Kindle Formats 5 09-22-2011 11:39 AM


All times are GMT -4. The time now is 01:33 AM.


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