Regarding the issue of empty titlepage div creating problems:
> with them in epub2. I found that when sidebar is outputted to xhtml,
in the output , and for
> me at least it caused major difficulties rendering in the browser.
I looked at that bug before releasing 1.77.1 and didn't see a good way to
fix it. The titlepage templates are generated from the titlepage spec file
using template/titlepage.xsl, and any fix seemed to involve all elements
with titles. I just looked again and came up with this customization
workaround for sidebar:
<xsl:template match="d:sidebar">
<xsl:call-template name="common.html.attributes"/>
<xsl:call-template name="id.attribute"/>
<xsl:call-template name="anchor"/>
<xsl:variable name="titlepage">
<xsl:call-template name="sidebar.titlepage"/>
</xsl:variable>
<xsl:if test="count(exsl:node-set($titlepage)/descendant-or-self::*)
> 1">
<xsl:copy-of select="$titlepage"/>
</xsl:if>
<xsl:apply-templates/>
</xsl:template>
This version puts the titlepage stuff into a variable and then tests to see
if the results have more than one element. If there is a single element
(which would be the case for an empty div), then the empty div is not
output. I only did a couple of tests with this change, so let me know if it
does or does not work for you.
Bob Stayton
Sagehill Enterprises
bobs@sagehill.net--------------------------------------------------
From: "Robert Nagle" <
idiotprogrammer@gmail.com>
Sent: Friday, October 12, 2012 7:43 PM
To: <
docbook-apps@lists.oasis-open.org>
Cc: <
afx@afximages.com>; <
zech@loyolapress.com>
Subject: [docbook-apps] re: How to create sidebars for epub3?
> Jason, one thing that you should remember is that Amazon recently made
> the Kindle 3s support KF8. Kindle 3s were available as early as Fall,
> 2010, so that did wonders for backward compatibility. Ideally one
> would like to support everything, but I think people trade up their
> ebook devices a lot more regularly than their laptop for example. The
> Kindle 4 (i.e., Kindle Touch) now sells for $70. I just can't imagine
> that there are many Kindle 1 and 2 owners who have refused to trade up
> to a 70$ device. So I am comfortable igoring the mobi7 for my ebooks
> (although I do try to make sure it's not sucky in Kindle Previewer).
>
> I haven't tried sidebars in epub3, but I played around pretty heavily
> with them in epub2. I found that when sidebar is outputted to xhtml,
> it adds an extra
in the output , and for
> me at least it caused major difficulties rendering in the browser.
> (and probably in the epub reader). I even filed a bug about it.
>
http://sourceforge.net/tracker/?func=detail&aid=3083800&group_id=21935&atid=373747> (Make sure to expand to read the comments) I don't know if this bug
> report is still relevant though.
>
> It led me to devise workarounds so I didn't need to use a sidebar on
> epub files.
>
> I wanted sidebars to do pullquotes and as a container for image +
> caption. I ended up making templates for images + captions which did
> not suck instead. (i'll be happy to share them, but I put them on my
> epub-docbook dump page . It's the first 2 points.
>
http://www.imaginaryplanet.net/weblogs/idiotprogrammer/2010/11/ebookepub-production-secrets-tips-tricks/>
> With mobipocket 7, it was impossible to make any kind of floating
> sidebars (or floating ANYTHING); the formatting guide said the only
> way to approximate a sidebar was to begin and end it with an hr. So
> you'd have to do major transformations to the mobi7 output to make it
> work.
>
>
> One final thing with regard to sidebars and new ebook readers. Even if
> the sidebars render properly (and I think we're finally at the point
> where that is indeed possible), the reading devices of 4x6 inches
> don't really let you use sidebars very well. Obviously they would look
> better in something with the form factor of an ipad (and you can use
> media queries in kf8 and epub3 devices to take advantage of them), but
> on the smaller 4x6 sidebars don't give you much. The only case I could
> think of for sidebars was a small floating image (less than half the
> size of the width). The problem is that the body of the text next to
> the sidebar would only be half as wide and would look awkward on a
> page.
>
> If I were writing css media queries, I would probably hide the
> sidebars altogether from the 4x6 devices.
>
> Anyway, those are my thoughts.
>
>
>
>
> --
> Robert Nagle
> 6121 Winsome Ln #56C, Houston TX 77057-5581
> (H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
>
http://www.robertnagle.info>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
docbook-apps-unsubscribe@lists.oasis-open.org> For additional commands, e-mail:
docbook-apps-help@lists.oasis-open.org>
>
>