Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-10-2019, 09:37 PM   #16
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 450
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Kobo Forma
Quote:
Originally Posted by GarryB123 View Post
I'm learning so, and it makes sense. I need to leave the bulk of the CSS as is and only change enough to make it look as I want.
I spent a long time modifying CSS, using whatever was there, just changing the odd margin or font size, etc. One day I realized I was doing the same thing over and over, so I copied CSS entries I liked into a text file...basically my very own off-line CSS file. Now I can just copy and past from that into any book to get some style I like...just replace the contents of a paragraph style, for example, and it's instantly the way you want it. Just a suggestion to make work easier!
retiredbiker is offline   Reply With Quote
Old 11-11-2019, 01:52 AM   #17
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
The way to fix the line-height is to open the book in the Editor, double-click on the stylesheet.css file (at the left below the *.html files), and then change the lines that start with line-height to 1.2 (1.2em will work, too, but you only need 1.2).

If you don't like the font that's in the body text, find the class used for the body. Open one of the *.html files and look at the "body" line for the class (near the top of the file). Then find that class in the *.css file and remove any font-family line.

You can find lots of pages on the web that will teach you about CSS codes, if you ever decide to learn the basics.
deback is offline   Reply With Quote
Old 11-11-2019, 02:07 AM   #18
deback
Book E d i t o r
deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.deback ought to be getting tired of karma fortunes by now.
 
Posts: 432
Karma: 288184
Join Date: May 2015
Device: Laptop
Quote:
Originally Posted by retiredbiker View Post
I spent a long time modifying CSS, using whatever was there, just changing the odd margin or font size, etc. One day I realized I was doing the same thing over and over, so I copied CSS entries I liked into a text file...basically my very own off-line CSS file. Now I can just copy and past from that into any book to get some style I like...just replace the contents of a paragraph style, for example, and it's instantly the way you want it. Just a suggestion to make work easier!
I did the same thing and have a css.txt file with many classes that I copy into the current *.css file (when I'm editing and reformatting books), and then I go through and find/replace the current classes in the book with the names I've assigned to those corresponding classes. I also have a lot of macros set up to do various things. For example, to change only the paragraph class when it has top and bottom margins of 1em (or some other number), I highlight the lines below "display: block" in the CSS file for the body text class, and then hit CTRL-SHIFT-7. Like this:

margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; text-align: justify; text-indent: 1.2em;

Then I hit the Beautify button to sort the lines in the *.css file.

I do a lot of other things when converting files to make changes automatically, but that's way too involved for this discussion (extra CSS, transform, remove all fonts and add my favorite font, etc).

You could also install the Modify ePub plugin that will do several things for you automatically, including removing all fonts, without running the Convert module.

Last edited by deback; 11-11-2019 at 01:08 PM.
deback is offline   Reply With Quote
Old 11-11-2019, 11:57 AM   #19
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by GarryB123 View Post
I'm learning so, and it makes sense. I need to leave the bulk of the CSS as is and only change enough to make it look as I want.
I love the 'Goto Link or Style" feature in Sigil.
Find the paragraph (you can use the Preview pane ), then in code view right click:Goto...
That finds the first occurrence (yes, there can be more. once you learn CSS, you will determine that was not the one. Remember the first C is Cascade. later entries just modify)
Now you should be able to see the code for the paragraph.
Caution, if you do the right-click inside a styled Span, that is where it could go
theducks is offline   Reply With Quote
Old 11-11-2019, 02:47 PM   #20
GarryB123
Enthusiast
GarryB123 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
Quote:
Originally Posted by ps67 View Post
I can assure that it is not so difficult to learn a bit of css/html so You can edit Your books in the way You like. I bought my Kindle when I was 50 years old and I knew nothing about css/html, now I am able to do some basic changes in my books, so seldom I am unsatisfied with them.

And preferences in book formatting are pretty individual: this is the reason way in this forum there are some people (like me) the reformat the books they buy.
I'm ashamed to admit that in a past life I was a web developer and did a lot of work with CSS. I was away from it for a long time and laziness or something prevented me from learning how e-books are structured and how calibre can alter the files. I'm catching on to using calibre to alter styles finally.

And I'm like you. I want at least the same font and line spacing for all my books.
GarryB123 is offline   Reply With Quote
Old 11-11-2019, 02:55 PM   #21
GarryB123
Enthusiast
GarryB123 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
Quote:
Originally Posted by JSWolf View Post
Garry if you attach an ePub to a post in this thread that you would like to have modified to look better, I'll do it for you. Then you can take the original and the one I modified and using the Calibre editor, you can do a compare and see what sort of changes I made. That's one way to start learning HTML/CSS.
Thank you for your offer! I think I have found out how to acheive the look I want. So far it's working and I have been able to make all books look like I wish.
GarryB123 is offline   Reply With Quote
Old 11-11-2019, 03:05 PM   #22
GarryB123
Enthusiast
GarryB123 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
Quote:
Originally Posted by retiredbiker View Post
I spent a long time modifying CSS, using whatever was there, just changing the odd margin or font size, etc. One day I realized I was doing the same thing over and over, so I copied CSS entries I liked into a text file...basically my very own off-line CSS file. Now I can just copy and past from that into any book to get some style I like...just replace the contents of a paragraph style, for example, and it's instantly the way you want it. Just a suggestion to make work easier!
Thank you! Do you put your edits in Convert Books > Look and Feel > Transform Styles?
GarryB123 is offline   Reply With Quote
Old 11-11-2019, 03:10 PM   #23
GarryB123
Enthusiast
GarryB123 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
Quote:
Originally Posted by deback View Post
The way to fix the line-height is to open the book in the Editor, double-click on the stylesheet.css file (at the left below the *.html files), and then change the lines that start with line-height to 1.2 (1.2em will work, too, but you only need 1.2).

If you don't like the font that's in the body text, find the class used for the body. Open one of the *.html files and look at the "body" line for the class (near the top of the file). Then find that class in the *.css file and remove any font-family line.

You can find lots of pages on the web that will teach you about CSS codes, if you ever decide to learn the basics.
Thank you! I'm finding I like the font set to 1em and line spacing to 1.2em. If I remove the font family definition between the '" so that there is nothing between them, will calibre use the font I've chosen in convert books?
GarryB123 is offline   Reply With Quote
Old 11-11-2019, 03:48 PM   #24
GarryB123
Enthusiast
GarryB123 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
Quote:
Originally Posted by deback View Post
I did the same thing and have a css.txt file with many classes that I copy into the current *.css file (when I'm editing and reformatting books), and then I go through and find/replace the current classes in the book with the names I've assigned to those corresponding classes. I also have a lot of macros set up to do various things. For example, to change only the paragraph class when it has top and bottom margins of 1em (or some other number), I highlight the lines below "display: block" in the CSS file for the body text class, and then hit CTRL-SHIFT-7. Like this:

margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; text-align: justify; text-indent: 1.2em;

Then I hit the Beautify button to sort the lines in the *.css file.

I do a lot of other things when converting files to make changes automatically, but that's way too involved for this discussion (extra CSS, transform, remove all fonts and add my favorite font, etc).

You could also install the Modify ePub plugin that will do several things for you automatically, including removing all fonts, without running the Convert module.
This is awesome and some is a little beyond me currently (the plugin). Knowing myself I will dig only as deep into this as achieves the look I'm after. But maybe my goals will change as I learn.
GarryB123 is offline   Reply With Quote
Old 11-11-2019, 03:53 PM   #25
GarryB123
Enthusiast
GarryB123 began at the beginning.
 
Posts: 46
Karma: 10
Join Date: Feb 2017
Device: Kindle Paperwhite
Quote:
Originally Posted by theducks View Post
I love the 'Goto Link or Style" feature in Sigil.
Find the paragraph (you can use the Preview pane ), then in code view right click:Goto...
That finds the first occurrence (yes, there can be more. once you learn CSS, you will determine that was not the one. Remember the first C is Cascade. later entries just modify)
Now you should be able to see the code for the paragraph.
Caution, if you do the right-click inside a styled Span, that is where it could go
Sigil looks very powerful. Thanks for directing me to it! I'll give it a try soon.
GarryB123 is offline   Reply With Quote
Old 11-11-2019, 05:53 PM   #26
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,062
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by GarryB123 View Post
Sigil looks very powerful. Thanks for directing me to it! I'll give it a try soon.
Both editors have their power. I use both (I started with Sigil). I LOVE they have differences. I use them both because of what they do DIFFERENTLY.
theducks is offline   Reply With Quote
Old 11-11-2019, 06:14 PM   #27
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: 46,243
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by theducks View Post
Both editors have their power. I use both (I started with Sigil). I LOVE they have differences. I use them both because of what they do DIFFERENTLY.
^^^ As theducks said, the differences are what make me use both editors.
DNSB is offline   Reply With Quote
Old 11-11-2019, 07:12 PM   #28
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,211
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by theducks View Post
...then in code view right click:Goto...
You can go directly to the corresponding style by holding CTRL and clicking the class name.

On calibre Editor, you can go to the style using the Live CSS pane. Also, using CTRL+CLICK will open any file referenced in the code window: images, css, html, etc.
thiago.eec is offline   Reply With Quote
Old 11-11-2019, 07:49 PM   #29
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,758
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 retiredbiker View Post
I spent a long time modifying CSS, using whatever was there, just changing the odd margin or font size, etc. One day I realized I was doing the same thing over and over, so I copied CSS entries I liked into a text file...basically my very own off-line CSS file. Now I can just copy and past from that into any book to get some style I like...just replace the contents of a paragraph style, for example, and it's instantly the way you want it. Just a suggestion to make work easier!
Sorry, but that doesn't work all the time. It's nt as easy as you think.

Take an eBook not made with InDesign and edit the CSS. Now that your CSS and apply it to an eBook made with InDesign and you've totally screwed it up.

So please don't say you can take a custom CSS and apply it to every book because you can't. It's WRONG and it doesn't work.

When you get used to editing CSS in eBooks, most of the time it's rather easy to do.
JSWolf is offline   Reply With Quote
Old 11-11-2019, 07:57 PM   #30
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,758
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 deback View Post
The way to fix the line-height is to open the book in the Editor, double-click on the stylesheet.css file (at the left below the *.html files), and then change the lines that start with line-height to 1.2 (1.2em will work, too, but you only need 1.2).
This is just wrong. To fix the line-height is to remove it. There should be no line-height unless it;s an ePub anf you need a line-height of 0 for those pesky large first letters of a chapter/section break. Kindles don't respect line heights less then 1.2em and on Kobo Readers, you can set the line height so you don't want any so you can set what the reader wants for a line height.

Quote:
If you don't like the font that's in the body text, find the class used for the body. Open one of the *.html files and look at the "body" line for the class (near the top of the file). Then find that class in the *.css file and remove any font-family line.
It's not always that simple especially with embedded fonts. You have to remove the @font and then font the font-family lines in the classes as they are mostly not just in the body.

Quote:
You can find lots of pages on the web that will teach you about CSS codes, if you ever decide to learn the basics.
Agreed with one note. Applying CSS to an eBook is not always the same as applying CSS tio a web page and you have to learn what works for an eBook and what just plain works. CSS for an eBook is a subset of the total CSS available.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does ebook-viewer (of calibre) render fonts msbm correctly and how? SuiVu1fa Calibre 4 11-28-2018 06:03 PM
Why publishers format ebooks differently than paper books? greenapple General Discussions 117 01-15-2014 07:48 AM
My ePubs render differently on Android, Apple and Aldiko Themus ePub 9 09-26-2012 01:41 AM
Which methods render and draw pages for viewer? foosion Development 1 10-29-2011 03:30 PM
Calibre E-Book Viewer and ADE render ePub TD font-size differently Agama Devices 5 06-17-2011 02:44 AM


All times are GMT -4. The time now is 06:56 AM.


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