From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/68071 Path: news.gmane.org!not-for-mail From: Michail Vidiassov Newsgroups: gmane.comp.tex.context Subject: Re: attachment attaches twice - the fix was minimal Date: Fri, 29 Apr 2011 11:24:14 +0400 (MSD) Message-ID: References: <7B4626C28B06A7418E938BF73D6DEE18F9E71DB516@KCL-MAIL05.kclad.ds.kcl.ac.uk> <4D61AD94.8020601@wxs.nl> <4D6B60EB.1020402@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1304062348 27078 80.91.229.12 (29 Apr 2011 07:32:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 29 Apr 2011 07:32:28 +0000 (UTC) Cc: mailing list for ConTeXt users To: Hans Hagen Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 29 09:32:24 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QFiBb-0007SN-L7 for gctc-ntg-context-518@m.gmane.org; Fri, 29 Apr 2011 09:32:23 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B1F11CAC6D; Fri, 29 Apr 2011 09:32:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id noRRYqe4j5S8; Fri, 29 Apr 2011 09:32:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D5100CAC67; Fri, 29 Apr 2011 09:32:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 771C8CAC67 for ; Fri, 29 Apr 2011 09:32:18 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id RsWKwQwy5FZr for ; Fri, 29 Apr 2011 09:32:16 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 885C3CAC48 for ; Fri, 29 Apr 2011 09:32:16 +0200 (CEST) Original-Received: from serv.iaas.msu.ru (serv.iaas.msu.ru [212.192.224.252]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p3T7WFKA012860 for ; Fri, 29 Apr 2011 09:32:15 +0200 Original-Received: from [192.168.0.101] ([95.143.208.28]) (authenticated bits=0) by serv.iaas.msu.ru (8.14.3/8.14.3) with ESMTP id p3T7JHIN083425; Fri, 29 Apr 2011 11:19:17 +0400 (MSD) (envelope-from master@iaas.msu.ru) X-X-Sender: master@macbook.local In-Reply-To: <4D6B60EB.1020402@wxs.nl> User-Agent: Alpine 2.00 (OSX 1167 2008-08-23) X-Bayes-Prob: 0.9999 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=212.192.224.252; country=RU; region=48; city=Moscow; latitude=55.7522; longitude=37.6156; http://maps.google.com/maps?q=55.7522,37.6156&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0rEBjwf4D - da14586eac58 - 20110429 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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:68071 Archived-At: Dear Hans, when you fixed the bug with attachment being listed twice in the attachment list, you also enhanced attachment support On Mon, 28 Feb 2011, Hans Hagen wrote: > as far as i can see there were a couple of issues: > attachments without associated annotation, and labeling and both are covered, > but using the same command and extra keys/values ... as far as I understand, "attachments without associated annotation" are called "hidden" in ConTeXt, as in \attachment[test][file=att.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] But that does not work and, as far as I can see from the current beta code, is not supposed to. For example, in lpdf-wid.lua we have local function flushembeddedfiles() if next(filestreams) then local e = pdfarray() for tag, reference in next, filestreams do if not reference then report_attachment("unreferenced file: tag '%s'",tag) elseif referenced[name] == "hidden" then e[#e+1] = pdfstring(tag) e[#e+1] = reference -- already a reference else -- messy spec ... when annot not in named else twice in menu list acrobat end end lpdf.addtonames("EmbeddedFiles",pdfreference(pdfflushobject(pdfdictionary{ Names = e }))) end end Note the "referenced[name]" part, while there is no "name" variable. It seems the working code did not find its way into released version and some draft got shipped. Sincerely, Michail ___________________________________________________________________________________ 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 ___________________________________________________________________________________