Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-05-2021, 04:46 PM   #1
DyckBook
Morlock
DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.DyckBook ought to be getting tired of karma fortunes by now.
 
DyckBook's Avatar
 
Posts: 33
Karma: 2734796
Join Date: Oct 2021
Device: Kindle Paperwhite
Is @page needed in an ebook?

Many of my ebooks have a page_styles.css with just the following:
Code:
@page {
  margin-bottom: 5pt;
  margin-top: 5pt;
}
A Google search reveals "The @page CSS at-rule is used to modify some CSS properties when printing a document."

So...if I want to read the book on my Kindle not print it do I even need the CSS file?

The reason I ask is that using Modify ePub I can add styles I want, BUT they are added to every CSS file. So I end up with a page_styles.css with all of the styles that I wanted added to the stylesheet.css as well. Safely deleting the page_styles.css file would solve that bloat!

The next question, of course, is, is there a plugin that would allow me to delete a specific file from a set of books?
DyckBook is offline   Reply With Quote
Old 11-05-2021, 04:55 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,401
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by DyckBook View Post
Many of my ebooks have a page_styles.css with just the following:
Code:
@page {
  margin-bottom: 5pt;
  margin-top: 5pt;
}
A Google search reveals "The @page CSS at-rule is used to modify some CSS properties when printing a document."

So...if I want to read the book on my Kindle not print it do I even need the CSS file?
You actually don't need that rule. I tend to remove it from any books I find page-styles.css in, most of which are calibre conversions.

Quote:
Originally Posted by DyckBook View Post
The reason I ask is that using Modify ePub I can add styles I want, BUT they are added to every CSS file. So I end up with a page_styles.css with all of the styles that I wanted added to the stylesheet.css as well. Safely deleting the page_styles.css file would solve that bloat!
The only caution is that calibre conversions tend to put any font-face declarations for embedded fonts into page-styles.css.

Quote:
Originally Posted by DyckBook View Post
The next question, of course, is, is there a plugin that would allow me to delete a specific file from a set of books?
I'd suggest using either calibre's editor or Sigil instead of a plugin. Most of my cleanup tends towards setting the body and two paragraph directives one with and one without indentation.
DNSB is offline   Reply With Quote
Old 11-05-2021, 08:24 PM   #3
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,552
Karma: 14325282
Join Date: Nov 2019
Device: none
If the margin-bottom and margin-top are set to zero, which is what I get with the settings I'm using when calibre converts a kindle book to epub, I leave it. Non-zero and it gets deleted which, as far as I can tell is the same as setting them to zero.
hobnail is offline   Reply With Quote
Old 11-05-2021, 08:28 PM   #4
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,552
Karma: 14325282
Join Date: Nov 2019
Device: none
You can also use calibre to convert a kindle book to the same format, and with whatever conversion settings you've set up it will give you a more convenient/normalized starting point when you then edit in calibre's editor. The original kindle book is retained, but I'm guessing you will need to back it up before you do another conversion on the same book.
hobnail is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Ebook Viewer Same Page on Right and Left Column in Two Page View Ashuk Library Management 4 04-20-2019 12:44 AM
Advice needed on full-page images and auto-rotating readers doubleshuffle Workshop 12 10-26-2017 12:39 PM
Advice/Help needed on Cover Image and First Page when converting files on Calibre abzde Calibre 4 09-17-2013 09:39 PM
eBook Survey - Help Needed sliiiick12 General Discussions 24 11-30-2012 04:28 PM
DR800 Page rotate and some other needed features penartur iRex 3 09-10-2010 05:30 AM


All times are GMT -4. The time now is 12:14 PM.


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