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 01-26-2013, 06:13 PM   #166
Vortex
Connoisseur
Vortex began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Dec 2008
Device: Panasonic Toughbook CF18 + uBook
Found the tick box to turn off the scrollbar, under Fullscreen Options.

Is it possible to specify the font in the CSS stylesheet so it over rides what's embedded in the books?
Vortex is offline   Reply With Quote
Old 01-26-2013, 08:01 PM   #167
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,811
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Since the expansion of the viewer preferences many things that previously required style sheet changes can be changed in the preferences.

Quote:
Originally Posted by Vortex View Post
Is it possible to specify the font in the CSS stylesheet so it over rides what's embedded in the books?
When the viewer is open click on the viewer preferences icon in the toolbar and change the font to anything you want.
DoctorOhh is online now   Reply With Quote
Old 01-26-2013, 10:57 PM   #168
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,815
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by DoctorOhh View Post
When the viewer is open click on the viewer preferences icon in the toolbar and change the font to anything you want.
This will not override fonts specified in the book. For that you should do an conversion and use filter css to remove the fonts.
kovidgoyal is online now   Reply With Quote
Old 01-26-2013, 11:39 PM   #169
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,811
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by kovidgoyal View Post
This will not override fonts specified in the book. For that you should do an conversion and use filter css to remove the fonts.
Thanks for the clarification, when I tested I forgot I have already removed any fonts from 98% of my books.
DoctorOhh is online now   Reply With Quote
Old 01-30-2013, 12:58 PM   #170
dob
Junior Member
dob began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2013
Device: Kindle
Angry Background colour

I tried copying and pasting this code into the Calibre stylesheet and got a completely white page with no printing on it.
Whatever I try in background-color:rgb(0,0,0); doesn't change the background colour.
Changing the color changes the print color. What is going wrong?
I am a complete greenhorn with regard to this programming.
I am running Windows 7 on a Acer laptop. Please help.

Quote:
Originally Posted by ekaser View Post
You have an error in there. I was testing out a completely different color scheme (harking back to the "good old" MS-DOS days), when I used WHITE on BLUE background for my console (worked better then, with fixed pitch, large fonts :-). In your code above, you need to add a ':' after the body 'color' name. Without it, the body (text) color is ignored. It still works for what you want, because the default color is black. But it doesn't work if you try to set it to anything else. Not necessarily pleasing to use, but as another example, here's my "white on blue" style:

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;
}
dob is offline   Reply With Quote
Old 03-04-2013, 10:55 PM   #171
ghudod
Connoisseur
ghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toysghudod shares his or her toys
 
Posts: 56
Karma: 5502
Join Date: Oct 2012
Device: none
Is there any way I can set the margins in terms of percentage of the window? For example, I like to read with the viewer covering about half the screen while I do something else, and my margin settings of 400px reduces the text on every line to a single word! If instead I could set the margin as a percentage, it would be greatly helpful. Here's the code, taken from some other contributor in this thread:

Quote:
body {color:RGB(0,0,0) !important;
background-color:RGB(228,226,224) !important;
text-align:justify !important;
line-height:1.2 !important;
margin-top:0px !important;
margin-bottom:4px !important;
margin-right:400px !important;
margin-left:350px !important;
text-indent:5em !important;
background-image:url("http://img33.imageshack.us/img33/2545/calibrebackground.png") !important;
background-position:50% !important;}
p,div {margin-bottom:8px !important;margin-top:8px !important;}
blockquote {padding-right:35px !important;margin-bottom:8px !important;}
h1, h2, h3, h4, h5, h6
{color:black !important;
text-align:center !important;
font-style:italic !important;
font-weight:bold !important;}
I'm a noob to this and don't know any CSS. Please help to set the margin-left and margin-right values to percentages if possible!
ghudod is offline   Reply With Quote
Old 03-17-2013, 08:09 PM   #172
Brokkoli
Junior Member
Brokkoli began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2013
Device: calibre
Help!! Calibre overrides my CSS stylesheet


This is a line from my css, trying to make code look good:

Code:
.programlisting {
    font-family: "Anonymous Pro";
}
However, Calibri overrides it with its own stylesheet.css. I can right-click -> inspect element -> Computed Style --> Font-Family
And this is what is shows:

Code:
font-family: monospace;
.programlisting - monospace stylesheet.css:204
.programlisting - 'Anonymous Pro' user stylesheet
pre, xmp, plaintext, listing - monospace user agent stylesheet
body - georgia
So it tries to apply my setting but then overrides it with its own stylesheet!!?

Any help appreciated.
Brokkoli is offline   Reply With Quote
Old 03-18-2013, 01:57 AM   #173
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,815
Karma: 5006091
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's a stylesheet in your book, not one generated by calibre. You have to use !important to override the book's styles in your custom stylesheet or use filter css and do a conversion to remove the css from the book.
kovidgoyal is online now   Reply With Quote
Old 04-13-2013, 03:05 PM   #174
AnnieWalker
Junior Member
AnnieWalker began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2012
Device: Kindle Paperwhite Wi-Fi
Quote:
Originally Posted by sideburnt View Post
If you're interested in CSS Styling take a quick look at
http://epubzengarden.com/?style=trad.../chapter1.html

Its a very new site but could become fantastic with a bit of contribution.

Hard to navigate around and took me a while to find the css preview page, I have linked to my favorite page style used on this site.
The last style there, "wallpaper", is amazing. Could someone help me applying it to my calibre?
AnnieWalker is offline   Reply With Quote
Old 04-14-2013, 02:06 AM   #175
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,811
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by AnnieWalker View Post
The last style there, "wallpaper", is amazing. Could someone help me applying it to my calibre?
I can help you with the basics of that style. One caveat, these instruction are for a Windows based computer.

First you have to grab the background image from the web page (http://epubzengarden.com/images/bg1.jpg) and save it to your computer. Right click the link and select Save link as if using Firefox or Save target as if using Internet Explorer. Save this file in a location on your hard drive, it doesn't matter where but you will need to obtain the file path to this image.

1. Now open any book in calibre's viewer and then open preferences. Now go to he User style tab (see attached) and paste the following. Replace the green colored path below with your actual path on your machine to the image.

Code:
body { background-image:url("file:///C:/Dropbox/Calibre Portable/Calibre Settings/resources/images/bg1.jpg") !important;
 }
2. Now go to the General tab and click on Colors and backgrounds row then click on the Change button next to text color (see attached) and fill in the following values:

Red: 68
Green: 51
Blue: 0

Click OK Then click OK again. Your book in calibre viewer should have the same background and text color as the example you cited. If it doesn't then review the path you set in step 1 above, ensure all slashes are in the same direction as I indicated and that it does point to the file's exact location on your machine.

3. Now that the background and font color are set open preferences again and go to the Theming tab (see attached). Click the Save button and enter a title for this theme. Click OK then OK again. Now you have saved this theme and if you decide to experiment further you can always go back to this theme via the Load button.
Attached Thumbnails
Click image for larger version

Name:	user_style.jpg
Views:	171
Size:	70.6 KB
ID:	104339   Click image for larger version

Name:	colorsandbackgrounds.jpg
Views:	156
Size:	125.4 KB
ID:	104340   Click image for larger version

Name:	theme_tab.jpg
Views:	134
Size:	75.8 KB
ID:	104341  

Last edited by DoctorOhh; 04-14-2013 at 02:08 AM.
DoctorOhh is online now   Reply With Quote
Old 04-14-2013, 10:21 AM   #176
AnnieWalker
Junior Member
AnnieWalker began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2012
Device: Kindle Paperwhite Wi-Fi
Incredible. Thanks for making it so easy. I've applied them in 5secs...but it seems that I can't override text alignment setting of the file to justify even with "text-align:justify !important;" line. Do you have a solution for this, too?

I appreciate your help.


AnnieWalker is offline   Reply With Quote
Old 04-14-2013, 11:29 AM   #177
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,811
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by AnnieWalker View Post
Incredible. Thanks for making it so easy. I've applied them in 5secs...but it seems that I can't override text alignment setting of the file to justify even with "text-align:justify !important;" line. Do you have a solution for this, too?
No tricks for the viewer, maybe someone else can give it a try.

I prefer left justified for my 7 inch tablet, but I can see using full justification on a full monitor. I tried what you tried and it worked on one book of about 12 that I tried it on.

Personally since I prefer left justify I set this when I convert the book to my specs. There is a setting under the conversion options on the Look & Feel tab where you can set your alignment preference during conversion, see attached.

Alternatively instead of converting the book if it is epub I suppose you could:
  • Right click on the book.
  • Select the Tweak Book Option
  • Select Explode Book
  • Select stylesheet.css
  • Open it up in your favorite text editor (I use Notepad++).
  • Find any (non-header, IE. not h1, h2, h3 etc...) instance of left and change it to justify.
  • Save the stylesheet.css
  • Select Rebuild book
Your book is now changed.

Good Luck.
DoctorOhh is online now   Reply With Quote
Old 04-14-2013, 11:59 AM   #178
AnnieWalker
Junior Member
AnnieWalker began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2012
Device: Kindle Paperwhite Wi-Fi
Quote:
Originally Posted by DoctorOhh View Post


There is a setting under the conversion options on the Look & Feel tab where you can set your alignment preference during conversion, see attached.

Alternatively instead of converting the book if it is epub I suppose you could:
Thanks. I'm familiar with both those practices and they do the job but what I meant was if it could be resolved with adding one line in user stylesheet, per many mentions on this forum. Your 1/12 clarifies it for me.

Cheers
AnnieWalker is offline   Reply With Quote
Old 04-14-2013, 12:03 PM   #179
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,811
Karma: 12535517
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by AnnieWalker View Post
Thanks. I'm familiar with both those practices and they do the job but what I meant was if it could be resolved with adding one line in user stylesheet, per many mentions on this forum. Your 1/12 clarifies it for me.
You're welcome.

Hopefully someone with more knowledge will have insight into how to adjust the viewer's css.
DoctorOhh is online now   Reply With Quote
Old 05-18-2013, 03:44 AM   #180
Gladtobemom
Enthusiast
Gladtobemom began at the beginning.
 
Gladtobemom's Avatar
 
Posts: 47
Karma: 10
Join Date: Feb 2008
Device: Cybook, Palm Z72
It was really hard to give up the Mobipocket reader. It was so easy to use and I loved the column formats.

Well. . . .It's now gone from my computer. I finally figured out how to get books to be three columns and cover my whole screen. Use my favorite font (Constantia) and even a soft buff background.

So, I have my Cybook (Opus) which fits in my apron pocket or my bag. I have Calibre to let me keep things organized and read on the PC.

My question is how can I get


3 columns/pages justified left

Last edited by Gladtobemom; 05-19-2013 at 12:33 PM.
Gladtobemom 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:51 AM.


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