Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-09-2009, 10:38 PM   #76
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by llasram View Post
The any2* tools are mostly for e-book conversion, and in MSReader and Mobipocket a <br/> tag there will create a new blank line. If calibre didn't convert such <br/>s then people converting books from those formats would find that they were missing blank lines in e.g. their EPUB versions.

More abstractly, the problem is that you should never be using the <br/> tag in hand-written HTML. You should use semantic markup around anything you want to be rendered as a block-level box and use CSS to set appropriate display and margins.
When I learned html coding in college <br> tags were part of the learning experience. Last time I checked <br> is valid html coding.

Is there another equivalent to <br> that does not require stylesheet coding? Because in my book the people who were coding mobipocket and MS Reader screwed things up. <br> stands for a line break not paragraph.

grrrr

Not angry at you in fact I appreciate your advice it's just frustrating because all my files use <br> to designate line breaks and it's worked for LRF and I did not want to create two separate html files one for LRF the other for Mobi.

Basically, you kind of gave me an answer I didn't want to hear.
Amalthia is offline   Reply With Quote
Old 02-09-2009, 10:57 PM   #77
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Amalthia View Post
Is there another equivalent to <br> that does not require stylesheet coding? Because in my book the people who were coding mobipocket and MS Reader screwed things up. <br> stands for a line break not paragraph.
This special interpretation applies only to <br/> tags which are direct children of the <body/> element, so just wrap everything in a <div/> and you should be fine.

The problem with <br/> is that it's a purely formatting element. HTML isn't really a formatting language, especially XHTML 1.x. Instead the markup language supplies semantic constructs -- tags for headers, paragraphs, quotations, etc -- and allows any formatting for those elements the designer wants using CSS. The <br/> tag doesn't really fit this paradigm, and is best avoided (IMHO, as yes -- it isn't yet deprecated).
llasram is offline   Reply With Quote
Advert
Old 02-09-2009, 11:29 PM   #78
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by llasram View Post
This special interpretation applies only to <br/> tags which are direct children of the <body/> element, so just wrap everything in a <div/> and you should be fine.

The problem with <br/> is that it's a purely formatting element. HTML isn't really a formatting language, especially XHTML 1.x. Instead the markup language supplies semantic constructs -- tags for headers, paragraphs, quotations, etc -- and allows any formatting for those elements the designer wants using CSS. The <br/> tag doesn't really fit this paradigm, and is best avoided (IMHO, as yes -- it isn't yet deprecated).
what would happen if i just applied <div> text here</div> to a line of text? would the create a line break or a paragraph break? or do I need to add extra coding? And how would the html to LRF conversion go using those tags instead? Basically, I've concluded that while I may not go back and re-do the coding for my previous conversions I could try moving ahead with a new code that would work for LRF, Epub, and Mobi.

Thanks for your help.
Amalthia is offline   Reply With Quote
Old 02-10-2009, 07:59 AM   #79
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
Quote:
Originally Posted by Amalthia View Post
what would happen if i just applied <div> text here</div> to a line of text? would the create a line break or a paragraph break?
The tags are just places to hang CSS off of. The <div/> tag creates a block-level element with no extra margins or indent by default, so with no extra CSS it will just make whatever is within the element have line breaks before the start tag and after the end tag.

But what I was suggesting was literally just put the entire document in a single <div/>. Try right after your <body> tag adding a <div> tag and right before your </body> tag adding a </div> tag. That will make sure that none of your <br/> tags are direct children of the <body/> element.
llasram is offline   Reply With Quote
Old 02-10-2009, 03:46 PM   #80
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by llasram View Post
The tags are just places to hang CSS off of. The <div/> tag creates a block-level element with no extra margins or indent by default, so with no extra CSS it will just make whatever is within the element have line breaks before the start tag and after the end tag.

But what I was suggesting was literally just put the entire document in a single <div/>. Try right after your <body> tag adding a <div> tag and right before your </body> tag adding a </div> tag. That will make sure that none of your <br/> tags are direct children of the <body/> element.
actually, that's kind of brilliant and if it works then it'll make my life so much easier for converting documents. Will try it tonight.

Um, not to beat a dead horse but just to be sure. Will this affect converting to LRF? Or should my previous <p> and <br> work like they have been so far?

Mostly, I just want paragraph indents for <p> and no space between paragraphs. And <br> to just add a line break. I'm kind of shooting to have a uniform standard for mobi, lrf, and epub.

Again thanks for your help! Obviously, I still have much to learn about html and css.
Amalthia is offline   Reply With Quote
Advert
Old 02-10-2009, 04:16 PM   #81
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by Amalthia View Post
When I learned html coding in college <br> tags were part of the learning experience. Last time I checked <br> is valid html coding.
<br> and <br/> is not the same thing. <br> only is not valid in XHTML.
tompe is offline   Reply With Quote
Old 02-10-2009, 05:38 PM   #82
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by tompe View Post
<br> and <br/> is not the same thing. <br> only is not valid in XHTML.
so if I switched out all my <br> with <br/> then my line breaks would work properly when converting to mobi?
Amalthia is offline   Reply With Quote
Old 02-10-2009, 05:46 PM   #83
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: 43,981
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Amalthia View Post
so if I switched out all my <br> with <br/> then my line breaks would work properly when converting to mobi?
As far as calibre is concerned there is no difference between <br> and <br/>

You should try embedding everything in a <div> like llasram suggested. It shouldn't make any difference to the LRF conversion and it will allow you to use <br> as you want for epub and mobi conversion
kovidgoyal is offline   Reply With Quote
Old 02-10-2009, 06:07 PM   #84
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,161
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by kovidgoyal View Post
As far as calibre is concerned there is no difference between <br> and <br/>

You should try embedding everything in a <div> like llasram suggested. It shouldn't make any difference to the LRF conversion and it will allow you to use <br> as you want for epub and mobi conversion
Okay, that's what I needed to know.

Thanks for your patience.
Amalthia is offline   Reply With Quote
Old 02-11-2009, 08:16 PM   #85
Bob Butler
Connoisseur
Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.
 
Posts: 85
Karma: 11090
Join Date: Sep 2008
Device: Kindle, iPhone
Conversion of symbols

I have an HTML file (extracted from an ereader pdb if it matters) that I converted with any2mobi 0.4.136.

Symbols such as the copyright symbol, colons and hyphens don't convert properly, they show as a boxed '?' symbol.

My Kindle recently upgraded to the 1.2 firmware, I don't think I had this problem before with 1.08.

When I use html2mobi instead of any2mobi, the conversion works properly. I'm wondering if there is possible a charset or language setting in the metadata that needs to be set properly for the new Kindle firmware?

Bob
Bob Butler is offline   Reply With Quote
Old 02-11-2009, 09:01 PM   #86
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
@Bob: Sounds like a possible encoding detection bug in calibre. Can you check the any2mobi output in Mobipocket Desktop? And if it's messed up there too, could you go ahead and open a ticket on the calibre trac and attach a copy of the input file?
llasram is offline   Reply With Quote
Old 02-11-2009, 09:36 PM   #87
Bob Butler
Connoisseur
Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.Bob Butler can tame squirrels without the assistance of a chair or a whip.
 
Posts: 85
Karma: 11090
Join Date: Sep 2008
Device: Kindle, iPhone
Quote:
go ahead and open a ticket
Done. I was able to include just a few lines that demonstrate the issue.

I'm not sure the HTML attachment was correct (it didn't display correctly when I clicked through) so I zipped it and attached the zip too.
Bob Butler is offline   Reply With Quote
Old 02-12-2009, 06:52 PM   #88
mtravellerh
book creator
mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.
 
mtravellerh's Avatar
 
Posts: 9,635
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: PB360°
Just a small question:

I have tried to create mobi files per Calibre lately and the results turn out quite all right. The only thing that really bugs me is the size of those mobi files. They are nearly twice the size of the epub files every time. This is definitely not normal as the same files created by the Mobipocket creator are only slightly bigger than the epub files.

Is that a known problem or is there some mistake in my procedure (import xhtml and a cover, create lrf, epub, mobi files from the zip)? This happens regularly, so it is not a one time thing.

I tried creating mobi files from epub with the same result.
mtravellerh is offline   Reply With Quote
Old 02-12-2009, 07:11 PM   #89
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: 43,981
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The GUI doesn't have an option to enable compression for mobi output. You have to use the commandline any2mobi with the option --compress
kovidgoyal is offline   Reply With Quote
Old 02-12-2009, 07:50 PM   #90
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by kovidgoyal View Post
The GUI doesn't have an option to enable compression for mobi output. You have to use the commandline any2mobi with the option --compress
Is that standard compression? or high (huffdic) compression?
nrapallo is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
main menu, section menu, css for calibre mobipocket output naisren Calibre 2 08-23-2010 11:42 PM
Trying to get consistent look to all output daveps Calibre 0 03-08-2010 02:18 PM
Anyone Have mobipocket desktop? Mobipocket server is down. Ireadfreely Kindle Formats 3 10-27-2008 10:29 AM
convert from 'new' mobipocket to 'old' mobipocket? Indigo Ink Kindle Formats 11 06-22-2008 01:43 AM
Mobipocket Reader 4.8 and Mobipocket eNews Creator Mobipocket Reading and Management 1 01-29-2004 08:03 AM


All times are GMT -4. The time now is 09:29 PM.


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