[NTG-context] Handling EMBED tag in Tex

Wolfgang Schuster schuster.wolfgang at googlemail.com
Thu Jan 6 09:02:22 CET 2011


Am 06.01.2011 um 04:42 schrieb Anand Raj:

> Hi,
> 
> I have embed tags in my xhtml can i render it in my pdf. 
> 
> How should I form the .tex file to handle this?
> 
> <embed type='image/svg+xml' align='middle' width='200' height='200' src='/javascript/d.svg' script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],"44","above");text([3.5,2],"44","right");stroke="red";fontfill="red";line([1,0],[1,4]);text([1,2],"?","right");' />

Write the whole block to a external file and read import it them with \externalfigure.

\startxmlsetups xml:embed
   \setbuffer[embed]\xmlflush{#1}\endbuffer
   \savebuffer[embed][embed.svg]
   \externalfigure[embed.svg]
\stopxmlsetups

Wolfgang



More information about the ntg-context mailing list