On 08/06/2017 12:05 PM, Hans Hagen wrote:
> On 8/6/2017 11:37 AM, Pablo Rodriguez wrote:
>> [...]
>> How can I define the external figure so I concatenate the image file
>> names in the code above?
>>
>> I mean, \xmlconcat is great, but I don’t see how I could make it work to
>> get values from the src attribute.
> 
> why do you want to pass multiple names to \externalfigure

Many thanks for your reply, Hans.

My code was wrong, I need two external figures, not one. I only get the
same image repeated twice. I don’t know how to solve it.

This is what I have in the XML file:

    <div class="sidebyside">
        <p><img src="img/first-image.png" />
           <img src="img/second-image.png" /></p>
    </div>

This is what I tried in the environment file:

    \startxmlsetups xml:sidebyside
        \blank\startalign[center]
            \dontleavehmode
            \externalfigure[\xmlattribute{#1}{./p/img}{src}]
                [width=.5\textwidth]
            \externalfigure[\xmlattribute{#1}{./p/img}{src}]
                [width=.5\textwidth]
        \stopalign\blank
    \stopxmlsetups

And this is what I need in pure ConTeXt:

    \blank\startalign[center]
        \dontleavehmode
        \externalfigure[img/first-image.png][width=.5\textwidth]
        \externalfigure[img/second-image.png][width=.5\textwidth]
    \stopalign\blank

How could I achieve the second? (Concatenation is the only thing that
comes to my mind.)

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to