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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2011, 04:24 PM   #106
foosion
Connoisseur
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 95
Karma: 4562
Join Date: Sep 2011
Device: Kobo Libra 2
Another way to implement margins would be to put a border between the viewport and its enclosing frame. The size of the border would depend on the margin settings (or some other settings). The border would be the same color as the viewport's background color.

Clearly the enter viewer, including the viewport, is resizable, so making the viewport a bit smaller should be easy.

If I understand correctly, the css stylesheets operate within the viewport, so we can't add such a border using a css stylesheet.
foosion is offline   Reply With Quote
Old 10-30-2011, 11:57 AM   #107
foosion
Connoisseur
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 95
Karma: 4562
Join Date: Sep 2011
Device: Kobo Libra 2
As a proof of concept (implemented by adding a border widget, shown in red for clarity):

foosion is offline   Reply With Quote
Advert
Old 10-30-2011, 10:02 PM   #108
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: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by foosion View Post
As a proof of concept (implemented by adding a border widget, shown in red for clarity)
Excellent, now make the widget color selectable, in another forum someone was asking for a reader where the border background was black. Then submit the info in an enhancement request to see if it can be added to calibre.
DoctorOhh is offline   Reply With Quote
Old 10-31-2011, 07:53 AM   #109
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,135
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sticking a blank space outside the viewport is not an acceptable way to implement this. You have to match the background color to the background color of the book page which may or may not be white. Since the calibre viewer supports javascript, you'd have to dynamically change the color if a script in the book page changed the background color. And negativeve co-ordinates in the css will not work correctly. Then a book can define different margins in every html file it contains, so you'd have to watch for that and adjust dynamically. All in all, that makes this approach too hacky for the functionality it provides.
kovidgoyal is offline   Reply With Quote
Old 10-31-2011, 01:28 PM   #110
foosion
Connoisseur
foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.foosion is fluent in JavaScript as well as Klingon.
 
Posts: 95
Karma: 4562
Join Date: Sep 2011
Device: Kobo Libra 2
My desire is to have a top and bottom border, so that the text does not touch the frame. I can do side borders with the css stylesheet, but top and bottom borders don't work, because they don't work in the gui framework used in Calibre.

Walt, I'm the one who wanted a non-distracting background.
Quote:
Originally Posted by kovidgoyal View Post
You have to match the background color to the background color of the book page which may or may not be white. Since the calibre viewer supports javascript, you'd have to dynamically change the color if a script in the book page changed the background color.
If Calibre is aware of changes to the background color, it's obviously trivial to change the background color of the border.

Many of the css stylesheets listed in this thread include a background color, some with the !important qualifier. Some also try to add top and bottom margins.

I've never read an ebook that changed the background color in the middle of the book, but I can't pretend to have a small fraction of your experience.
Quote:
Originally Posted by kovidgoyal View Post
And negativeve co-ordinates in the css will not work correctly.
The primary purpose is to implement top and bottom margins, which don't work at the moment. This approach can't do any worse.

This approach is not appropriate for left and right margins, as they work fine by specifying a css stylesheet.
Quote:
Originally Posted by kovidgoyal View Post
Then a book can define different margins in every html file it contains, so you'd have to watch for that and adjust dynamically.
Personally, I just want some blank space on the top an bottom so that the text doesn't crowd the frame. I wouldn't want it to change.
Quote:
Originally Posted by kovidgoyal View Post
All in all, that makes this approach too hacky for the functionality it provides.
Tilting at windmills is a hobby of mine.

If it's not something many people want and it risks being too fragile, it's not a change worth making.

Last edited by foosion; 10-31-2011 at 01:30 PM.
foosion is offline   Reply With Quote
Advert
Old 10-31-2011, 09:20 PM   #111
MplsGirl
Still Prefers Real Books
MplsGirl began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2011
Device: Calibre
I LOVE THIS ONE!! SO PRETTY!

But does anyone know how to increase paragraph spacing for all paragraphs? Or does it only work if the original ebook is formatted that way?

Basically I want something like this:


Uploaded with ImageShack.us

Can anyone help me?!

Quote:
Originally Posted by jamezb3 View Post
I use this one, I find it easy one the eyes.

Code:
body {
color: rgb(189,226,252);
background-color:rgb(80,80,80);
text-align:justify;
line-spacing:1.8;
margin-top:10px;
margin-bottom:4px;
margin-right:20px;
margin-left:20px;
text-indent:2em;
}
h1, h2, h3, h4, h5, h6 {
color:black;
text-align:center;
font-style:italic;
font-weight:bold;}
MplsGirl is offline   Reply With Quote
Old 11-01-2011, 02:25 PM   #112
moodjbow
Junior Member
moodjbow began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2011
Device: none
text-indent not functional?

Hey there, I made also some CSS customizatioins, but fact is that in reading mode there is indent on each paragraph even when I define it as 0. My format is epub. On the other hand when I say "print" from calibre's viewer there are no indents, no matter how I define in the custom CSS field. What's the problem there?
OK, I post here my "old book"-style for the ones that are interested:
body {
background-color: #fefcf2;
color: #333333;
width: 33em;
padding: 2em 3em;
border: 1px solid #ccc;
margin: 0 auto;
font-family: "Book Antiqua", Palatino, serif;
text-align: justify;
text-indent: 0; }
h1 {
font-size: 2.5em;
font-weight: bold;
text-align: center;
font-family: "Monotype Corsiva", "Apple Chancery", fantasy;
border: 1px solid #ccc;
border-radius: 10px; }
h2, h3, h4 {
font-weight: bold;
text-align: center;
border: 1px solid #ccc;
border-radius: 10px; }
h2 + p:first-line {
font-variant: small-caps;
font-size: 1.1em; }
h2 + p:first-letter {
float: left;
font-size: 2.5em;
font-weight: bold;
font-family: "Monotype Corsiva", "Apple Chancery", fantasy;
margin: -8px 8px; }
h3 + p:first-line {
font-variant: small-caps;
font-size: 1.1em; }
h3 + p:first-letter {
float: left;
font-size: 2.5em;
font-weight: bold;
font-family: "Monotype Corsiva", "Apple Chancery", fantasy;
margin: -8px 8px; }
h4 + p:first-line {
font-variant: small-caps;
font-size: 1.1em; }
h4 + p:first-letter {
float: left;
font-size: 2.5em;
font-weight: bold;
font-family: "Monotype Corsiva", "Apple Chancery", fantasy;
margin: -8px 8px; }
p {
margin-bottom: 0; }
p + p {
margin-top: 0; }
moodjbow is offline   Reply With Quote
Old 11-01-2011, 03:19 PM   #113
moodjbow
Junior Member
moodjbow began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2011
Device: none
OK, found the answer myself here:
http://blog.calibre-ebook.com/2011/0...re-viewer.html
@MplsGirl - this should apply to your case as well - use css statements with !important; at the end to override epub embedded formatting, something like
p {
margin-bottom: 1.5em !important; }
moodjbow is offline   Reply With Quote
Old 11-02-2011, 11:32 PM   #114
_reader
Member
_reader doesn't litter_reader doesn't litter
 
Posts: 24
Karma: 142
Join Date: Sep 2010
Device: K3, KPW
Not sure how to ask for a response when skipped (re: page 7), but to ask again briefly:

I tried the 2-Columns mode which displays 2-cols, but page-forward doesn't advance (either by the arrow-icons, Page Down/Up, space bar, or mouse wheel). Suggestions?

I'm looking to simulate an open book with two pages to view on my laptop or desktop wide screen. As an example, Ybook reader provides this for .txt books.
_reader is offline   Reply With Quote
Old 11-05-2011, 04:02 PM   #115
moodjbow
Junior Member
moodjbow began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Nov 2011
Device: none
Dies this really apply?

Quote:
Originally Posted by dwanthny View Post
Excellent, now make the widget color selectable, in another forum someone was asking for a reader where the border background was black. Then submit the info in an enhancement request to see if it can be added to calibre.
Hey, I am just wondering - we all know that the "paged view" issue will improve look an feel of the reader, but are we not going astray of the design politics? I mean this is a viewer as much as any web browser with text flow using mouse scroll function, in contrast to tab/pad readers where you have to flip page by page with the finger. I mean, if you are really into doing this, great, but then a logical recommendation will be - with all this burden - to implement it as a tab app as well...

PS: I adore this "simple" reader because it was the only free one - and I mean it literally comparing even with adobe and sony crap! - presenting a cyrillic text correctly. The others were simply showing
?????????????
moodjbow is offline   Reply With Quote
Old 11-26-2011, 05:41 PM   #116
egosbar
Junior Member
egosbar began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2011
Device: i pad
hey all , when some of my book pages come up the text on the bottom line is showing half the text ( very annoying) can i adjust this somehow using the user style sheet
egosbar is offline   Reply With Quote
Old 11-26-2011, 07:22 PM   #117
egosbar
Junior Member
egosbar began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2011
Device: i pad
i also want to change the backround texture

the image i want is on my computer c/ my pictures/beige009.jpg , can i access and use this using the css

Last edited by egosbar; 11-26-2011 at 07:38 PM.
egosbar is offline   Reply With Quote
Old 12-02-2011, 12:10 AM   #118
egosbar
Junior Member
egosbar began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Nov 2011
Device: i pad
bump anyone answering in this thread??
egosbar is offline   Reply With Quote
Old 12-02-2011, 03:05 AM   #119
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: 9,865
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by egosbar View Post
i also want to change the backround texture

the image i want is on my computer c/ my pictures/beige009.jpg , can i access and use this using the css
In post 65 pollito pito outlines how to do this.
DoctorOhh is offline   Reply With Quote
Old 12-17-2011, 10:10 AM   #120
zeusbheld
Junior Member
zeusbheld began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Aug 2011
Device: laptop and (prospective) nook
I tried custom CSS (copying and pasting styles from here and ePub Zen Garden). When I use Zen Garden's copy of Middlemarch the styles work fine.

When I use almost any other ebook, the styles get overridden. Some settings are preserved, such as colors, but it manages to override pretty much anything I care about.

What I want is very simple, and follows the basic principles of sensible typography:

1: Ragged right text, NOT justified.

2. Adequate leading so there's breathing room between the lines of text. 1.5 times font height to 1.8 times (depends on font).

3. If extra space is used between paragraphs, DO NOT indent the first line.

all of these work nicely on Middlemarch but very little else. How can I find out what is overriding my settings and destroy it with extreme prejudice without having to learn CSS (I just want to read, not learn formatting codes)?
zeusbheld 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 03:02 PM.


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