ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Info about creating modules for beginners.
Date: Sat, 25 Sep 2010 20:02:26 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.1009251957430.23239@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <15987BF0-B3B3-4636-882A-98F3363371E7@gmail.com>

On Thu, 23 Sep 2010, Wolfgang Schuster wrote:

>
> Am 23.09.2010 um 22:32 schrieb Hans Hagen:
>
>> On 23-9-2010 6:35, Jaroslav Hajtmar wrote:
>>> Hello, masters ...
>>> I would like create my first context mkiv module.
>>> Can someone please steer me what the first study and where to find some
>>> good advice for beginners?
>>> Appropriate would be also a simple module, which was easy to read and
>>> find out how to do everything correctly.
>>
>> just take a look at wolfgang's ... they use the latest mkiv abstractions (module namespaces etc, something that Wolfgang, Aditya and I are working on).
>
> fancybreak [1] is at the moment the only module with all these things but the other will follow

Does it make sense to copy the definition of mult-aux.mkiv to mkii? 
Everything other than \definenamespace should work in both mkii and mkiv. 
That way, I can use it in modules that target both mkii and mkiv.

BTW, I am still amused how Hans manages to write such code.  If you 
replace \expandafter with \@EA, this code will have more # than other 
characters combined :)

\unexpanded\def\doinstallparameterhandler#1#2#3#4#5#6#7%
   {\def#3##1{\csname#4{#1#2}{##1}\endcsname}%

\def#4##1##2{\ifcsname##1##2\endcsname##1##2\else\expandafter#5\csname##1\s!parent\endcsname{##2}\fi}%
    \def#5##1##2{\ifx##1\relax\s!empty\else#4{##1}{##2}\fi}%
    \def#6##1##2{\csname#4{#1##1}{##2}\endcsname}%

\def#7##1{\detokenize\expandafter\expandafter\expandafter{\csname#1##1\endcsname}}}


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
___________________________________________________________________________________


  reply	other threads:[~2010-09-26  0:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 16:35 Jaroslav Hajtmar
2010-09-23 20:32 ` Hans Hagen
2010-09-23 20:42   ` Steffen Wolfrum
2010-09-23 20:47     ` Wolfgang Schuster
2010-09-23 21:08       ` Steffen Wolfrum
2010-09-23 21:15         ` Hans Hagen
2010-09-23 21:15         ` Wolfgang Schuster
2010-09-23 21:21           ` Aditya Mahajan
2010-09-23 21:38             ` Wolfgang Schuster
2010-09-23 21:42               ` Aditya Mahajan
2010-09-23 21:46                 ` Wolfgang Schuster
2010-09-24  4:26                   ` Aditya Mahajan
2010-09-24  7:04                 ` Peter Münster
2010-09-23 21:30           ` Steffen Wolfrum
2010-09-23 21:36             ` Jaroslav Hajtmar
2010-09-23 21:43               ` Wolfgang Schuster
2010-09-25 15:07                 ` \definenamespace and module setup (was: Info about creating modules for beginners.) Philipp Gesang
2010-09-25 17:35                   ` Wolfgang Schuster
2010-09-27  8:30                     ` Philipp Gesang
2010-09-23 22:08           ` Info about creating modules for beginners Steffen Wolfrum
2010-09-23 21:17         ` Aditya Mahajan
2010-09-23 21:21           ` Steffen Wolfrum
2010-09-23 20:46   ` Wolfgang Schuster
2010-09-26  0:02     ` Aditya Mahajan [this message]
2010-09-26 11:24       ` Hans Hagen
2010-09-26 15:48         ` Aditya Mahajan
2010-09-26 14:06       ` Wolfgang Schuster
2010-09-26 15:41         ` Aditya Mahajan
2010-09-26 17:51           ` Peter Münster

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=alpine.LNX.2.00.1009251957430.23239@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).