From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38306 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: escaping filenames with externalfigure Date: Thu, 27 Dec 2007 15:55:35 +0100 Message-ID: <4773BCE7.60605@wxs.nl> References: <6703815B292B664DBAEC55EE3192386A20BD6F@poseidon.in.dynetics.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1198767413 32088 80.91.229.12 (27 Dec 2007 14:56:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2007 14:56:53 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 27 15:57:07 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1J7uAR-0004hh-Ix for gctc-ntg-context-518@m.gmane.org; Thu, 27 Dec 2007 15:57:03 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C0FFB1FB7F; Thu, 27 Dec 2007 15:56:30 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23059-05-6; Thu, 27 Dec 2007 15:56:21 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0ADE31FB8E; Thu, 27 Dec 2007 15:56:21 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7B8911FB8E for ; Thu, 27 Dec 2007 15:56:19 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23059-05-5 for ; Thu, 27 Dec 2007 15:56:15 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by ronja.ntg.nl (Postfix) with ESMTP id 4DF921FB7F for ; Thu, 27 Dec 2007 15:56:15 +0100 (CET) Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-1 (SurgeMail 3.7b8) with ESMTP id 2743 for ; Thu, 27 Dec 2007 15:56:15 +0100 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) In-Reply-To: <6703815B292B664DBAEC55EE3192386A20BD6F@poseidon.in.dynetics.com> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:38306 Archived-At: Santy, Michael wrote: > 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? maybe "name" works ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________