![]() |
#16 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
Kindlegen converts CSS font sizing into the <font> tag with the size attribute. It correctly converts things like percentages to relative sizes , e.g. +2. Unfortunately, the Kindle rendering engine incorrectly renders these relative sizes, always rendering them relative to the base font size chosen by the user, not the current font size of the text. Mobipocket Reader does render them correctly. Oh dear. And Kindle for Mac and Kindle for PC also render them 'correctly', just not the same as an actual Kindle! The Kindle Previewer does render them like a Kindle. Bloody Amazon! It's impossible to make books in Kindle format that look right on Kindle for Mac and Kindle for Pc and on actual Kindles! I haven't had a chance yet to test Kindle for iPod/iPhone. I wonder which code base that was taken from. Bah! |
|
![]() |
![]() |
![]() |
#17 |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
Kindle Previewer does have iPhone simulation mode. While it's obviously not the same as the real thing, it does seem somewhat better at doing its job than the other Amazon-provided tools. At least, it mimics my K2's display with reasonable accuracy on the stuff I've tried.
But this, really, is why I personally prefer ePub as a format overall despite a lot of people claiming that Mobi's just as good. At least when something goes wrong, I have the luxury of being able to think it's probably some error in 1) my file formatting or 2) the reader's rendering, or perhaps some combination of both, rather than having to wonder if it's 3) the officially-supplied assembly tools being wrong and bad. Incidentally, now that you've written the bloat-stripper to go along with mobiunpack, do you think it might be too much trouble to tweak either to optionally output a copy of the original source files that Amazon now insists the Kindlegenerated output includes? I admit to a certain morbid curiosity regarding the occasional text whose formatting was so messed-up that I wondered how on earth they'd managed to acheive that effect, and it would be kind of nice to be able to possibly indulge it on future such examples that might come up, assuming they'll have been made with Amazon's tools. |
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
Ok, it seems there's a mysterious 16 byte header in front of the zip file. I'm going to strip that and just output the zip file, printing the sixteen bytes as hexadecimal to the standard output. |
|
![]() |
![]() |
![]() |
#19 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
I'd be interested to hear (in that thread) how you get on with it. |
|
![]() |
![]() |
![]() |
#20 |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
Thanks! Appreciate very much that you took the time to modify your script.
It'll probably be a while before a new enough "published" freebie shows up in the Amazon store that I can try it on (though maybe some of those recent "Free with Bonus Content" promo editions might qualify). But in the meantime I think I'll make some sacrificial conversions with Kindlegen 1.1 build 99 and see how they stack up both size-wise etc. against files generated with build 98 and Kindlegen 1.0 (which I've still got installed) when I've got a free moment, and report in the other thread. One potential vague upside I can see to the bloat now being enforced default is the possibility of taking future Kindlegenerated Mobi files from elsewhere with annoying problems, and being able to lay hands on the actual source to see where things originally went wrong, instead of having to unpack the Mobi to html and poke around and guess. |
![]() |
![]() |
Advert | |
|
![]() |
#21 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
Hanging Indents are only supported for pixels, points and percentage. And the support for percentage is new in K4Mac/K4PC - the last Mobipocket Reader for Windows did not do a hanging indent with w negative percentage. This is good news and bad news. It's good news in that at least hanging indents can be done. It's bad news in that they can't be specified in a way that will scale with the text. It also shows that the Kindle firmware isn't based on the old Mobipocket software at all. As far as I can see, they must have written the Kindle code from scratch, based on a specification derived from the Mobipocket software in some way. And they did it better in some areas (negative indents) and worse in others (relative font sizes, poetry alignment). So to make a kindle ebook that makes use of indents, hanging indents and font sizes, it's going to be necessary to severaly restrict what's used just to make sure it renders correctly on all the Kindle renderers from Amazon that are out there. Let alone trying to make the source work with ePub as well. I am beginning to think that it might be best to have a base source text of XHTML that's marked up with semantic styles, and then have some scripts that hack that into source suitable for Kindle and for ePub. But I'd really hoped to be able to avoid that — I'd rather hoped Kindlegen was going to do the hard work for me. Not so, I think. |
|
![]() |
![]() |
![]() |
#22 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
|
A great discussion; I'm glad I found it.
I have regularly used hanging/negative indentation for bibliographies. I use .3in indent and hanging indent. Are you aware of Amazon's guide to the Kindle? http://g-ecx.images-amazon.com/image...Guidelines.pdf |
![]() |
![]() |
![]() |
#23 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
It also has nothing to say about font sizes. Amazon's Kindle formatting guidelines are quite poor in terms of precise detail. If you just want paragraphs of plain text they're fine. I think it's the inconsistency between the different Kindle platforms that upsets me most. |
|
![]() |
![]() |
![]() |
#24 | |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
Quote:
But yeah, it's really irritating that one has to not only jump through hoops to get a decent display, but that the hoop-jumping is also kind of wasted because you're not even going to benefit from consistent display across the group of problem devices. |
|
![]() |
![]() |
![]() |
#25 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
Thanks! |
|
![]() |
![]() |
![]() |
#26 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
It'll be quite a lot of work, but I think it might be worth it. Wow. |
|
![]() |
![]() |
![]() |
#27 |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
Myself, I'd go even further and switch over to having XML as my sources. Why settle for doing <span class="dialogue" xml:lang="fr"> when you can do a simple <fr-dlg> or you can go straight to:
Code:
<recipe> <title>Boiled Water in a Pan</title> <ingredient qty="2" measure="L">water</ingredient> <instructions> <step no="1">Don't set the stove on fire while turning it on.</step> </instructions> </recipe> The great thing about XML is that you can keep the content you're working on nice and cleanly semantic, and separate out dealing with the messy display quirks for the final output version. You've probably already come across all this, but just in case: Late Night Software has a bunch of free AppleScript Scripting additions for XML and XSLT, and the Smile people have an XMLLib one, along with some other possibly useful stuff. Todd Ditchendorf's also written up a bunch of useful tools that integrate with Safari and are mostly BSD licensed on Google Code. Good for testing things. Some of them are kind of hidden away on his website due to some sort of reorg or something, so: AquaXSL, AquaPath, XSLPalette. And I've generally found Marc Liyanage's TestXSLT useful for doing just what is says on the box. Helps one get the hang of things. |
![]() |
![]() |
![]() |
#28 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
Hmm.... I may be some time..... |
|
![]() |
![]() |
![]() |
#29 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,590
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
I should even be able to come up with an XSLT to convert to XPressTags and Indesign tagged Text, if I can't find any out there already. |
|
![]() |
![]() |
![]() |
#30 |
Wizzard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
|
For XML-based book standards, Text Encoding Initiative's working on it. Also DocBook, which I see you've found while I was previewing my post. Several tools available for generating HTML/ePubs from both, too.
On Google Code there's epub-tools from ThreePress, who've a nice ePub blog here. They love to show off nifty proposed stuff that will presumably be available in future versions of ePub. Their toolset includes the python-based tei2epub and docbook2epub, and some Java-based stuff. There's also tei2html which is a work in progress, but is also the project of a fellow MR member. Hope this helps. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Applescript Wrapper Application for Kindlegen | pdurrant | Kindle Formats | 50 | 02-18-2020 01:16 AM |
Anyone using Kindlegen? | simonp | Kindle Formats | 11 | 09-16-2011 05:17 AM |
KindleGen: Warning(SA): SA failed | hkdorama | Kindle Formats | 4 | 03-17-2011 11:35 PM |
KindleGen 1.1 | pdurrant | Kindle Formats | 0 | 08-08-2010 06:18 AM |
Kindlegen now for Mac OS X (Intel) | pdurrant | Kindle Formats | 4 | 04-27-2010 02:46 PM |