Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2021, 01:44 PM   #331
belyjmedved
Junior Member
belyjmedved began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2021
Device: macbook
It worked, thank you very much!
300% was just an example, I did not really need it. But some fonts are good at 120-140% line spacing, others at 100%.
belyjmedved is offline   Reply With Quote
Old 08-16-2021, 05:27 PM   #332
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 744
Karma: 308700
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Quote:
Originally Posted by belyjmedved View Post
It worked, thank you very much!
300% was just an example, I did not really need it. But some fonts are good at 120-140% line spacing, others at 100%.
Exactly it was only as an example that percentage can be varied according to taste.
dunhill is offline   Reply With Quote
Advert
Old 08-16-2021, 09:16 PM   #333
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 38,142
Karma: 152037714
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by dunhill View Post
Exactly it was only as an example that percentage can be varied according to taste.
At the time I wrote my original response, 300% was a bit of a sore point. I had downloaded a free prequel to a series that one friend of mine had recommended. I'm attaching a screenshot of the opening page of the first chapter. Some nitwit used 1.25" margins and a line height of 300% for the standard text paragraphs.


Click image for larger version

Name:	screen_008.png
Views:	843
Size:	90.5 KB
ID:	188740 Click image for larger version

Name:	screen_009.png
Views:	592
Size:	69.7 KB
ID:	188741
DNSB is online now   Reply With Quote
Old 08-17-2021, 06:05 PM   #334
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 744
Karma: 308700
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
I assure you, it was not me
dunhill is offline   Reply With Quote
Old 09-12-2021, 05:26 AM   #335
TMF
Enthusiast
TMF began at the beginning.
 
Posts: 42
Karma: 10
Join Date: May 2009
Device: PRS-505
How can I add spacing after paragraphs in the Calibre viewer's CSS style sheet? "p {margin-bottom:1.5em}" doesn't work.

Thanks for this thread, it's really helpful!

Edit: Kovid answered this already above: it's "p { margin-bottom: 1rem !important }".
TMF is offline   Reply With Quote
Advert
Old 12-09-2021, 05:19 PM   #336
parkher
Evangelist
parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.parkher ought to be getting tired of karma fortunes by now.
 
Posts: 467
Karma: 369018
Join Date: Nov 2010
Device: BL Alita/Mimas/Ares, OB Note2/Note, KA One/H2O/HD, S PRS T2/T1, PB 902
I have the opposite problem:
how to get rid of spacing between paragraphs.
I even tried to re-convert with the Calibre converter with --remove-paragraph-spacing
Zero effect. The Calibre viewer still shows gaps between paragraphs.
FBReader shows correctly, though. No gaps between paragraphs.

Oh, it seems that the Calibre stand-alone converter simply added br twice(!) instead of creating p, when converting docx to epub:
<br class="calibre9"/><br class="calibre9"/>
So the problem was caused not by the Calibre viewer but by the Calibre converter.
A replace all is needed. One br is quite enough.
Well, I am not sure if I can really blame the Calibre converter either.
It finds that double br in the docx xml:
</w:t><w:br/><w:br/><w:t>
and it is dumb (or smart?) enough to repeat it. No, nothing smart about it

Last edited by parkher; 12-09-2021 at 06:09 PM.
parkher is offline   Reply With Quote
Old 01-12-2022, 03:34 PM   #337
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 439
Karma: 77256
Join Date: Sep 2011
Device: none
I was trying to have sort of a custom theme for both light and dark mode. As one cannot set such, is it possible to perhaps accomplish such with CSS? I tried using color and background color with body.calibre-viewer-dark-colors without success.
democrite is offline   Reply With Quote
Old 01-22-2022, 09:16 AM   #338
lexexed
Junior Member
lexexed began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2022
Device: Windows
Text off the page w background image

I haven't used Calibre in quite some time, but downloaded the most recent version today to give it a try. The reason I stopped was because, until maybe 5 or so updates ago, I used to be able to read a two-page ebook with a background image just fine. Zero problems. But after and since some recent updates, the text is just crammed into the page when I use 2-page with a bg image.
At least one letter of a word is cut off either on the left or right side and the center is also 'crammed.' I hadn't changed any settings except to update. I downloaded the latest version to see if the old behavior had returned, but it's identical to back when I quit. Anyone know why this is happening? No bg image works sort of ok, but as soon as I add an image (any image) the run-off-the-page-edges problem comes right back.

Last edited by lexexed; 01-22-2022 at 09:19 AM.
lexexed is offline   Reply With Quote
Old 02-10-2022, 03:39 AM   #339
vyvlad
Junior Member
vyvlad began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Feb 2022
Device: Kobo Clara HD
scaling all images in an ebook

I'm not sure if it's my high DPI display or the particular ebooks I have gotten are badly formatted, but the sizes of images are extremely out of proportion with the text zoom or the size of the viewer. Most CSS image instructions set image sizes in absolute terms or relative to the size of the container. transform: scale will end up with images overlapping the text.

To scale all the images in an ebook up without ruining the formatting you can add


Code:
img {  
  zoom:200%;
}
To the stylesheet. The zoom level will depend on your DPI.
vyvlad is offline   Reply With Quote
Old 02-11-2022, 06:00 PM   #340
Avaai
Junior Member
Avaai began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2022
Device: none
CSS for Header and Footer

Is it possible to access the header & footer (the one that displays "Book title", "Top level section", etc) in the ebook viewer via css? I already tried:

footer,
header {}

.

Not sure if that's right though. It doesn't seem to work...
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2022-02-11 at 23.55.46.png
Views:	155
Size:	14.8 KB
ID:	192275  
Avaai is offline   Reply With Quote
Old 02-11-2022, 06:44 PM   #341
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: 30,168
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
VIEWER Headers and footers are controlled by the viewers Preferences:headers and Footers (settings )

This does not make use of any present IN the book (IMHO such paper relics have no place as there are no pages for the to reside)
theducks is offline   Reply With Quote
Old 02-22-2022, 11:44 PM   #342
grandixximo
Junior Member
grandixximo began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2022
Device: Windows laptop
I have this problem where Italic text is cut out on the right side, tried different fonts, and margins and padding, even aligning text to the left, but sometimes it still gets cut out, any suggestions?
You can see the final e of Maybe in the picture that I posted.
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	283
Size:	98.7 KB
ID:	192443   Click image for larger version

Name:	Untitled2.png
Views:	272
Size:	312.3 KB
ID:	192444  

Last edited by grandixximo; 02-22-2022 at 11:47 PM.
grandixximo is offline   Reply With Quote
Old 02-22-2022, 11:52 PM   #343
grandixximo
Junior Member
grandixximo began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2022
Device: Windows laptop
Quote:
Originally Posted by grandixximo View Post
I have this problem where Italic text is cut out on the right side, tried different fonts, and margins and padding, even aligning text to the left, but sometimes it still gets cut out, any suggestions?
You can see the final e of Maybe in the picture that I posted.
Edit:

Figured it out, just after posting this

* { padding-right: 10px !important }
grandixximo is offline   Reply With Quote
Old 02-22-2022, 11:53 PM   #344
grandixximo
Junior Member
grandixximo began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2022
Device: Windows laptop
Quote:
Originally Posted by grandixximo View Post
I have this problem where Italic text is cut out on the right side, tried different fonts, and margins and padding, even aligning text to the left, but sometimes it still gets cut out, any suggestions?
You can see the final e of Maybe in the picture that I posted.
Figured it out, just after posting this

Code:
* { padding-right: 10px !important }
grandixximo is offline   Reply With Quote
Old 02-23-2022, 06:03 PM   #345
democrite
Evangelist
democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.democrite will give the Devil his due.
 
Posts: 439
Karma: 77256
Join Date: Sep 2011
Device: none
Is it possible through CSS to get EPUB page numbers to show in the margin? I thought it was and vaguely recall I was able to once before. But I lost track of where I found it or how to. Haven’t been able to get it working. Official support in someway would be nice but CSS is ok for now.
democrite is offline   Reply With Quote
Reply


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 06:45 PM.


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