OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Converting Docbook epub to Kindle shows warnings


Hi Bob and Robert,

Things get curiouser and curiouser:-). It looks like kindlegen does pretty much the same conversion as the previewer.

When I use the kindle app on my Macbook, the variable lists (i.e., dl lists) do not nest, but when I run the same file on the previewer, of in the app on my iphone, it works fine.

So, the problem may be viewer specific. The only difference is that kindlegen complains about this and provides false notes about closing off tags, while the previewer is silent.

Bob, can you post or send me your modification of autoidx.xsl? Iâd like to try it out, and Iâm glad to be a tester. And does this index generate page number

Best regards,
Dick 

P.S. Iâm going to get Solar Dividends, too. The topic is interesting, and Iâd like to see the results of that autoidx.xsl. Thanks for making it available as a free ebook.
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton@xmlpress.net



> On Mar 20, 2020, at 09:13, Bob Stayton <bobs@sagehill.net> wrote:
> 
> The index in my Power Shift ebook does not use dl, dt, and dd in the epub xhtml.  I gave up on them and rewrote autoidx.xsl to output div elements instead, with CSS to supply the indents.  In a nutshell:
> 
> <dl>  became <div class="dl">
> 
> <dt> became <div class="dt">
> 
> <dd> became <div class="dd">
> 
> That's it.  Since the divs are already nested by the indexing templates, it turns out that the only CSS I needed was:
> 
> div.dd {
>   margin-left: 2em;
> }
> 
> I had intended to fold this back into the next release, so thanks for reminding me about this.
> 
> By the way, if you liked Power Shift, you should check out my new book Solar Dividends which describes how to use solar energy to eliminate poverty in the world.
> Bob Stayton
> 
> bobs@sagehill.net
> On 3/19/2020 9:16 PM, Robert Nagle wrote:
>> This is very interesting to me.  I have tried for two  projects to generate indexes that would work on Kindle. The indexterm content had both a primary and secondary level. Everything would look good in epubs on epub reading systems(and be valid, etc), but in mobipocket it would render inconsistently the elements in the index -- sometimes indenting, sometimes putting them on the same line. It was a mess. Even though it rendered fine in Kindle Previewer on all simulated devices, the dl, dt, dd just scrambled everything on Kindle app for android as well as on e-ink Paperwhites. 
>> 
>> I spent a  lot of time trying to troubleshoot (and the details were fuzzy), but concluded that the problem lay not with docbook but with kindlegen (or maybe the css support on kindle reading systems). It's frustrating because having a good multilevel index is standard on many nonfiction ebooks.  
>> 
>> On the other hand, when looking at Bob's POWER SHIFT ebook (which came out a few years ago), the index rendered fine on Kindle. - although in that ebook, it used page numbers for an ebook. 
>> 
>> (In my projects, I used   <xsl:param name="index.prefer.titleabbrev" select="1"></xsl:param> and   <xsl:param name="index.links.to.section" select="0"></xsl:param> )
>> (I could provide an ebook example if you need) 
>> 
>> BTW, never got around to saying it, but Bob I enjoyed Power Shift ebook 
>> 
>> Robert Nagle 
>> 
>> 
>>  
>> 
>> 
>> 
>> From: Richard Hamilton <hamilton@xmlpress.net>
>> To: Lars Vogel <lars.vogel@gmail.com>
>> Cc: Jason Zech <zech@loyolapress.com>, DocBook Apps <docbook-apps@lists.oasis-open.org>
>> Bcc: 
>> Date: Thu, 19 Mar 2020 18:42:50 -0700
>> Subject: Re: [docbook-apps] Converting Docbook epub to Kindle shows warnings
>> Hi Lars,
>> 
>> I know this is from a long time ago, but I just ran into the same problem with a file that nests variable lists using the list-presentation=âblocksâ processing instruction.
>> 
>> In that case, the XHTML5 (this is with 1.79.2, building an epub3) is valid, but kindlegen doesnât like the nesting. It closes off the highest level <dl> and <dd> elements and flags some <dt> elements as being invalid.
>> 
>> The result doesnât lose any content, but it removes the nesting and flattens everything to one level.
>> 
>> As with your case, the epub is valid and when displayed, the nesting is fine.
>> 
>> At this point, Iâm convinced that the problem is in kindlegen. I just used the Kindle previewer, which wasnât available in 2012, and it created a .mobi file that preserves the nesting (at least on the devices I tried in the previewer).
>> 
>> Anyway, this is probably way to late to help, but I figured Iâd add it to the thread in case someone runs into it in the future, since it is still a problem using kindlegen.
>> 
>> Best regards,
>> Dick Hamilton
>> -------
>> XML Press
>> XML for Technical Communicators
>> http://xmlpress.net
>> hamilton@xmlpress.net  
>> 
>> -- 
>> Robert Nagle
>> 5115 Sandyfields Ln Katy, TX 77494
>> (Cell) 832-251-7522



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]