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 06-15-2012, 08:26 AM   #136
theducks
Well trained by Cats
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: 26,015
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by rgponce View Post
My style sheet:

body {
color: #393939;
background:#F9F0C9 url('file:///C:/Program Files (x86)/Calibre2/resources/images/old_paper.jpg');
text-align:justify;
line-spacing:1.8;
margin-right:8em !important;
margin-left:8em !important;
}
p {
text-indent:2.5em !important;
padding-bottom:0.5em;
font-family: "Book Antiqua", Palatino, serif !important;
}
h1, h2, h3, h4, h5, h6, .p6 {
color: #330000 !important;
border-bottom: 2px solid #330000 !important;
text-align:right !important;
font-style:italic !important;
font-weight:bold !important;
font-size: 1.3em !important;
}
::selection {
background: #FADC5C;
}

image used as background:
The background must be embedded in your book if you wish it to work on any other device. In Sigil, the source would be (in the) "../Images /old_paper.jpg"
theducks is offline   Reply With Quote
Old 06-15-2012, 08:33 AM   #137
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,841
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by theducks View Post
The background must be embedded in your book if you wish it to work on any other device. In Sigil, the source would be (in the) "../Images /old_paper.jpg"
Good info, but off topic. This thread is all about calibre's viewer css not getting the css to work in a book.
DoctorOhh is offline   Reply With Quote
Old 06-15-2012, 08:38 AM   #138
theducks
Well trained by Cats
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: 26,015
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by dwanthny View Post
Good info, but off topic. This thread is all about calibre's viewer css not getting the css to work in a book.

My oops!
theducks is offline   Reply With Quote
Old 06-20-2012, 10:49 AM   #139
werewolfery
Junior Member
werewolfery began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2010
Device: ipod touch
Hi there another vewbie to the whole css stuff. so I managed to get a nice set of stuff for both day and night reading using my little 11inch notebook, is there any way to make something that could switch between my day and night settings rather than me copying and pasting the codes every 12 hours or so...

thanks
werewolfery is offline   Reply With Quote
Old 06-22-2012, 06:55 PM   #140
pendeverNM
Junior Member
pendeverNM began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2012
Device: Sony PRS-505
I've placed this code in my viewer preferences, and what I see on all Calibre ebooks is smushed-together text, looking like black squiggles - but if copied, the text comes out OK.
I've tinkered with spacing and size, and nothing seems to make any difference.
Can you please help?
thanks,
Pen
pendeverNM is offline   Reply With Quote
Old 07-09-2012, 11:21 AM   #141
mapline
Enthusiast
mapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the endmapline knows the complete value of PI to the end
 
Posts: 44
Karma: 31594
Join Date: Jul 2012
Location: Essex,UK
Device: Kobo Touch
Hi
New user and I have a problem using the viewer as it cuts the top and bottom line .
Tried setting top and bottom margin as in post 1.
Makes No difference.
Can you tell me what I am doing wrong.
Thanks
Michael
mapline is offline   Reply With Quote
Old 07-21-2012, 10:12 AM   #142
atjnjk
Zealot
atjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enoughatjnjk will become famous soon enough
 
Posts: 107
Karma: 554
Join Date: Oct 2008
Device: none
Quote:
Originally Posted by mapline View Post
Hi
New user and I have a problem using the viewer as it cuts the top and bottom line .
Tried setting top and bottom margin as in post 1.
Makes No difference.
Can you tell me what I am doing wrong.
Thanks
Michael
From v0.8.61, you can click the top right button of the viewer so that no line is cut off. See this for more details.
atjnjk is offline   Reply With Quote
Old 08-28-2012, 07:03 AM   #143
guycruls
Junior Member
guycruls began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2012
Device: ibooks
'Colors and backgrounds'

I have the calibre reader on two machines - one is vista, the other 7.
preferences on vista give me a handy interface to format 'Colors and backgrounds', but preferences on 7, forces me to create a CSS?
that is just plain dumb.
guycruls is offline   Reply With Quote
Old 08-28-2012, 07:14 AM   #144
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,841
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by guycruls View Post
I have the calibre reader on two machines - one is vista, the other 7. preferences on vista give me a handy interface to format 'Colors and backgrounds', but preferences on 7, forces me to create a CSS?
that is just plain dumb.
Preferences on both machines should be the same. I've attached my Windows 7 Viewer preferences. There are four tabs across the top, choose General. Then click on Colors and backgrounds. Nothing could be simpler.
Attached Thumbnails
Click image for larger version

Name:	Win7ViewerPreferences.jpg
Views:	1044
Size:	102.2 KB
ID:	91418  

Last edited by DoctorOhh; 08-28-2012 at 07:16 AM.
DoctorOhh is offline   Reply With Quote
Old 08-28-2012, 10:58 AM   #145
theducks
Well trained by Cats
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: 26,015
Karma: 39102633
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
Quote:
Originally Posted by guycruls View Post
I have the calibre reader on two machines - one is vista, the other 7.
preferences on vista give me a handy interface to format 'Colors and backgrounds', but preferences on 7, forces me to create a CSS?
that is just plain dumb.
Are you running the (nearly) same version of Calibre on both machines?

That option has been around a while.
theducks is offline   Reply With Quote
Old 08-28-2012, 07:58 PM   #146
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,841
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by theducks View Post
Are you running the (nearly) same version of Calibre on both machines?
Good point, bring current both versions of calibre.
DoctorOhh is offline   Reply With Quote
Old 09-26-2012, 01:10 PM   #147
anoved
Enthusiast
anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.
 
anoved's Avatar
 
Posts: 41
Karma: 1005240
Join Date: Feb 2012
Device: Kindle Keyboard, iPhone
Multi column stylesheet

Here is a stylesheet I use to display text in multiple columns. The columns are as tall as the viewer window and you scroll horizontally to see more columns of text. The vertical position of lines of text does not change as you scroll. On a big computer screen, I like reading this way. (I've learned that some people strongly disagree. If that's you, cool - just move along!)



Works only with "flow" mode, not paged mode. I've only tested it with a few relatively simple ebooks. It may interact unpredictably with more complex formatting.

Horizontal scrolling works nicely with my trackpad, but unfortunately vertical scrolling (which jumps between chapters) seems too sensitive for my control, so I use the arrow keys. (Although that's not really specific to this stylesheet.)

Code:
html {
	height: 100%;
	width: 100%;
	padding: 0;
	margin: 0;
}

body {
	height: 100%;
	margin: 0;
	padding: 0;

	/* column-width seems to be treated as a suggestion; actual width
	is varied to fit an even number of columns within screen width. */
	-webkit-column-width: 20em;
	-webkit-column-count: auto;
	-webkit-column-gap: 1.5em;

	line-height: 1.5em;
}

/* This is a fudge fix to prevent the children of the body tag from
defining margins that overlap the body height, which causes small
but annoying amounts of vertical scroll. Uses a wildcard because
I don't necessarily know how any particular page is structured. */ 
body > * {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
I've also posted the code at github.com/anoved/McCalibre, where I may post any future updates.

Note this stylesheet just affects the layout of the text. You can still append additional styles for specific font/color/etc effects.
anoved is offline   Reply With Quote
Old 09-27-2012, 04:53 AM   #148
mbovenka
Wizard
mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.mbovenka ought to be getting tired of karma fortunes by now.
 
Posts: 1,878
Karma: 6633031
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Forma
Quote:
Originally Posted by anoved View Post
Here is a stylesheet I use to display text in multiple columns. The columns are as tall as the viewer window and you scroll horizontally to see more columns of text. The vertical position of lines of text does not change as you scroll. On a big computer screen, I like reading this way. (I've learned that some people strongly disagree. If that's you, cool - just move along!)
Nice trick. I'm firmly in the 'Urgh. No thanks!'-camp, but it's definitely cool
mbovenka is offline   Reply With Quote
Old 09-27-2012, 04:58 AM   #149
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: 38,722
Karma: 17012168
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@anoved: You know that in paged mode you can tell the viewer to display multiple columns on the screen right? Preferences->Text Layout in paged mode

Click image for larger version

Name:	viewer-fs.png
Views:	366
Size:	365.0 KB
ID:	161064

Last edited by WT Sharpe; 12-30-2017 at 10:57 AM. Reason: Changed oversized graphic to thumbnail attachment.
kovidgoyal is online now   Reply With Quote
Old 09-27-2012, 09:31 AM   #150
anoved
Enthusiast
anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.anoved ought to be getting tired of karma fortunes by now.
 
anoved's Avatar
 
Posts: 41
Karma: 1005240
Join Date: Feb 2012
Device: Kindle Keyboard, iPhone
Green Eggs and Ham

Quote:
Originally Posted by kovidgoyal View Post
@anoved: You know that in paged mode you can tell the viewer to display multiple columns on the screen right? Preferences->Text Layout in paged mode
Yep, and it's quite nice. The difference with my stylesheet, though, is that the columns always remain in the window, instead of a paging away. A minor distinction.

I appreciate that Calibre is flexible enough to support eccentric preferences like mine!

Last edited by anoved; 09-27-2012 at 09:40 AM.
anoved 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-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


All times are GMT -4. The time now is 06:56 AM.


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