Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-13-2010, 11:38 AM   #841
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: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@Oldpilot: <mbpagebreak> is kindle specific. The correct way to specify page breaks in html is

<div style="page-break-after:always"></div>

You should also read the conversion section of the calibre user manual to learn how to control where calibre puts its automatic pagebreaks.

@wn0x: If your input document contains font families they will be in the output stylesheet as well, unless what you put into extra css overrides them. In that case, Tweak epub is the way to go.
kovidgoyal is offline   Reply With Quote
Old 11-13-2010, 09:51 PM   #842
wn0x
Member
wn0x has a complete set of Star Wars action figures.wn0x has a complete set of Star Wars action figures.wn0x has a complete set of Star Wars action figures.wn0x has a complete set of Star Wars action figures.
 
Posts: 13
Karma: 378
Join Date: Mar 2010
Device: Sony PRS-505
Re: Font References in stylesheet.css

Thanks Kovid. I noticed that if I re-converted the the file to epub any changes I made to stylesheet.css were lost, so that makes sense. I will have to "explode" and modify the input epub files if I don't want to mess with that again.

I can override epub styles on the PRS505 as I am running prs+ which is an awesome feature.

I am hoping that future versions of the PRS-950 allow for a different default font, or that a font replacement hack becomes available for the reader.

Rich
wn0x is offline   Reply With Quote
Old 11-19-2010, 08:44 AM   #843
ThePage
Connoisseur
ThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura about
 
ThePage's Avatar
 
Posts: 76
Karma: 4430
Join Date: Jan 2009
Location: Chicagoland
Device: Kindle 4, eBookwise & Literati
Quote:
Originally Posted by nikkie View Post
I also found this problem in a lot of my books. When I opened them up in plain text editors, they had newlines at the end of every physical line break to control the width of the text.

Here is what I did to solve this problem when the file was rtf or something I could physically edit:

Because I was working with these books in windows instead of on linux, I wanted a solution that would work in windows. So I tested a few things in Word and found a solution that mostly worked, and then recorded it as a macro.

In cases where there is a paragraph break, you always have two new lines. In cases where it is inappropriately breaking at the end of the physical width of the screen, there's always one. So, what I did is I did a Find/Replace for any two line breaks (^p^p) in word, and replaced them with another special character not in the file. Then I did a find replace for the single line breaks (^p) and replaced them with a single space. The I found and replaced the special character I had replaced the double breaks with again a double line break. (Or you can use a paragraph, whatever you want.)

Now, every time I find an RTF book that has this problem, I open it in Word real quick, run my macro, and save. Then I convert in calibre. Works perfectly.
You might want to offer the macro for others to use - if you haven't already!

Last edited by ThePage; 11-19-2010 at 08:45 AM. Reason: misspelling
ThePage is offline   Reply With Quote
Old 11-19-2010, 08:49 AM   #844
ThePage
Connoisseur
ThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura aboutThePage has a spectacular aura about
 
ThePage's Avatar
 
Posts: 76
Karma: 4430
Join Date: Jan 2009
Location: Chicagoland
Device: Kindle 4, eBookwise & Literati
Repeating myself - you might want to offer (both) macro's for others to use - if you haven't already!
ThePage is offline   Reply With Quote
Old 11-20-2010, 09:37 AM   #845
SilvioTO
Junior Member
SilvioTO began at the beginning.
 
SilvioTO's Avatar
 
Posts: 7
Karma: 10
Join Date: Nov 2010
Device: none
how to keep images proportion

Hi all, I registered now on the forum...
I trying Calibre and I have a very good impression of it! I made a document with Open Office and save as html for convert it to an epub file. The conversion of text (with the default options) went fine, but the images don't maintain proportions. To do this I need to use Sigil end edit manually the code.

Here's a simply option in Calibre for maintain proportions of the included images?

Thanks for your help,
Silvio.
Attached Files
File Type: epub Achille - Silvio.epub (667.9 KB, 196 views)

Last edited by SilvioTO; 11-20-2010 at 09:39 AM. Reason: typing error
SilvioTO is offline   Reply With Quote
Old 11-20-2010, 07:33 PM   #846
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,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by SilvioTO View Post
I trying Calibre and I have a very good impression of it! I made a document with Open Office and save as html for convert it to an epub file.
I can't answer your question, but I might have an alternative that will help you. There is a writer2epub extension for Open Office that allows you to save your document as a epub. The creator has a sticky thread to ask questions about it here at the epub forum of mobileread.

Another possibility is to save the document as an ODT file and try converting that with calibre and see if you have the same problem.

Good Luck.
DoctorOhh is offline   Reply With Quote
Old 11-20-2010, 08:02 PM   #847
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,252
Karma: 16544692
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by SilvioTO View Post
Here's a simply option in Calibre for maintain proportions of the included images?
I'm not sure whether I fully understand your question, but if I'm using HTML as my source then I hand-edit the HTML in a text editor before importing to Calibre, so that each image is simplified to look something like:

Code:
<p><img src="images/mypic.jpg" alt="mypic" /></p>
i.e. I remove any height=xxx or width=yyy dimensions. Calibre then seems to handle image sizes automatically. It will also rescale them proportionally during the ZIP to EPUB conversion, if the original size would be too big to fit on your reader (as specified in Convert - PageSetup - OutputProfile).

There may be better ways, but this works for me.

Last edited by jackie_w; 11-20-2010 at 08:04 PM.
jackie_w is offline   Reply With Quote
Old 11-20-2010, 08:07 PM   #848
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,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by jackie_w View Post
I remove any height=xxx or width=yyy dimensions. Calibre then seems to handle image sizes automatically. It will also rescale them proportionally during the ZIP to EPUB conversion, if the original size would be too big to fit on your reader (as specified in Convert - PageSetup - OutputProfile).
Good advice!
DoctorOhh is offline   Reply With Quote
Old 11-21-2010, 06:29 AM   #849
SilvioTO
Junior Member
SilvioTO began at the beginning.
 
SilvioTO's Avatar
 
Posts: 7
Karma: 10
Join Date: Nov 2010
Device: none
Quote:
I'm not sure whether I fully understand your question
I'm refer to aspect ratio of the images. If you try to open my epub in attach and change the dimension of the window of your reader, you will see that the images are stretched, don't maintain the original aspect ratio.
In a future version of Calibre I hope that an option are added to maintain aspect ratio of images and, maybe, center in the text.
Thanks all for advices.
SilvioTO is offline   Reply With Quote
Old 11-21-2010, 06:56 AM   #850
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,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
[QUOTE=SilvioTO;1227385]I'm refer to aspect ratio of the images. If you try to open my epub in attach and change the dimension of the window of your reader, you will see that the images are stretched, don't maintain the original aspect ratio.

My PRS-505 or Kindle don't have expandable windows so the images are converted fine for these and other fixed sized devices.

Quote:
Originally Posted by SilvioTO View Post
In a future version of Calibre I hope that an option are added to maintain aspect ratio of images
Calibre does this now during conversion for whatever ereader you have it set for. But since you're using the built in reader if you set the calibre reader large enough you won't have a problem with images or if you go into the readers preferences you can turn off image resizing all together. If the images are too big they will just be too big until you expand the window.

That said I'm surprised the window resizing doesn't maintain aspect ratio.
DoctorOhh is offline   Reply With Quote
Old 11-21-2010, 10:18 AM   #851
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: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
[QUOTE=dwanthny;1227410]
Quote:
Originally Posted by SilvioTO View Post
I'm refer to aspect ratio of the images. If you try to open my epub in attach and change the dimension of the window of your reader, you will see that the images are stretched, don't maintain the original aspect ratio.

My PRS-505 or Kindle don't have expandable windows so the images are converted fine for these and other fixed sized devices.



Calibre does this now during conversion for whatever ereader you have it set for. But since you're using the built in reader if you set the calibre reader large enough you won't have a problem with images or if you go into the readers preferences you can turn off image resizing all together. If the images are too big they will just be too big until you expand the window.

That said I'm surprised the window resizing doesn't maintain aspect ratio.
For a time there (I only fixed, 1 or 2 converts), Calibre wrapped covers in SVG tags and did not specify "maintain_aspect_ratio" for size = "Stretch-o-Vision" (Can you tell I am a Letterbox video Purist ) covers on my PEz.
theducks is offline   Reply With Quote
Old 11-21-2010, 10:25 AM   #852
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: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Umm aspect ratio is only not preserved for covers and there is an option under EPUB Output to control that.
kovidgoyal is offline   Reply With Quote
Old 11-21-2010, 10:30 AM   #853
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: 31,079
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kovidgoyal View Post
Umm aspect ratio is only not preserved for covers and there is an option under EPUB Output to control that.
I may have found that option along the way and changed the setting to make it permanent.

Keeping up with all the changes in Calibre can be such a pain
Hit me again
theducks is offline   Reply With Quote
Old 11-21-2010, 04:48 PM   #854
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,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by kovidgoyal View Post
Umm aspect ratio is only not preserved for covers and there is an option under EPUB Output to control that.
The OP is talking about the resizing of the window of calibre's reader. As you resize the reader's window calibre does not maintain aspect ratio.
DoctorOhh is offline   Reply With Quote
Old 11-21-2010, 09:07 PM   #855
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: 45,378
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yeah, that's a side effect of the way max-width is implemented in webkit. Simply turn off the option to fit images to the viewer window if it bothers you.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Epub Output: Line Height greenapple Conversion 20 01-27-2013 09:27 AM
EPUB output justification toki08 Calibre 10 01-08-2011 04:14 PM
Calibre epub output details and Nook squidward Calibre 6 11-24-2010 03:21 PM
epub output metadata troymc Calibre 5 05-22-2010 12:23 AM
Problem with epub output in Cybook Gen3 fjf Calibre 3 02-03-2010 02:23 AM


All times are GMT -4. The time now is 06:45 PM.


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