Hi,
I uploaded a new beta. The most important issues are the following:
(1) Table
I fixed a few things and there is limit color support
\VL[10] rule ten times wider than normal
\VL[red] red rule
\VL[red,10] both
The same applies to \HL and \DL, but with \DL the first argument hs the
number of spans, so we can have: \DL[2,red,10].
(2) Buffers and typing
This whole bunch has been cleaned up and pretty printing has been
redone. The \type command accepts an optional argument with settings. as
does \starttyping, \typebuffer and \typefile (and the defined variants).
The interface for defining visualizers might change a bit but I'm
getting there. There is a chapter on it in the cld manual. In principle
one can provide arbitrary manipulators, think of:
\startluacode
local function parser(s)
local s = string.gsub(s,"show","demonstrate")
local s = string.gsub(s,"'re"," are")
context(s)
end
visualizers.register("MyThing", { parser = parser })
\stopluacode
\starttyping[option=MyThing,color=darkred,style=]
This is just some text to show what we can do with this mechanism. In
spite of what you might think we're not bound to verbose text.
\stoptyping
\startbuffer[demo]
This is just some text to show what we can do with this mechanism. In
spite of what you might think we're not bound to verbose text.
\stopbuffer
\processbuffer[demo][option=MyThing]
There are only a few visualizers built in: TEX, MP, LUA, XML and
PARSED-XML. There is also PARSED-LUA but that's for Luigi and me to play
with first.
Colors and fonts might change and are set up differently now, see
v-*.mkiv files.
(3) MkVI (or: moving on)
Say that you have a file test.mkvi that has the following code:
\def\TestOne[#1]%
{this is: #1}
\def\TestTwo#some%
{this is: #some}
\def\TestThree[#whatever][#more]%
{this is: #more and #whatever}
\def\TestFour[#one]#two%
{\def\TestFive[#alpha][#one]%
{#one, #two, #alpha}}
\starttexdefinition TestSix #oeps
here: #oeps
\stoptexdefinition
\starttext
\startlines
\TestOne [one]
\TestTwo {one}
\TestThree[one][two]
\TestFour [one]{two}
\TestFive [one][two]
\TestSix {one}
\stoplines
\stoptext
This will work out ok, in spite of the not so texy hash usage. This is
an experimental feature and only meant for developers to play with.
% macros=mkvi
as top line also works. Files like that are preprocessed before they are
passed to tex. (I'm considering permitting spaces before and after
#whatever in the definition line.) More preprocessor features might show
up. Of course the limitation of 9 arguments still applies.
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
___________________________________________________________________________________