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-20-2019, 04:46 AM   #256
duns
Enthusiast
duns began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Sep 2017
Device: PocketBook
Quote:
Originally Posted by kovidgoyal View Post
margins take the same color as whatever backgroud color you have defined in the color preferences for the viewer.
Thank you!

Yes, but why not let to customer ... customize that colors (with css)?

Last edited by duns; 12-20-2019 at 04:51 AM.
duns is offline   Reply With Quote
Old 12-20-2019, 05:14 AM   #257
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: 36,067
Karma: 15014853
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Because I dont see the point, why would anyone want margins in a different color from the page? And if you really do, the set the page color to what you want the margins to be and use an image as the page background.
kovidgoyal is online now   Reply With Quote
Advert
Old 12-20-2019, 06:48 AM   #258
duns
Enthusiast
duns began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Sep 2017
Device: PocketBook
Quote:
Originally Posted by kovidgoyal View Post
Because I dont see the point, why would anyone want margins in a different color from the page? And if you really do, the set the page color to what you want the margins to be and use an image as the page background.
Maybe we don't understand each other: I don't mean "margins", but the top bar, i.e. where you can put the title of the ebook and the like. That I would differentiate it from the body of the text because it is not the body of the text.
I simply ask you to give the possibility, if a css expert customer wants, to differentiate that background (css ID #book-top-margin).
duns is offline   Reply With Quote
Old 12-20-2019, 08:51 AM   #259
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: 36,067
Karma: 15014853
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That is the top margin, and is it is separated by whitespace from the text of the book, just as in all paper books for instance. You can control how much space there is yby changing the size of the margin.
kovidgoyal is online now   Reply With Quote
Old 12-20-2019, 01:08 PM   #260
duns
Enthusiast
duns began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Sep 2017
Device: PocketBook
Quote:
Originally Posted by kovidgoyal View Post
That is the top margin, and is it is separated by whitespace from the text of the book, just as in all paper books for instance. You can control how much space there is yby changing the size of the margin.
Thank you.
We are not all "made in the same way" : personally I would prefer to see "author" and "title" and "chapter" with a background that distinguishes it from the body of the text.
Is would be technically difficult to let users (with css knowlegde) customize this background?
duns is offline   Reply With Quote
Advert
Old 12-20-2019, 05:41 PM   #261
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,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by duns View Post
Thank you.
We are not all "made in the same way" : personally I would prefer to see "author" and "title" and "chapter" with a background that distinguishes it from the body of the text.
Is would be technically difficult to let users (with css knowlegde) customize this background?
Maybe something like this (see attached)? I used the latest calibre to setup the book viewer as shown.
Attached Thumbnails
Click image for larger version

Name:	book_example.jpg
Views:	188
Size:	422.8 KB
ID:	175766   Click image for larger version

Name:	book_example-2.jpg
Views:	120
Size:	418.4 KB
ID:	175769  

Last edited by DoctorOhh; 12-20-2019 at 06:38 PM.
DoctorOhh is offline   Reply With Quote
Old 12-21-2019, 05:27 AM   #262
duns
Enthusiast
duns began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Sep 2017
Device: PocketBook
Quote:
Originally Posted by DoctorOhh View Post
Maybe something like this (see attached)? I used the latest calibre to setup the book viewer as shown.
Yes, thanks, like that!
Today I managed to get something similar (see the image attached), but now Calibre viewer is become very slow...

EDIT

No: I have changed something and now the speed is normal. This is my css code:
Code:
body {
  counter-reset: section;  /* Set a counter named 'section', and its initial value is 0. */
  background-image: radial-gradient(white 20%, #e5e4dc 70%) !important;
}

h2 {
  counter-reset: paragraph;    /* Set a counter named 'section', and its initial value is 0. */
  counter-increment: section; /* Increment the value of section counter by 1 */
}
p::before {
     counter-increment: paragraph;       /* Increment the value of parag counter by 1 */
     content: "[cap." counter(section) ", para." counter(paragraph) "] "; 
     color: gray; font-size: 70%;
}
h2 {background: #B35A31 linear-gradient(to left, #B35A31 80%, #F4E492 105%); color: white !important; font-weight: bold !important; text-shadow: gray -1px -1px;  border-radius: 8px; box-shadow: 5px 4px 4px gray;  margin-bottom: 25px !important;}

h3, h4 {color: #B35A31 !important; border-bottom: thin white solid;}

div {max-width: 90vw !important; margin-left: auto; margin-right: auto;}
Attached Thumbnails
Click image for larger version

Name:	Calibre stilished.png
Views:	251
Size:	404.4 KB
ID:	175776  

Last edited by duns; 12-21-2019 at 06:30 AM.
duns is offline   Reply With Quote
Old 12-21-2019, 06:28 AM   #263
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: 36,067
Karma: 15014853
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What size image are you using for the background?
kovidgoyal is online now   Reply With Quote
Old 12-21-2019, 07:39 AM   #264
duns
Enthusiast
duns began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Sep 2017
Device: PocketBook
Quote:
Originally Posted by kovidgoyal View Post
What size image are you using for the background?
Not an image, but css (radial-gradient).
duns is offline   Reply With Quote
Old 12-29-2019, 11:38 PM   #265
dunhill
Connoisseur
dunhill doesn't litterdunhill doesn't litter
 
dunhill's Avatar
 
Posts: 96
Karma: 128
Join Date: Sep 2017
Device: moon+ reader
Quote:
Originally Posted by DoctorOhh View Post
Maybe something like this (see attached)? I used the latest calibre to setup the book viewer as shown.
DoctorOhhh could you share the code?
dunhill is offline   Reply With Quote
Old 12-30-2019, 04:46 AM   #266
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,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by dunhill View Post
DoctorOhhh could you share the code?
No special code. I described how I set things up in post 246. But I attached the adjustments I entered in Viewer - Preferences to get this look. Essentially no margins left, right or bottom. Change the color so the background and fore a different then add code in style to change the book text color back to black.

In calibre preferences I did create a Save to Disk metadata plugboard (see attached) to save the Author - Title to the title field upon using the Save to Disk feature to get the Author and title to display where only the Title would normally appear. This means I would have to use the Save to Disk feature to save the book into a reading directory before I read the book.

This was just an exercise to show what could be done with existing settings. I use the setup in post 246 myself.
Attached Thumbnails
Click image for larger version

Name:	Styles.jpg
Views:	188
Size:	315.2 KB
ID:	175982   Click image for larger version

Name:	colors.jpg
Views:	100
Size:	191.0 KB
ID:	175983   Click image for larger version

Name:	Headers and footers.jpg
Views:	122
Size:	140.6 KB
ID:	175984   Click image for larger version

Name:	Page Layout.jpg
Views:	114
Size:	294.0 KB
ID:	175985   Click image for larger version

Name:	metadata plugboard.jpg
Views:	114
Size:	349.9 KB
ID:	175986   Click image for larger version

Name:	bigback.jpg
Views:	87
Size:	466.0 KB
ID:	175987   Click image for larger version

Name:	book_example.jpg
Views:	98
Size:	422.8 KB
ID:	175988   Click image for larger version

Name:	calibre viewer screenshot Post 246.jpg
Views:	92
Size:	1.39 MB
ID:	175991  

Last edited by DoctorOhh; 12-30-2019 at 05:36 AM.
DoctorOhh is offline   Reply With Quote
Old 12-30-2019, 10:52 PM   #267
dunhill
Connoisseur
dunhill doesn't litterdunhill doesn't litter
 
dunhill's Avatar
 
Posts: 96
Karma: 128
Join Date: Sep 2017
Device: moon+ reader
Now if Doc thank you very much for the explanation, I needed to adjust some parameters.
Image 1 as I had it.
Image 2 after adjustments.
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	89
Size:	272.5 KB
ID:	176007   Click image for larger version

Name:	2.png
Views:	106
Size:	848.4 KB
ID:	176008  

Last edited by dunhill; 12-30-2019 at 10:58 PM.
dunhill is offline   Reply With Quote
Old 02-07-2020, 05:02 PM   #268
igor23740
Junior Member
igor23740 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2020
Device: naw
Footer

Hello. I use this CSS Code
Code:
P{
margin-left: 1.47em !important;
margin-right: 1.47em !important;
}
body {
margin-top: 0.70em !important;
}

Div{
margin-left: 0.25em !important;
}

*{
color:black !important;
}

div{
max-width: 90vw !important;
}
but it doesn't regulate the footer! Please tell me how to do this?
Attached Thumbnails
Click image for larger version

Name:	2020-02-07_232742.jpg
Views:	49
Size:	257.7 KB
ID:	177000  
igor23740 is offline   Reply With Quote
Old 02-07-2020, 06:33 PM   #269
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,830
Karma: 13774200
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by igor23740 View Post
Hello. I use this CSS Code
Code:
P{
body {
margin-top: 0.70em !important;
}
but it doesn't regulate the footer! Please tell me how to do this?
Margin left and right work, but top and bottom margins do not work. If you make the top margin much bigger than the 0.15em the bottom will slide off the screen. I only use the very small number to move the letters in the top sentences to stop rubbing against the top of the background image.

There is nothing you can do but set the top and bottom margins in the layout and not in extra css.
DoctorOhh is offline   Reply With Quote
Old 02-08-2020, 03:54 AM   #270
igor23740
Junior Member
igor23740 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2020
Device: naw
Footer

Quote:
Originally Posted by DoctorOhh View Post
Margin left and right work, but top and bottom margins do not work. If you make the top margin much bigger than the 0.15em the bottom will slide off the screen. I only use the very small number to move the letters in the top sentences to stop rubbing against the top of the background image.

There is nothing you can do but set the top and bottom margins in the layout and not in extra css.
It turned out like this. Better than nothing. Thanks.
Attached Thumbnails
Click image for larger version

Name:	2020-02-08_104920.jpg
Views:	38
Size:	318.0 KB
ID:	177012  
igor23740 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 02:30 AM.


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