From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38310 Path: news.gmane.org!not-for-mail From: "Santy, Michael" Newsgroups: gmane.comp.tex.context Subject: Re: escaping filenames with externalfigure Date: Thu, 27 Dec 2007 09:05:32 -0600 Message-ID: <6703815B292B664DBAEC55EE3192386A20BD73@poseidon.in.dynetics.com> References: <6703815B292B664DBAEC55EE3192386A20BD6F@poseidon.in.dynetics.com> <4773BD0E.2020108@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0820692356==" X-Trace: ger.gmane.org 1198768206 2187 80.91.229.12 (27 Dec 2007 15:10:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2007 15:10:06 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 27 16:10:18 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 1J7uNB-0008WD-MR for gctc-ntg-context-518@m.gmane.org; Thu, 27 Dec 2007 16:10:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AE2741FBCC; Thu, 27 Dec 2007 16:09:47 +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 30237-01-6; Thu, 27 Dec 2007 16:09:07 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B75141FC12; Thu, 27 Dec 2007 16:07:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 12AE71FC0D for ; Thu, 27 Dec 2007 16:07:33 +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 30237-01-3 for ; Thu, 27 Dec 2007 16:06:58 +0100 (CET) Original-Received: from myrddin.dynetics.com (myrddin.dynetics.com [204.154.192.33]) by ronja.ntg.nl (Postfix) with ESMTP id 3C03D1FB5E for ; Thu, 27 Dec 2007 16:06:31 +0100 (CET) Original-Received: from poseidon.in.dynetics.com ([10.1.15.106]) by myrddin.dynetics.com (8.13.1/8.13.1) with ESMTP id lBRF0vt3009670 for ; Thu, 27 Dec 2007 09:00:57 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [NTG-context] escaping filenames with externalfigure Thread-Index: AchImNH6Q9Jkzce5TjGh/BY5SXjuqQAARsA0 X-dynetics.com-MailScanner-Information: Please contact the ISP for more information X-dynetics.com-MailScanner: Found to be clean X-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.439, required 2, autolearn=disabled, ALL_TRUSTED -1.44, HTML_MESSAGE 0.00) X-MailScanner-From: michael.santy@dynetics.com 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:38310 Archived-At: This is a multi-part message in MIME format. --===============0820692356== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C8489A.025D668C" This is a multi-part message in MIME format. ------_=_NextPart_001_01C8489A.025D668C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable \externalfigure[{flower[1].jpg}] demonstrates the same behavior as = \externalfigure[flower[1].jpg] Cheers, Mike -----Original Message----- From: ntg-context-bounces@ntg.nl on behalf of Hans Hagen Sent: Thu 12/27/2007 8:56 AM To: mailing list for ConTeXt users Subject: Re: [NTG-context] escaping filenames with externalfigure =20 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 \externalfigure[{flower[1].jpg}] may also 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. >=20 > \def\myimagefilename{flower[1].jpg}=20 > \externalfigure[\myimagefilename] % works >=20 > \def\myimagefilename{flower{1}.jpg} > \externalfigure[\myimagefilename] % doesn't work >=20 > Does anyone have any idea how I could handle arbitrary filename inputs = that contain brackets and curly braces? >=20 > Cheers, > Mike >=20 >=20 >=20 > = ------------------------------------------------------------------------ >=20 > = _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = _________________________________________________________________________= __________ --=20 ----------------------------------------------------------------- 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 _________________________________________________________________________= __________ ------_=_NextPart_001_01C8489A.025D668C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [NTG-context] escaping filenames with externalfigure

\externalfigure[{flower[1].jpg}] demonstrates the same = behavior as \externalfigure[flower[1].jpg]

Cheers,
Mike


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

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

\externalfigure[{flower[1].jpg}] may also 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
>
>
>
> = ------------------------------------------------------------------------<= BR> >
> = _________________________________________________________________________= __________
> 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
> = _________________________________________________________________________= __________


--

-----------------------------------------------------------------
            &= nbsp;           &n= bsp;           &nb= sp;      Hans Hagen | PRAGMA ADE
            &= nbsp;  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | = www.pragma-ade.com
            &= nbsp;           &n= bsp;           &nb= sp;         | = 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
_________________________________________________________________________= __________

------_=_NextPart_001_01C8489A.025D668C-- --===============0820692356== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============0820692356==--