Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2012, 06:09 AM   #151
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 629
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Ms_ts_2007,

I believe just the following should do what you want:

body {
background:#F9F0C9 url('file:///C:/Program Files (x86)/Calibre2/resources/images/old_paper.jpg');
}

If the book you load includes it's own background color (the #F.. portion) and image (the url portion) it might override the info above. Adding " !important" (including space but without quotes) after the closing parenthesis and before the semi-colon might correct this issue. (I've never used an image. It will definitely override the color.)


CSS, kind of like missing ebook metadata, doesn't complain if various bits and pieces are not present. CSS just assumes that the defaults apply and only the mentioned bits are being changed.

The body section affects the page itself; the p is for defining paragraphs, the h1-p6 are various heading definitions. The selection... is beyond my knowledge.

Last edited by Sabardeyn; 12-30-2012 at 06:15 AM.
Sabardeyn is offline   Reply With Quote
Old 12-30-2012, 11:05 AM   #152
theducks
Grand Sorcerer
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: 14,478
Karma: 5567061
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Sabardeyn View Post
Ms_ts_2007,

I believe just the following should do what you want:

body {
background:#F9F0C9 url('file:///C:/Program Files (x86)/Calibre2/resources/images/old_paper.jpg');
}

That path is to the Calibre install folder (which varies by OS) (as do the direction of the \'s )

It would be better to place a COPY of that file into the resources\images of the configuration folder

BTW 'old_paper.jpg' does not exist in my (default, calibre) install

Last edited by theducks; 12-30-2012 at 11:06 AM. Reason: configuration folder
theducks is online now   Reply With Quote
 
Enthusiast
Old 12-30-2012, 07:03 PM   #153
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 629
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Thanks for the clarification, I'm sure it will be of help to users of other OSes.

The info posted was from Cyberxaos' post originally. I just excised the applicable example and did the "CSS to English" translation.

The original post has a link that includes the image, I think. Never used pastebin so I'm not sure how they've implemented things - it appears to be a hex dump of an image file.
Sabardeyn is offline   Reply With Quote
Old 01-05-2013, 10:57 AM   #154
maisondouf
Junior Member
maisondouf began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Sony
Quote:
Originally Posted by DoctorOhh View Post
Toggle the scroll icon to enter Paged mode. Now you will get a top and bottom margin that you can easily control via viewer preferences.
Ok, but in eBook viewer's prefrences, I don't find any option for that...

even so thanks for your answer.

EDIT: I would be better to apply 'user stylesheet' to a div cantaining all the page instead of body.
The scenario for displaying text would be the same, but we can apply a margin before displaying this div in the body.
But perhaps, it's not possible...

Last edited by maisondouf; 01-05-2013 at 11:20 AM.
maisondouf is offline   Reply With Quote
Old 01-05-2013, 11:58 AM   #155
maisondouf
Junior Member
maisondouf began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2012
Device: Sony
Youpi, I found a better solution...
Uninstall Ubuntu version (0.8.38) ande install last stable (0.9.13).
Now margin options are available.
maisondouf is offline   Reply With Quote
Old 01-06-2013, 02:04 AM   #156
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,809
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by maisondouf View Post
Youpi, I found a better solution...
Uninstall Ubuntu version (0.8.38) ande install last stable (0.9.13).
Now margin options are available.
Glad you figured it out. Not a better solution, the same solution. The reason you couldn't find the option is that it didn't exist until 0.8.61.

From What's New:

Quote:
Release: 0.8.61 [20 Jul, 2012]

New Features
  • E-book viewer: Add a paged mode that splits up the text into pages, like in a paper book instead of presenting it as a single column. To activate click the button with the yellow scroll icon in the top right corner.

    In paged mode, the ebook viewer no longer cuts off the last line of text at the bottom of the screen, and it respects CSS page-break directives. You can also set page margins and control the number of pages displayed on screen by clicking the Preferences button in the viewer and going to 'Text layout in paged mode'.
DoctorOhh is offline   Reply With Quote
Old 01-11-2013, 03:56 PM   #157
KeithJ108
Junior Member
KeithJ108 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jan 2013
Device: Kindle Keyboard
Background color ignored?

Hi,

I created a user CSS template from some of the examples here but it seems that the background color is ignored by the Calibre eBook viewer. I can change the color in the eBook viewer preferences window but not through the CSS style-sheet.

Is this a bug or is there something wrong with my code?
Calibre version 0.9.14 on Windows 8 64-bit.

Code:
h1, h2, h3, h4, h5, h6 {
	font-weight: bolder;
	text-transform: capitalize;
	color: rgb(0, 0, 0);
	text-align:center;

}
body {
	color: rgb(0, 0, 0);
	background-color: rgb(254, 243, 213);
	text-align: justify;
	line-spacing: 1.8;
	margin-top: 0px;
	margin-bottom: 4px;
	margin-right: 50px;
	margin-left: 50px;
	text-indent: 3em;
}
KeithJ108 is offline   Reply With Quote
Old 01-11-2013, 10:52 PM   #158
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: 25,753
Karma: 4998511
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to use !important to ensure you override whatever color is set in the books code.
kovidgoyal is online now   Reply With Quote
Old 01-17-2013, 04:10 PM   #159
orrajabi
Junior Member
orrajabi began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2013
Device: samsung GT-P5100
Dear all,
I am a new user and don't know much about CSS.
I am using Persian language. It is from right to left. How can I tell Calibre through CSS to change the text-direction to "right-to-left"?

Thanks in advance.
orrajabi is offline   Reply With Quote
Old 01-23-2013, 04:38 PM   #160
Vortex
Connoisseur
Vortex began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18 + uBook
I'm trying to use this background image how do I stop it from being tiled so it fits the Calibre reader? I'm attempting to create something similar to what I have set up in ubook.
Thanks.

Last edited by Vortex; 01-23-2013 at 04:46 PM.
Vortex is offline   Reply With Quote
Old 01-23-2013, 06:50 PM   #161
theducks
Grand Sorcerer
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: 14,478
Karma: 5567061
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Vortex View Post
I'm trying to use this background image how do I stop it from being tiled so it fits the Calibre reader? I'm attempting to create something similar to what I have set up in ubook.
Thanks.
I only know how to do it editing the stylesheet
Code:
background-repeat: no-repeat;
theducks is online now   Reply With Quote
Old 01-24-2013, 01:04 PM   #162
Vortex
Connoisseur
Vortex began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18 + uBook
Yeah, with the style sheet. This is what I have:

Quote:
body {
background-image:url("file:///C:/Program Files (x86)/Calibre2/resources/images/Back.jpg");
}
I tried your suggestion in various combinations with the above but all just made the background picture disappear.
Vortex is offline   Reply With Quote
Old 01-25-2013, 12:36 AM   #163
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 629
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Vortex,
Take a look at Message #147 by Cyberxaos. Based on that message, it appears that these are two separate commands that should be entered on different lines in the CSS. Hope this helps!


PS: I find the use of the Book's Spine quite an interesting affect.
Sabardeyn is offline   Reply With Quote
Old 01-25-2013, 01:50 PM   #164
Vortex
Connoisseur
Vortex began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18 + uBook
Thanks Sabardeyn, That's it. Now looks like this, (is there any way to turn off the slidey thing on the right?)



Quote:
Sabardeyn; PS: I find the use of the Book's Spine quite an interesting affect.
You mean in this picture? Yes, it works well on a reasonable size screen. It was originally a lot narrower which made the buttons difficult to click on an old touch screen, so I played with the ubook software code until I figured out how to make it wider. I'm really pleased with how it came out just wish I could get Calibre to output to it automatically, I tried the 'open with' plugin but it outputs .HTMLZ which ubook cant open without renaming the file to .ZIP - maybe there's a plugin that'll do that...


Last edited by Vortex; 01-25-2013 at 03:26 PM.
Vortex is offline   Reply With Quote
Old 01-25-2013, 02:35 PM   #165
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 629
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
Sorry, I'm not aware of a way to turn off the slider on the right. It may be possible, but if it is, the next avalible calibre guru will have to chime in.
Sabardeyn is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:59 PM.


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