From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76444 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Use figures without file extension Date: Sat, 26 May 2012 22:49:06 -0400 (EDT) Message-ID: References: <4FC0DD0B.2050306@wxs.nl> <4FC0E752.9080002@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338086976 3225 80.91.229.3 (27 May 2012 02:49:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 May 2012 02:49:36 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun May 27 04:49:35 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SYTXx-0007uT-3Y for gctc-ntg-context-518@m.gmane.org; Sun, 27 May 2012 04:49:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 55E19101E4; Sun, 27 May 2012 04:49:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id awH5aBH1XZkT; Sun, 27 May 2012 04:49:29 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F34C1101DF; Sun, 27 May 2012 04:49:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 02EA2101DF for ; Sun, 27 May 2012 04:49:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JX0F4GBLFvoi for ; Sun, 27 May 2012 04:49:19 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id 2AFE9101DD for ; Sun, 27 May 2012 04:49:19 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.12.86]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q4R2liwI024973 for ; Sun, 27 May 2012 04:47:46 +0200 Original-Received: FROM adi-netbook (bas3-montreal02-1096682554.dsl.bell.ca [65.94.12.58]) By tombraider.mr.itd.umich.edu ID 4FC1962A.984F4.29455 ; Authuser adityam; 26 May 2012 22:49:14 EDT In-Reply-To: User-Agent: Alpine 2.02 (LNX 1266 2009-07-14) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.211.12.86; country=US; region=MI; city=Ann Arbor; postalcode=48109; latitude=42.2923; longitude=-83.7145; metrocode=505; areacode=734; http://maps.google.com/maps?q=42.2923,-83.7145&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0WHeOLIES - 8fa320ee671f - 20120527 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 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 Xref: news.gmane.org gmane.comp.tex.context:76444 Archived-At: On Sun, 27 May 2012, Rogers, Michael K wrote: > I don't know if this helps but the following tells what the type of the > image file is. (In my case I copied a jpg to img1 and a png to img2, > without extensions of course.) Thanks. Hans implemented a version of unix file command for checking the type of images, but using the inbuilt library is definely simpler! > \startluacode > userdata = userdata or { } > function userdata.mytype(s) > context(img.scan({filename=s}).imagetype) > end > \stopluacode @Hans, btw I also noticed that \locfilename does not work for files without extension. Create a file "one" in the current directory and then run: \message{>>>\locfilename{one}<<<} \end Aditya ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________