Re: [NTG-context] Info about creating modules for beginners.

2010-09-26 Thread Hans Hagen

On 26-9-2010 2:02, Aditya Mahajan wrote:


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.


if you consider it useful ... keep in mind that it uses the new 
inheritance model of mkiv (less predefined hash entries at the cost of a 
bit more runtime but also more powerful) ... adding it would not mean 
that I'd adapt all old mkii code to it



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 :)


grep for #...@ea or #\expandafter and you will see some real horror

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-26 Thread Wolfgang Schuster

Am 26.09.2010 um 02:02 schrieb Aditya Mahajan:

 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.

Parameter handling is different in mkii and mkiv and it’s not such a problem to 
write different code for each of them. For fancybreak i used different 
mechanism for each of them and i think you should do this as well with your 
filter module.

Wolfgang

___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-26 Thread Aditya Mahajan


On Sep 26, 2010, at 10:06 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:

 
 Am 26.09.2010 um 02:02 schrieb Aditya Mahajan:
 
 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.
 
 Parameter handling is different in mkii and mkiv and it’s not such a problem 
 to write different code for each of them.

But right now, I use a unified parameter handling for both mkii and mkiv. 

 For fancybreak i used different mechanism for each of them and i think you 
 should do this as well with your filter module.

You are essentially maintaining two modules, one for mkii and one for mkiv. At 
least for the filter module, I would like to maintain only one module. The 
current version has manual parameter handling. Some of which can be automated 
using \installparameterhandler etc. That is why I am asking part of 
mult-aux.mkiv to be copied to mkii. 

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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-26 Thread Aditya Mahajan


On Sep 26, 2010, at 7:24 AM, Hans Hagen pra...@wxs.nl wrote:

 On 26-9-2010 2:02, Aditya Mahajan wrote:
 
 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.
 
 if you consider it useful ... keep in mind that it uses the new inheritance 
 model of mkiv (less predefined hash entries at the cost of a bit more runtime 
 but also more powerful) ... adding it would not mean that I'd adapt all old 
 mkii code to it

I understand. I am not asking any change in the mkii code. Just want the macros 
for the inheritance code (without the definenamespace macro that uses lua) to 
be available in mkii so that I can use the new inheritance model with mkii in 
my modules. (I use it anyways, but with boilerplate macros borrowed from 
Wolfgang. All I want to do is reduce that boilerplate)

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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-26 Thread Peter Münster
On Sun, Sep 26 2010, Aditya Mahajan wrote:
 
 You are essentially maintaining two modules, one for mkii and one for mkiv.
 At least for the filter module, I would like to maintain only one module. The
 current version has manual parameter handling. Some of which can be automated
 using \installparameterhandler etc. That is why I am asking part of
 mult-aux.mkiv to be copied to mkii.

Hello,

It would be interesting, to know how many people actually use mkii.
Perhaps a survey on the wiki...?

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-25 Thread Aditya Mahajan

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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread 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).


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

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).


btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder? 
or do I have to use for this purpose environment files?


steffen

___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

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

[1] http://bitbucket.org/wolfs/fancybreak/src/tip/files/

Wolfgang

___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:

 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?

You can put modules in your project folder and these are always loaded before 
the files in the tex tree.

Wolfgang

___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:

 
 Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:
 
 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded before 
 the files in the tex tree.


Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.

What is missing?

Steffen


___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Hans Hagen

On 23-9-2010 11:08, Steffen Wolfrum wrote:


Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:



Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:


btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder?
or do I have to use for this purpose environment files?


You can put modules in your project folder and these are always loaded before 
the files in the tex tree.



Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.


\usemodule[p][my-test]

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:08 schrieb Steffen Wolfrum:

 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded 
 before the files in the tex tree.
 
 
 Sounds good, but ...
 
 For example I have in a project's folder a project_test file with these line:
 
 \environment Style_Test
 \usemodule[p-my-test]
 
 Both files (Style_Test.tex and p-my-test.tex are stored next to 
 project_test.tex in the project's folder).
 The environment file is found without problems ... even when I change the 
 file's name between two runs.
 
 The module is never found.
 
 What is missing?

Can you give more information or a example, you don’t mention which file you 
process and what’s loaded in them.

Wolfgang



___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Steffen Wolfrum wrote:



Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:



Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:


btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder?
or do I have to use for this purpose environment files?


You can put modules in your project folder and these are always loaded before 
the files in the tex tree.



Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.

What is missing?


Module lookups do not search in the parent or grand parent directories.

One alternative is to always run files from the top project folder:

   context dir/dir/file

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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Wolfgang Schuster wrote:


Can you give more information or a example, you don’t mention which file you 
process and what’s loaded in them.


Consider a simple setup:

root-dir/
 p-module.tex
 env-file.tex
 project-file.tex
 subdir/
component-file1.tex
component-file2.tex


Suppose the component-file1 file says

   \environment env-file

while component-file2 says

   \usemodule[p][module]

If I run everything from the root directory, then both component1 and 
component2 compile fine. On the other hand if I run everything from the 
subdir, then component1 compiles fine, but component2 will fail to load 
the module.


Basically, module search does not look in parent directories.

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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 23:17 schrieb Aditya Mahajan:

 On Thu, 23 Sep 2010, Steffen Wolfrum wrote:
 
 
 Am 23.09.2010 um 22:47 schrieb Wolfgang Schuster:
 
 
 Am 23.09.2010 um 22:42 schrieb Steffen Wolfrum:
 
 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder?
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded 
 before the files in the tex tree.
 
 
 Sounds good, but ...
 
 For example I have in a project's folder a project_test file with these line:
 
 \environment Style_Test
 \usemodule[p-my-test]
 
 Both files (Style_Test.tex and p-my-test.tex are stored next to 
 project_test.tex in the project's folder).
 The environment file is found without problems ... even when I change the 
 file's name between two runs.
 
 The module is never found.
 
 What is missing?
 
 Module lookups do not search in the parent or grand parent directories.



I rather suspected that.

Steffen
___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Steffen Wolfrum

Am 23.09.2010 um 23:15 schrieb Wolfgang Schuster:

 
 Am 23.09.2010 um 23:08 schrieb Steffen Wolfrum:
 
 btw: modules are used to be stored eg. in 
 ~/context/tex/texmf-local/tex/context/third/ folder.
 
 is is also possible to keep/find them not in texfm tree but in a projects 
 folder? 
 or do I have to use for this purpose environment files?
 
 You can put modules in your project folder and these are always loaded 
 before the files in the tex tree.
 
 
 Sounds good, but ...
 
 For example I have in a project's folder a project_test file with these line:
 
 \environment Style_Test
 \usemodule[p-my-test]
 
 Both files (Style_Test.tex and p-my-test.tex are stored next to 
 project_test.tex in the project's folder).
 The environment file is found without problems ... even when I change the 
 file's name between two runs.
 
 The module is never found.
 
 What is missing?
 
 Can you give more information or a example, you don’t mention which file you 
 process and what’s loaded in them.



It's like this (mapping context's recommended project structure):

project-dir/
p-module.tex
env-file.tex
project-file.tex
product-file.tex
subdir/
   component-file1.tex
   component-file2.tex

The project-file file says
  \environment Style_Test
  \usemodule[p][module]

Now I run from the subdir eg. component-file1.tex:
  the environment was loaded
  the module was not.


Steffen
___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Jaroslav Hajtmar

Hello,
Thanks very much everyone for your advice, I am certainly now a better 
starting position ...

I will try to learn something ...

Maybe it sounds silly but at the very beginning I was surprised by the 
type of construction:


\def\ld{ld}
\def\ls{ls}

Where do I read about it more?

You have not  it easy with me, right? :-)
But luckily I learn fairly quickly :-)...

One more thanx - I appreciate your willingness...
Jarda

Dne 23.9.2010 23:30, Steffen Wolfrum napsal(a):

Am 23.09.2010 um 23:15 schrieb Wolfgang Schuster:

   

Am 23.09.2010 um 23:08 schrieb Steffen Wolfrum:

 

btw: modules are used to be stored eg. in 
~/context/tex/texmf-local/tex/context/third/ folder.

is is also possible to keep/find them not in texfm tree but in a projects 
folder?
or do I have to use for this purpose environment files?
   

You can put modules in your project folder and these are always loaded before 
the files in the tex tree.
 


Sounds good, but ...

For example I have in a project's folder a project_test file with these line:

\environment Style_Test
\usemodule[p-my-test]

Both files (Style_Test.tex and p-my-test.tex are stored next to 
project_test.tex in the project's folder).
The environment file is found without problems ... even when I change the 
file's name between two runs.

The module is never found.

What is missing?
   

Can you give more information or a example, you don’t mention which file you 
process and what’s loaded in them.
 



It's like this (mapping context's recommended project structure):

project-dir/
 p-module.tex
 env-file.tex
 project-file.tex
 product-file.tex
 subdir/
component-file1.tex
component-file2.tex

The project-file file says
   \environment Style_Test
   \usemodule[p][module]

Now I run from the subdir eg. component-file1.tex:
   the environment was loaded
   the module was not.


Steffen
___
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
___

   


___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:21 schrieb Aditya Mahajan:

 Basically, module search does not look in parent directories.

But you can use a construct like

\doifmodeelse{component}
  {\usemodule[module]}
  {\usemodule[../module]}

Wolfgang

___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Aditya Mahajan

On Thu, 23 Sep 2010, Wolfgang Schuster wrote:



Am 23.09.2010 um 23:21 schrieb Aditya Mahajan:


Basically, module search does not look in parent directories.


But you can use a construct like

\doifmodeelse{component}
 {\usemodule[module]}
 {\usemodule[../module]}


And if you are two directories deep for some components and one dir deep 
for others.


\environment \component etc use a heirarchical search. I think that 
\usemodule should also use that.


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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:36 schrieb Jaroslav Hajtmar:

 Hello,
 Thanks very much everyone for your advice, I am certainly now a better 
 starting position ...
 I will try to learn something ...
 
 Maybe it sounds silly but at the very beginning I was surprised by the type 
 of construction:
 
 \def\ld{ld}
 \def\ls{ls}
 
 Where do I read about it more?

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.

You need a namespace when you use a setup command with key-value-pairs to have 
unique names for the keys.

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).

Wolfgang

___
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
___


Re: [NTG-context] Info about creating modules for beginners.

2010-09-23 Thread Wolfgang Schuster

Am 23.09.2010 um 23:42 schrieb Aditya Mahajan:

 On Thu, 23 Sep 2010, Wolfgang Schuster wrote:
 
 
 Am 23.09.2010 um 23:21 schrieb Aditya Mahajan:
 
 Basically, module search does not look in parent directories.
 
 But you can use a construct like
 
 \doifmodeelse{component}
 {\usemodule[module]}
 {\usemodule[../module]}
 
 And if you are two directories deep for some components and one dir deep for 
 others.
 
 \environment \component etc use a heirarchical search. I think that 
 \usemodule should also use that.

And what’s with pictures, \setupexternalfigure[directory=...] has the same 
problem as \usemodule?

Wolfgang

___
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
___