Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 07-15-2020, 09:31 PM   #301
TheGene
Junior Member
TheGene began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2020
Device: desktop
Hi Kovid could you tell me where/how do I change the CALIBRE_USE_DARK_PALETTE variable using Linux Mint 19.3? That bright white is really quite overwhelming after a few hours of working in Calibre ...
TheGene is offline   Reply With Quote
Old 07-15-2020, 10:00 PM   #302
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,384
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just google how to set environment variables in mint. And if you are talking about th eviewer specifically you can choose a different color scheme for it in its preferences, no need to set an environment variable at all.
kovidgoyal is offline   Reply With Quote
Advert
Old 07-15-2020, 10:11 PM   #303
TheGene
Junior Member
TheGene began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2020
Device: desktop
Ha that was as simple as opening a terminal and typing

env CALIBRE_USE_DARK_PALETTE=1 calibre

and voila!! Yes definitely much easier on the eyes ...

Thank you for this awesome program.
TheGene is offline   Reply With Quote
Old 07-15-2020, 10:20 PM   #304
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 761
Karma: 308700
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by TheGene View Post
Hi Kovid could you tell me where/how do I change the CALIBRE_USE_DARK_PALETTE variable using Linux Mint 19.3? That bright white is really quite overwhelming after a few hours of working in Calibre ...
1-From the main menu we right-click where Caliber is and set it on the desktop.
2-We create something as a shortcut and in that icon right click of the mouse preferences.
3-In the Order line we write: env CALIBRE_USE_DARK_PALETTE=1 caliber
We double click on this icon and if we have a black theme in the system it will put us in dark mode
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	437
Size:	74.5 KB
ID:	180651   Click image for larger version

Name:	2.jpg
Views:	378
Size:	67.2 KB
ID:	180652   Click image for larger version

Name:	3.jpg
Views:	442
Size:	73.6 KB
ID:	180653  

Last edited by dunhill; 07-15-2020 at 10:23 PM.
dunhill is offline   Reply With Quote
Old 11-02-2020, 06:50 PM   #305
Uncle Robin
Diligent dilettante
Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.Uncle Robin ought to be getting tired of karma fortunes by now.
 
Uncle Robin's Avatar
 
Posts: 3,441
Karma: 49052774
Join Date: Sep 2019
Location: in my mind
Device: Kobo Sage; Kobo Libra H2O
I know basically nothing about CSS etc, but want to change the line spacing used in my Calibre Viewer. I tried copying and pasting one of the templates at the start of this thread
Quote:
body {
color: rgb(255,255,255);
background-color:rgb(0,0,255);
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
margin-right:50px;
margin-left:50px;
text-indent:2em;
}
h1, h2, h3, h4, h5, h6 {
color:white;
text-align:center;
font-style:italic;
font-weight:bold;
}
but applying it makes no difference to the line spacing. I have experimented with different values for 'line-spacing' but so far 1.7, 2.7 and 3.8 all make exactly no difference to how the lines appear on my viewer. What am I doing wrong?

EDIT
The dangers of unquestioning C&P - it was "line-height", not "line-spacing". Lesson learned!

Last edited by Uncle Robin; 11-02-2020 at 06:57 PM.
Uncle Robin is offline   Reply With Quote
Advert
Old 12-14-2020, 03:54 PM   #306
drglenn
Junior Member
drglenn began at the beginning.
 
drglenn's Avatar
 
Posts: 4
Karma: 10
Join Date: Dec 2020
Location: South Carolina, USA
Device: none
In the example you posted:

Quote:
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
You must include a space after the : in the css attributes in order to display properly. When values are entered incorrect as in the above from the css code you posted they are ignored as you are experiencing

For example:

Wrong usage line-spacing: 1.8;

Correct usage line-spacing: 1.8;
drglenn is offline   Reply With Quote
Old 02-04-2021, 08:37 AM   #307
Marius1952
Junior Member
Marius1952 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2021
Device: KOBO GLO HD
Proper and universal CSS code for Calibre

When converting from PDF to EPUB the book comes fine except the contents which is spread along the many pages. How can I fix it?
My current code is as below:

body {
color: rgb(0,0,0);
background-color:rgb(255,255,255);
text-align:justify;
line-spacing:1.8;
margin-top:0px;
margin-bottom:4px;
margin-right:50px;
margin-left:50px;
text-indent:2em;
}
h1, h2, h3, h4, h5, h6 {
color:white;
text-align:center;
font-style:italic;
font-weight:bold;
}

Under Filter Style Information I have selected all options except Floats and I also added to Other CSS Properties: line-height

can you help me to have a perfect CSS coding so every converted book will come up well? I don't know programming so I rely on brains like you guys but I need common instruction to understand. The best would be copy/paste what is necessary.
thanks
namaste
Mariusz
Marius1952 is offline   Reply With Quote
Old 02-10-2021, 04:38 AM   #308
Drongo
Junior Member
Drongo began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2020
Device: Kindle Paperwhite
I'm trying this with Calibre 4.99.12 - some epub wants to have justified text, urgh - and it's doing the line-height attribute (there just as a test to see what's happening) but not the text-align:

body, h1, h2, h3, h4, h5, h6 {
text-align: left;
line-height: 200%;
}

Any ideas?
Drongo is offline   Reply With Quote
Old 02-10-2021, 04:00 PM   #309
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,947
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Moderator Notice

FYI: I merged two threads with similar names and purpose.

BR
BetterRed is offline   Reply With Quote
Old 03-16-2021, 07:24 AM   #310
Edemen
Enthusiast
Edemen began at the beginning.
 
Posts: 34
Karma: 12
Join Date: Jan 2018
Device: Kobo Clara BW, PW5, Pocketbook HD3
I am using the Pocketbook Inkpad 3 Pro. The native reading program does not allow widows and orphans. So the number of lines on a page is not always equal which annoys me
What CSS used in Caliber will make widows and orphans appear?
Edemen is offline   Reply With Quote
Old 03-18-2021, 06:07 PM   #311
ps67
Guru
ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.ps67 ought to be getting tired of karma fortunes by now.
 
Posts: 738
Karma: 7025494
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Inkpad 4, Inkpad Color
Quote:
Originally Posted by Edemen View Post
I am using the Pocketbook Inkpad 3 Pro. The native reading program does not allow widows and orphans. So the number of lines on a page is not always equal which annoys me
What CSS used in Caliber will make widows and orphans appear?
This is not a issue of calibre viewer but anyway You can change the css in the calibre editor like this:

Code:
p{
widows: 1 !important;
orphans: 1 !important;
}
using !important You can overwrite eventual different widows/orphans values in the various p.something tag.
ps67 is offline   Reply With Quote
Old 03-19-2021, 09:01 AM   #312
Edemen
Enthusiast
Edemen began at the beginning.
 
Posts: 34
Karma: 12
Join Date: Jan 2018
Device: Kobo Clara BW, PW5, Pocketbook HD3
It works! Thank you.
Edemen is offline   Reply With Quote
Old 04-10-2021, 10:49 AM   #313
CrazyBlend
Junior Member
CrazyBlend began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2021
Device: Calibre
Left justification not working in Calibre

I have the latest version of Calibre (I think), 5.14. Whenever I open an epub file in the e-book viewer, I want the text to be left-justified rather than the default fully-justified.

I don't know anything about css styles, but, after browsing this thread, I entered the following text into the Preferences -> Styles text box, and clicked OK:

body { text-align: left; }

However, unfortunately, that had no effect. All my epub books are still displaying fully justified.

What am I doing wrong? Thanks for any help.
CrazyBlend is offline   Reply With Quote
Old 04-10-2021, 12:52 PM   #314
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,384
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Code:
* { text-align: left !important }
kovidgoyal is offline   Reply With Quote
Old 04-10-2021, 03:06 PM   #315
CrazyBlend
Junior Member
CrazyBlend began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2021
Device: Calibre
Thanks for the quick response! However, unfortunately, that still didn't work. I tried the version you sent:
body { text-align: left !important }
I also tried it with a semicolon:
body { text-align: left !important; }
Neither had any effect.
CrazyBlend is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom CSS for output deckoff Calibre 1 08-28-2010 11:55 PM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-09-2010 11:34 PM
User stylesheets for ePub files salty-horse Sony Reader Dev Corner 12 02-23-2010 07:44 AM
ePub conversion: override existing css with a custom one sbin Calibre 1 01-09-2010 04:03 AM
Calibre's generated css for epub brewt Calibre 7 12-29-2008 09:59 AM


All times are GMT -4. The time now is 11:10 PM.


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