From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55211 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Call for papers (pracjourn & mkiv) Date: Tue, 15 Dec 2009 18:53:11 +0100 Message-ID: <4B27CD07.9080803@wxs.nl> References: <16826CAD-526A-4908-8188-6F3191CEED39@boede.nl> <68c491a60912150405q47de821akd7e925930241e6fb@mail.gmail.com> <200912151415.24908.alan.braslau@cea.fr> 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: ger.gmane.org 1260899677 16478 80.91.229.12 (15 Dec 2009 17:54:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Dec 2009 17:54:37 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 15 18:54:30 2009 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.50) id 1NKbaL-0007n6-DX for gctc-ntg-context-518@m.gmane.org; Tue, 15 Dec 2009 18:53:21 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A46D4C9C69; Tue, 15 Dec 2009 18:53:18 +0100 (CET) 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 JSJBT3z3AaQw; Tue, 15 Dec 2009 18:53:15 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9C272C9BF4; Tue, 15 Dec 2009 18:53:15 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 47EBBC9BF4 for ; Tue, 15 Dec 2009 18:53:14 +0100 (CET) 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 Cu-7QY7WfftJ for ; Tue, 15 Dec 2009 18:53:12 +0100 (CET) Original-Received: from mail.solcon.net (dsl-083-247-100-017.solcon.nl [83.247.100.17]) by balder.ntg.nl (Postfix) with ESMTP id 0CBAEC9BAC for ; Tue, 15 Dec 2009 18:53:11 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-9 (SurgeMail 4.2a3) with ESMTP id 12977-1713362 for ; Tue, 15 Dec 2009 18:51:13 +0100 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: X-Authenticated-User: hagen@controller-9 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:55211 Archived-At: Aditya Mahajan wrote: > On Tue, 15 Dec 2009, Aditya Mahajan wrote: > >> I will update the module so that email and website work with mkiv. > > Attached is a corrected version. > > Hans, can something like \doifdefinedurl be added to the core? I am > currently using > > %D We need a macro to check if a url is defined using \type{\useURL} or > not. > > \def\doifdefinedurl#1{\doifdefined{\v!file:::#1}} > > %D \MKIV\ uses a different internal structure to store urls, so we use a > %D different method. > \startmode[*mkiv] > \startluacode > ptj = ptj or {} > function ptj.doifdefinedurl(name, action) > if jobreferences.urls.data[name] and name ~= "" then > tex.sprint(tex.ctxcatcodes, action) > end > end > \stopluacode > > \def\doifdefinedurl#1#2{\ctxlua{ptj.doifdefinedurl("#1", > \!!bs\detokenize{#2}\!!es)}} > > \stopmode i'll add: \def\doifurldefinedelse {\ctxlua{commands.doifurldefinedelse ("#1")}} \def\doiffiledefinedelse{\ctxlua{commands.doiffiledefinedelse("#1")}} fyi ... you can use constructs like: function commands.doifurldefinedelse(name) commands.doifelse(jobreferences.urls.data[name]) end ----------------------------------------------------------------- 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________