docbook-apps

  • 1.  Image callouts and roles

    Posted 09-29-2011 10:30
    I'm using role attributes and the docbook stylesheets (successfully) to use one image format when rendering to FO, and other when rendering to HTML (i.e. epub).


    <mediaobject>
    <imageobject role="fo">
    <imagedata fileref="images/DIT-local.pdf"/>
    </imageobject>

    <imageobject role="html">
    <imagedata fileref="images/DIT-local.png"/>
    </imageobject>


    However I have a couple of images using callouts, and using roles like that doesn't seem to work:

    <screenshot>
    <mediaobject>
    <imageobjectco role="fo">
    <areaspec>

    </areaspec>

    <imageobject>
    <imagedata fileref="images/MVC-DIT-structuresvg" scale="50"/>
    </imageobject>
    </imageobjectco>
    <imageobject role="html">

    <imagedata fileref="images/MVC-DIT-structure.png" scale="50"/>
    </imageobject>
    </mediaobject>
    </screenshot>

    The SVG is just a wrapper that references the similarly named PNG and then adds some callout bugs.

    Rendering that to FO results in two images side-by-side. Not sure if that's a bug, or expected behaviour. It isn't what I want though.

    However if I change the second imageobject to an imageobjectco, which seems the logical structure, the is problematic - I have a single calloutlist that needs to refer to the "same" callout in either image. And I can't have two s with? have the same xml:id :-(

    I hate image callouts! :-)

    Is there a more correct way to organize my two alternate images?

    Cheers,

    Chris