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] Do callouts on images work?


On Tue, 12 Apr 2011 16:28:07 +0100
Chris Ridd <chrisridd@mac.com> wrote:

> I've got a bunch of screenshots containing hand-drawn arrows and
> annotations that I think would be better done as callouts, but I
> don't seem to be able to get callouts rendering properly to PDF.
> 
> Do they actually work?
> 
> If they do, does anyone have a working example they could share?
> Here's my non-working XML:
> 
>     <mediaobjectco>
>       <imageobjectco>
>         <areaspec units="calspair">
>           <area coords="5000,5000 5100,5100" id="p1" linkends="c1"/>
>         </areaspec>
> 
>         <imageobject>
>           <imagedata fileref="/path/to/screenshot.png" scale="50"/>
>         </imageobject>
> 
>         <calloutlist>
>           <callout arearefs="p1">
>             <para>Here I am in the middle.</para>
>           </callout>
>         </calloutlist>
>       </imageobjectco>
>     </mediaobjectco>
> 
> [I'm not sure what purpose the linkends="c1" serves, if any.]


  <example xml:id="inline1">
	<title>e</title>
 
	
      <programlisting>

 &lt;xsl:template match="para">
  &lt;fo:block>    <co xml:id="ls1"/>
      &lt;xsl:apply-templates/>
    &lt;/fo:block>
  &lt;/xsl:template>

  &lt;xsl:template match="emphasis[@role='warning']">
&lt;fo:inline background-color="red">Warning:&lt;/fo:inline>  <co
  xml:id="ls2"/> &lt;xsl:apply-templates/>
    &lt;/xsl:template>
             

</programlisting>

      <calloutlist>
	<callout arearefs="ls1">
	  <para></para>
	</callout>
	<callout arearefs="ls2">
	  <para></para> </callout>

      </calloutlist>
     
</example>	


That's the format I find works well for both HTML and PDF.

HTH

-- 

regards 

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


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