From: Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: \definenamespace and module setup (was: Info about creating modules for beginners.)
Date: Sat, 25 Sep 2010 17:07:33 +0200 [thread overview]
Message-ID: <20100925150733.GA12482@aides> (raw)
In-Reply-To: <1E3C1BB4-CBEC-4D72-BF4C-C7A3F43CBBB8@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2189 bytes --]
On 2010-09-23 <23:43:15>, Wolfgang Schuster wrote:
> These are namespaces but you don't need these constructs
> anymore in mkiv because there is now a \definenamespace command
> which takes care of this.
Hi Wolfgang,
following your fancybreak module I put together dummy module.
··8<·····························································
\startmodule[test]
\unprotect
\startinterface all
\setinterfacevariable {TEST} {TEST}
\stopinterface
\definenamespace[testns] [
type=module,
name=TEST,
command=yes,
setup=list,
]
\unexpanded\def\typetest{%
\TESTparameter{teststyle}
This is a test.%
}
\defineTEST[\v!TEST]
\setupTEST[
teststyle=\sc
]
\protect
\endinput
··8<·····························································
When called like:
\usemodule[test] \starttext \typetest \stoptext
it works as expected.
Could you please explain what these other parameters do:
style=yes,
parent=fb
Also, what other values would the parameter ‘setup’ accept
besides ‘list’?
> BTW: The two letter namespaces are reserved for Hams and me but
> you’re free to use longer ones (we should collect them on a page
> at the wiki).
What information should go into this list? In my dummy, the
namespace ‘testns’ declares the \defineXX and \setupXX commands,
where XX=name and name=TEST. Thus if I am not mistaken, namespace
clashes might occur both a) among the \????…, and b) among the
\setup…|\define… commands.
A table on the wiki will need at least three columns:
+-----------+------------+---------------------+
| Namespace | Setup | Reserved for module |
+===========+============+=====================+
| fb | fancybreak | Fancy Break |
+-----------+------------+---------------------+
| … | … | … |
Is this OK so far? Anything critical I missed?
Philipp
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 486 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-09-25 15:07 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 16:35 Info about creating modules for beginners 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 ` Philipp Gesang [this message]
2010-09-25 17:35 ` \definenamespace and module setup (was: Info about creating modules for beginners.) 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
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=20100925150733.GA12482@aides \
--to=pgesang@ix.urz.uni-heidelberg.de \
--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).