[NTG-context] xml - handling of figures

R. Ermers, Midden Oosten Perspectief r.ermers at hccnet.nl
Sun Mar 6 11:34:30 CET 2011


Dear all,

I converted a latex file to xml docbook by means of pandoc. In intend to process the file with context. The first results are very promising.

I have some questions on processing graphics.

The source file looks like this:

        <inlinemediaobject>
            <imageobject>
              <imagedata fileref="plaatje1.jpg" scale="1.2"/>
            </imageobject>
          </inlinemediaobject>

        <inlinemediaobject>
            <imageobject>
              <imagedata fileref="plaatje1.jpg" width="30mm" height="25mm"/>
            </imageobject>
 <caption><para>caption to this wonderful cow<para></caption>
 </inlinemediaobject>


        <inlinemediaobject>
            <imageobject>
              <imagedata fileref="plaatje1.jpg" width="30mm" height="25mm"/>
            </imageobject>
          </inlinemediaobject>

(see also http://www.docbook.org/tdg5/en/html/imageobject.html)

I defined the setups as follows:

\startxmlsetups xml:inlinemediaobject:imageobject:imagedata
\placeedgefigure{}{\framed[frame=off]{\setlayer[graphics]{\externalfigure[\xmlatt{#1}{fileref}]}}}
\stopxmlsetups

Context places the figures nicely in the file. So far so good!

Now I would like to use:

1. the scaling information in the scale attribute
2. in some instances the image is not scaled, but needs to be enlarged according to a fixed height and width.

3. I would like to print the caption.

I looked into Hans' documents on xml, but the examples are different from those that I have. At least, I seem not to understand them.

Does anyone have an advice?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20110306/127fdffa/attachment-0001.html>


More information about the ntg-context mailing list