Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 01-08-2020, 04:02 PM   #1
gluejar
Ungluer-in-Chief
gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.
 
gluejar's Avatar
 
Posts: 25
Karma: 361288
Join Date: Dec 2013
Location: Montclair, New Jersey
Device: all (Marvin)
any reason to avoid px measurements in epub?

I'm working on some legacy html -> epub conversion software for Project Gutenberg.

It removes css rules that use px measurements. I have no idea why. Are there obscure or legacy epub readers that don't support px in css?

Eric
gluejar is offline   Reply With Quote
Old 01-08-2020, 05:49 PM   #2
phillipgessert
Addict
phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.phillipgessert ought to be getting tired of karma fortunes by now.
 
phillipgessert's Avatar
 
Posts: 316
Karma: 3196766
Join Date: Oct 2015
Location: Madison, WI
Device: Kindle 5th Gen
It's because px are a fixed unit and don't account for e.g. reader-side font resizing or the wide variety of resolutions on different devices. Pretty much the same reason px have fallen out of favor in web design.

Last edited by phillipgessert; 01-08-2020 at 05:53 PM.
phillipgessert is offline   Reply With Quote
Advert
Old 01-08-2020, 06:22 PM   #3
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: 79,745
Karma: 145864619
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 gluejar View Post
I'm working on some legacy html -> epub conversion software for Project Gutenberg.

It removes css rules that use px measurements. I have no idea why. Are there obscure or legacy epub readers that don't support px in css?

Eric
You don't need this legacy software. You can use Sigil or Calibre to turn this HTML into ePub.

Use em instead of px. For example, text-indent: 1.2em;
JSWolf is offline   Reply With Quote
Old 01-08-2020, 06:23 PM   #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,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
The only time I use px measurements are when I'm trying to limit the maximum size of an object. For example, an older book might have small images. I want the image to fill the screen as much as possible without getting over-stretched and blurry. In that case I would set the image width to be 85% of the screen, with a maximum width of the original image width.

Code:
ExampleImage.jpg = 500 x 800 pixels (w x h)

div {margin:2em auto; width:85%}
img {width:100%, max-width:500px}

<div><img alt="" src="../Images/ExampleImage.jpg" /></div>
Other than that, I would want to use measurements that keep everything relative to the user selected font/margin sizes - like 'em'.
Turtle91 is offline   Reply With Quote
Old 01-08-2020, 07:08 PM   #5
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
Hopefully that conversion software also removes or converts other fixed units like inches, cm, etc. for the reason phillipgessert gave.

When you say "working on" are you using the software to do conversions or are you updating/translating it? I've always been curious about what the workflow is that PG uses for making their ebooks.
hobnail is offline   Reply With Quote
Advert
Old 01-09-2020, 04:21 AM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by hobnail View Post
I've always been curious about what the workflow is that PG uses for making their ebooks.
Digital Proofreaders creates a lot of the Project Gutenburg books:

https://www.pgdp.net/c/

You can read about the process there. Also, their forums are a trove of book digitizing information too:

https://www.pgdp.net/phpBB3/
Tex2002ans is offline   Reply With Quote
Old 01-09-2020, 11:33 AM   #7
gluejar
Ungluer-in-Chief
gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.
 
gluejar's Avatar
 
Posts: 25
Karma: 361288
Join Date: Dec 2013
Location: Montclair, New Jersey
Device: all (Marvin)
Quote:
Originally Posted by phillipgessert View Post
It's because px are a fixed unit and don't account for e.g. reader-side font resizing or the wide variety of resolutions on different devices. Pretty much the same reason px have fallen out of favor in web design.
My understanding is that as of css3, 1 px == 0.75 pt. So the same would apply to using pt? what about table border widths? should they be fixed or should they scale along with font resizing?
gluejar is offline   Reply With Quote
Old 01-09-2020, 11:39 AM   #8
gluejar
Ungluer-in-Chief
gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.
 
gluejar's Avatar
 
Posts: 25
Karma: 361288
Join Date: Dec 2013
Location: Montclair, New Jersey
Device: all (Marvin)
Quote:
Originally Posted by Tex2002ans View Post
Digital Proofreaders creates a lot of the Project Gutenburg books:

https://www.pgdp.net/c/

You can read about the process there. Also, their forums are a trove of book digitizing information too:

https://www.pgdp.net/phpBB3/
It's the DP folks who want to keep the px in table border widths. The PG software "ebookmaker" takes DP books and makes epub.
gluejar is offline   Reply With Quote
Old 01-09-2020, 11:41 AM   #9
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,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by gluejar View Post
My understanding is that as of css3, 1 px == 0.75 pt. So the same would apply to using pt? what about table border widths? should they be fixed or should they scale along with font resizing?
Generally borders should stay as px. It would be out of the ordinary to you find some situation that requires border thickness to change.
Turtle91 is offline   Reply With Quote
Old 01-09-2020, 01:37 PM   #10
gluejar
Ungluer-in-Chief
gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.gluejar ought to be getting tired of karma fortunes by now.
 
gluejar's Avatar
 
Posts: 25
Karma: 361288
Join Date: Dec 2013
Location: Montclair, New Jersey
Device: all (Marvin)
Quote:
Originally Posted by Turtle91 View Post
Generally borders should stay as px. It would be out of the ordinary to you find some situation that requires border thickness to change.
Thanks what I was thinking. Thanks!
gluejar is offline   Reply With Quote
Old 01-09-2020, 03:30 PM   #11
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: 79,745
Karma: 145864619
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 Turtle91 View Post
Generally borders should stay as px. It would be out of the ordinary to you find some situation that requires border thickness to change.
But, there is going to be a difference in border thickness when using a Reader witha n 800x600 screen vs a current 300DPI screen when using px. SO is px good to use in that case where you do not know what sort of Reader it may be read with?
JSWolf is offline   Reply With Quote
Old 01-09-2020, 03:48 PM   #12
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,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
But, there is going to be a difference in border thickness when using a Reader witha n 800x600 screen vs a current 300DPI screen when using px. SO is px good to use in that case where you do not know what sort of Reader it may be read with?
Can you render a border with 1/2 a pixel?

Per W3Schools:
Quote:
The width can be set as a specific size (in px, pt, cm, em, etc) or by using one of the three pre-defined values: thin, medium, or thick.
If you really want to use EM to define a border width, Jon, then you are certainly welcome to. I won't. It would take a great deal of fine-tuning to make it look decent. For the OP's consideration about automated software conversion - I would definitely not recommend it.

Last edited by Turtle91; 01-09-2020 at 03:55 PM.
Turtle91 is offline   Reply With Quote
Old 01-09-2020, 04:01 PM   #13
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: 79,745
Karma: 145864619
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 Turtle91 View Post
Can you render a border with 1/2 a pixel?

Per W3Schools:


If you really want to use EM to define a border width, Jon, then you are certainly welcome to. I won't.
So how would you get a border to be the same width on a Sony Reader and a Kobo Clara HD?
JSWolf is offline   Reply With Quote
Old 01-09-2020, 04:08 PM   #14
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by JSWolf View Post
So how would you get a border to be the same width on a Sony Reader and a Kobo Clara HD?
Let's turn the question around; how would you do it using ems or percentages or whatever? I'm not averse to using ems or whatever for horizontal rules and black borders on tables and whatnot but I've never tried it and it seems like it would be tricky.
hobnail is offline   Reply With Quote
Old 01-09-2020, 04:34 PM   #15
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by Tex2002ans View Post
Digital Proofreaders creates a lot of the Project Gutenburg books:

https://www.pgdp.net/c/

You can read about the process there. Also, their forums are a trove of book digitizing information too:

https://www.pgdp.net/phpBB3/
Thanks. I'm not sure how I missed the formatting links on their pages given that I was looking there yesterday or the day before.
hobnail is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Avoid epub split in several html files? mastroalex Calibre 18 12-03-2011 03:50 PM
Empty lines in epub without apparent reason sinusLog Conversion 6 09-30-2011 01:19 AM
Screen measurements? cBird enTourage Archive 3 04-18-2011 09:57 PM
measurements Please artemisblossom Sony Reader 3 05-18-2009 11:55 PM
I need measurements Kirari Sony Reader 7 05-11-2009 09:14 PM


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


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