ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* escaping filenames with externalfigure
@ 2007-12-27 14:09 Santy, Michael
  2007-12-27 14:55 ` Hans Hagen
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Santy, Michael @ 2007-12-27 14:09 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 906 bytes --]


Is there a way to escape special characters in filenames passed to externalfigure.  I'm encountering the situation where users are choosing images that may contain brackets or curly braces (e.g., flower[1].jpg or flower{1}.jpg).  If I pass filename containing these characters directly to externalfigure, the closing bracket is mistaken for the end of the filename.
\externalfigure[flower{1}.jpg] % works
\externalfigure[flower[1].jpg] % doesn't work

I then tried to define a variable that holds the filename and pass that variable to externalfigure, but it ran into problems with curly braces.

\def\myimagefilename{flower[1].jpg} 
\externalfigure[\myimagefilename] % works

\def\myimagefilename{flower{1}.jpg}
\externalfigure[\myimagefilename] % doesn't work

Does anyone have any idea how I could handle arbitrary filename inputs that contain brackets and curly braces?

Cheers,
Mike

[-- Attachment #1.2: Type: text/html, Size: 1364 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2008-01-03 13:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-27 14:09 escaping filenames with externalfigure Santy, Michael
2007-12-27 14:55 ` Hans Hagen
2007-12-27 15:02   ` Santy, Michael
2007-12-27 14:56 ` Hans Hagen
2007-12-27 15:05   ` Santy, Michael
2007-12-27 15:09   ` Wolfgang Schuster
2007-12-27 15:00 ` Wolfgang Schuster
2007-12-27 15:16   ` Santy, Michael
2007-12-27 15:27     ` Wolfgang Schuster
2007-12-27 15:58       ` Santy, Michael
2007-12-28 23:19         ` Hans Hagen
2008-01-03 13:35           ` Santy, Michael

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).