The problem that I've found with that approach is that the braces have to be balanced.

\def\myimagefilename{flower{1.jpg} % doesn't work
\def\myimagefilename{flower{1}.jpg} % works


-----Original Message-----
From: ntg-context-bounces@ntg.nl on behalf of Wolfgang Schuster
Sent: Thu 12/27/2007 9:27 AM
To: mailing list for ConTeXt users
Subject: Re: [NTG-context] escaping filenames with externalfigure

> Wolfgang,
>
>  Thanks for the suggestion.  However, I'm using ConTeXt to typeset arbitrary
> XML input from users (and therefore arbitrary image filenames).  While your
> idea works for the two examples that I gave, it doesn't work if the curly
> braces aren't balanced in the filename (e.g., "flower{1.jpg").  Is there any
> general character escaping mechanism for macro arguments?
>
>  Cheers,
>  Mike

If you use xml as input format you could save the file name in a temporary
macro and use this macro now in the \externalfigure command. You already
gave a example for this.

Wolfgang
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________