| 
			
			 | 
		#301 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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 ...
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#302 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				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.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#303 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#304 | |
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 922 
				Karma: 810834 
				Join Date: Sep 2017 
				Location: Buenos Aires, Argentina 
				
				
				Device: moon+ reader, kindle paperwhite 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 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 Last edited by dunhill; 07-15-2020 at 11:23 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#305 | |
| 
			
			
			
			 Diligent dilettante 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,662 
				Karma: 52758936 
				Join Date: Sep 2019 
				Location: in my mind 
				
				
				Device: Kobo Sage; Kobo Libra Colour 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			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: 
	
 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 07:57 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#306 | |
| 
			
			
			
			 Junior Member 
			
			![]() Posts: 4 
				Karma: 10 
				Join Date: Dec 2020 
				Location: South Carolina, USA 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			In the example you posted: 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Quote: 
	
 For example: Wrong usage line-spacing: 1.8; Correct usage line-spacing: 1.8;  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#307 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#308 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#309 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				Join Date: Mar 2012 
				Location: Sydney Australia 
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Moderator Notice 
		FYI: I merged two threads with similar names and purpose. BR  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#310 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 48 
				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?  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#311 | |
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 761 
				Karma: 7025686 
				Join Date: Aug 2017 
				Location: Italy 
				
				
				Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Inkpad 4, Inkpad Color 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	p{
widows: 1 !important;
orphans: 1 !important;
}
 | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#312 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 48 
				Karma: 12 
				Join Date: Jan 2018 
				
				
				
				Device: Kobo Clara BW, PW5, Pocketbook HD3 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			It works! Thank you.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#313 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#314 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 Code: 
	* { text-align: left !important }
 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#315 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Custom CSS for output | deckoff | Calibre | 1 | 08-29-2010 12:55 AM | 
| ePub with custom .css on a 505 | dicknskip | Sony Reader Dev Corner | 3 | 06-10-2010 12:34 AM | 
| User stylesheets for ePub files | salty-horse | Sony Reader Dev Corner | 12 | 02-23-2010 08:44 AM | 
| ePub conversion: override existing css with a custom one | sbin | Calibre | 1 | 01-09-2010 05:03 AM | 
| Calibre's generated css for epub | brewt | Calibre | 7 | 12-29-2008 10:59 AM |