On 07/05/2010 11:44 AM, Marius wrote:
On Fri, Jul 2, 2010 at 1:21 PM, Taco Hoekwater wrote:
I think this will be a wasted effort. I predict that any future
version of context that will be able to do syntax checking is going
to be based on lua for the verification process, not tex macros.
There is already an example implementation of comments reading.
http://gitorious.org/context/context/blobs/master/scripts/context/lua/mtx-mo...
cd tex/context/base
mtxrun --script modules --process page-txt.mkiv
see the resulting page-txt-mkiv.ted and page-txt-mkiv.pdf files.
Yes, this functionality has been around for ages, and is the basis of
luigi's typeset source documentation project:
http://foundry.supelec.fr/gf/project/modules
One possible extension would be:
%X
%X cd:sequence
%X
%X
%X cd:arguments
%X
%X
%X
%X
%X
But that is rather verbose and needs processing to create useful
solution. Another possibility using actual lua could be:
%X showbodyfont = {
%X seq = { string = "showbodyfont" },
%X arg = { keywords = {
%X n=1,list=true, optional=true,
%X inherit={ name = "setupbodyfont", n = 1}}}}
Essentially the same information, but shorter, and it could
be loaded into lua directly using 'loadstring'. Or there could
be a more TeX-like approach looking like this:
%X \cmd{showbodyfont}([...,...,...])->#1:\inherited{setupbodyfont}
to be parsed by a bit of lua code.
It all depends on what Hans is most comfortable with in keying in,
because if Hans doesn't like it the chances of anything like this
remaining up-to-date are about zero.
Best wishes,
Taco