ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xml syntax for \externalfigure
@ 2011-06-03 19:23 Thomas A. Schmitz
  2011-06-03 19:57 ` Aditya Mahajan
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas A. Schmitz @ 2011-06-03 19:23 UTC (permalink / raw)
  To: mailing ConTeXt users list for

Hi all,

I'm pulling my hair - thought this was easy, but turns out to be more difficult. The \externalfigure command can take a width and/or a height parameter, and context will be happy to take either one into account. I'm trying to translate that into xml syntax. Here's a minimal example that I can't make work. If anyone can explain what to do here, I might be able to work this out (or will be back with more questions :-)

\startbuffer[test]
<a>
  <externalfigure height="1cm" resource="hacker"/>
</a>
\stopbuffer

\startxmlsetups xml:testsetups
\xmlsetsetup{\xmldocument}{a|externalfigure}{xml:*}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:a
  \xmlflush{#1}\par
\stopxmlsetups 

\startxmlsetups xml:externalfigure
  \externalfigure[\xmlatt{#1}{resource}]
                 [\doifnotempty{\xmlatt{#1}{height}}{height=\xmlatt{#1}{height}}]
\stopxmlsetups

\starttext
\xmlprocessbuffer{main}{test}{}
\stoptext 

The "height" attribute is not taken into account - why? 

All best

Thomas
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-06-04 20:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-03 19:23 xml syntax for \externalfigure Thomas A. Schmitz
2011-06-03 19:57 ` Aditya Mahajan
2011-06-03 20:19   ` Thomas A. Schmitz
2011-06-03 20:28     ` Thomas A. Schmitz
2011-06-03 20:50     ` Hans Hagen
2011-06-03 20:56       ` Thomas A. Schmitz
2011-06-03 22:14         ` Peter Münster
2011-06-03 22:24           ` Hans Hagen
2011-06-04 20:35           ` Thomas A. Schmitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).