ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Call for papers (pracjourn & mkiv)
Date: Tue, 15 Dec 2009 18:53:11 +0100	[thread overview]
Message-ID: <4B27CD07.9080803@wxs.nl> (raw)
In-Reply-To: <alpine.LNX.2.01.0912151046580.19167@ybpnyubfg.ybpnyqbznva>

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
___________________________________________________________________________________


  parent reply	other threads:[~2009-12-15 17:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <16826CAD-526A-4908-8188-6F3191CEED39@boede.nl>
2009-12-15 12:05 ` Call for papers Martin Schröder
2009-12-15 13:15   ` Call for papers (pracjourn & mkiv) Alan BRASLAU
2009-12-15 13:25     ` Aditya Mahajan
2009-12-15 16:16       ` Aditya Mahajan
2009-12-15 17:46         ` Hans Hagen
2009-12-15 21:30           ` Aditya Mahajan
2009-12-15 17:53         ` Hans Hagen [this message]
2009-12-15 21:29           ` Aditya Mahajan
2009-12-15 22:39             ` Hans Hagen
2009-12-15 17:54         ` Wolfgang Schuster
2009-12-15 18:16           ` Aditya Mahajan
2009-12-15 19:29             ` Wolfgang Schuster
2009-12-16 10:43               ` Indent after \startline[…] Andreas Harder
2009-12-16 17:40                 ` Wolfgang Schuster
2009-12-16 23:28                   ` Andreas Harder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B27CD07.9080803@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).