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] How to create sidebars for epub3?


Just to be clear: you can float a sidebar to the side in KF8 just as in epub. But on older Amazon devices that don't support KF8, it won't work. It's beastly, but a KF8 file has to be built to degrade into the mobi7 format on older non-KF8 devices. A mobi file generated via KindleGen is actually 2 bundled files--KF8 and mobi7 (the older file format). If a device cannot read KF8, it will read the mobi7 file in there. When you write your CSS before using KindleGen, you have to use something like media-queries to account for both file types, since they have different levels of CSS support. Or just test for acceptable degradation.

If you don't care about users of older non-KF8 devices, you can ignore that and just style for KF8. It's not an unreasonable decision, depending on your audience. And over time, the feasibility of abandoning mobi7 development entirely will increase. 

Hope that helps. 
________________________________________
From: Andreas F.X. Siegert [afx@afximages.com]
Sent: Friday, October 12, 2012 9:43 AM
To: docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] How to create sidebars for epub3?

on 12.10.2012 16:09 Jason Zech said the following:
> I haven't yet tried working with epub3, but I've done a lot of work with
> epub 2 and mobi/kf8. In order to place a proper sidebar, you need to check
> your CSS. DocBook will generate the appropriate sidebar div, but you need
> CSS to place it.

Thanks Jason, your example put me on the right track for the sidebars!

That lead me to believe for regular figures I could use
div.figure-title{
   text-align: center;
}
But I seem to be on the wrong track here ;-(

>
> I've done several sidebars in epub 2, using the float property. It also
> works in KF8. You cannot float to the side in mobi, but you can center align
> a sidebar between paragraphs.
Yuck.
I thought real sidebars was one of the main features of KF8.
Drat. I have quite a lot of sidebars in that book and having them as
centered images will suck major.

Looks like I will still only offer PDF ;-(

cheers
afx

>
> Here's sample CSS I use for a simple sidebar that actually floats to the
side. You can also do further manipulate of borders, etc as needed.
>
> div.sidebar{
>     margin:0em .8em 0em 0em;
>     padding-top:.3em;
>     width:10em;
>     float:left;
>     position:relative;
> }
> ________________________________________
> From: Andreas F.X. Siegert [afx@afximages.com]
> Sent: Friday, October 12, 2012 8:24 AM
> To: docbook-apps@lists.oasis-open.org
> Subject: [docbook-apps] How to create sidebars for epub3?
>
> Hi,
>
> I do have an ebook that is written in docbook and delivered as PDF.
> So far I have refrained from shipping epub/mobi as they had no sidebars, but
> now with epub3 and KF8, that should work I thought. But I seem to be missing
> something.
>
> So far sidebars show up smack in the middle (I use the firefox epub
> extension for testing).
>
> This is how they look like in the XML source:
> <sidebar>
>   <informalfigure>
>      <mediaobject>
>         <imageobject>
>            <imagedata fileref="images/WB-presets.jpg" format="JPG"
>                       width="100%" scalefit="1" align="inside" />
>         </imageobject>
>      </mediaobject>
>   </informalfigure>
> </sidebar>
>
> This is what I see in the epub:
> <div class="sidebar" epub:type="sidebar">
>   <div class="titlepage" />
>     <div class="informalfigure">
>        <div style="align: inside; " class="mediaobject">
>           <table style="border: 0; border-spacing: 0; padding: 0;
>                         width: 100%; ">
>           <tr>
>              <td style="align: inside; ">
>                <img style="align: inside; width: 100%; "
>                     src="images/WB-presets.jpg" />
>              </td>
>
>        </table>
>     </div>
>   </div>
> </div>
>
> I use eta3 of the epub stylesheets from sourceforge.
> Am I missing some form of customization?
> Any examples appreciated.
>
> thx
> afx
> --
> http://afximages.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>


--
http://afximages.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org



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