Re: [NTG-context] cont-sys.mkiv in texlive 2011

2011-07-13 Thread Mojca Miklavec
On Tue, Jul 12, 2011 at 17:55, John Culleton wrote:
>
> Where did you find TL-2011? All I find is TL-2010

Then you didn't search enough :)

http://wiki.contextgarden.net/TeX_Live_2011
http://www.tug.org/texlive/pretest.html

Mojca
___
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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Jaroslav Hajtmar

Hello all.
It is GREAT! Thanx Hans and Wolfgang too. It is very instructive and 
inspiring for me...
I was looking for something similar for a long time, but I have not 
found anything (not even in the CLD-MKIV and others ...). Finally, after 
yours reply to this email find something in the ctx-man.pdf from 1997 
year :-).

But I have a few questions and comments on this subject:

1. Is there any possibility to do anything similar with counters, 
dimensions etc? I trying but without success.

For example:
context.newcount(mycounter) or context.newcounter(mycounter)
context.mycounter=5 etc.

or it must be realized by classical way:
context('\\newcount\\mycounter')
context('\\mycounter=10')
context('\\advance\\mycounter by5')
context('\\the\\mycounter')

similary with \newdimen, \newif etc...

2. Any person interested in using context.setvalue{"Mymacro",somevalue) 
and context([[\def\MyMacro#1{#1}]]) syntaxes I have pointed out that the 
second syntax only operates when the command is given in a separate LUA 
file (ie file.lua) (ie not within an environment \startluacode - 
\stopluacode in classical TEX file!!!). Hans told me once that it is the 
individual categories of characters (backslash??) (if I remember correctly).

First syntax works perfectly in LUA and TeX files too.

Here I have a question. Why not comment out this case in TEX file?

\startluacode
 -- context([[\def\macro#1{#1}]])
\stopluacode

I get error:
! Undefined control sequence.
 -- context([[\def \macro
  #1{#1}]])
\dodostartluacode ...and \directlua \zerocount {#1
  }}
l.25 \stopluacode

?

That category characters again? Comment character -- works differently 
in TEX file, and otherwise in the LUA file?

Ie. comment on the backslash?


3. Wolfgang write about using context command

\convertnumber{R}{1400} and the corresponding syntax: 
context.convertnumber("R",1400) to roman converting.
It is great, but I could not figure out how to use in combination with 
the above syntax (ie use case context.command) or find the appropriate 
conversion LUA function (I did not use a custom function).


Is there any way to do something like that:

context([[\def\Macro%s{Macro%s}]],context.convertnumber("R",1400),1400) ???
ie. TEX command is used as a LuaTeX parameter?

Thanx Jaroslav







Dne 12.7.2011 17:43, Hans Hagen napsal(a):

On 12-7-2011 5:30, Jaroslav Hajtmar wrote:


But someone advised me that I use the better syntax:
context('\\def\\Mymacro\{arg of mymacro\}')
or context("\\def\\test#1{#1}") etc...


whatever you like best

context.setvalue{"Mymacro",somevalue)

context([[\def\MyMacro#1{#1}]])


Exist other (best or most optimal) way to do?
for i = 1, 10 do
tex.sprint(tex.ctxcatcodes,'\\def\\macro'..ar2rom(i)..'\{macro
'..i..'\}')
context('\\def\\Macro'..ar2rom(i)..'\{Macro '..i..'\}')
end


for i = 1, 10 do
  context([[\def\Macro%s{Macro%s}]],ar2rom(i),i)
end

When more than one argument is given, the context command treats the
first argument as format template.

By using the context command you can see what happens with

\enabletrackers[context.trace]

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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Hans Hagen

On 13-7-2011 10:05, Jaroslav Hajtmar wrote:

Hello all.
It is GREAT! Thanx Hans and Wolfgang too. It is very instructive and
inspiring for me...
I was looking for something similar for a long time, but I have not
found anything (not even in the CLD-MKIV and others ...). Finally, after
yours reply to this email find something in the ctx-man.pdf from 1997
year :-).
But I have a few questions and comments on this subject:

1. Is there any possibility to do anything similar with counters,
dimensions etc? I trying but without success.
For example:
context.newcount(mycounter) or context.newcounter(mycounter)
context.mycounter=5 etc.


As currently we cannot define a counter at the tex end (using countdef) 
it would introduce too much complexitity to mimmick that now.


When you do:

context.newcount("name")

you should realize that this command is effectuated after the lua call, 
so if you want a counter also at the tex level you should define it at 
that end,


\newcount\name


or it must be realized by classical way:
context('\\newcount\\mycounter')
context('\\mycounter=10')
context('\\advance\\mycounter by5')
context('\\the\\mycounter')


tex.count.name = 10
tex.count.name = tex.count.name + 5

if you never need the counter at the tex end, you can of course use a 
lua number instead.



similary with \newdimen, \newif etc...


at some point we will have helpers for that


2. Any person interested in using context.setvalue{"Mymacro",somevalue)
and context([[\def\MyMacro#1{#1}]]) syntaxes I have pointed out that the
second syntax only operates when the command is given in a separate LUA
file (ie file.lua) (ie not within an environment \startluacode -
\stopluacode in classical TEX file!!!). Hans told me once that it is the
individual categories of characters (backslash??) (if I remember
correctly).
First syntax works perfectly in LUA and TeX files too.


indeed, but if you already have the command and it's defined as 
unexpandable then you can use the [[ ]] method too



Here I have a question. Why not comment out this case in TEX file?

\startluacode
-- context([[\def\macro#1{#1}]])
\stopluacode

I get error:
! Undefined control sequence.
-- context([[\def \macro
#1{#1}]])
\dodostartluacode ...and \directlua \zerocount {#1
}}
l.25 \stopluacode
?

That category characters again? Comment character -- works differently
in TEX file, and otherwise in the LUA file?
Ie. comment on the backslash?


indeed


3. Wolfgang write about using context command

\convertnumber{R}{1400} and the corresponding syntax:
context.convertnumber("R",1400) to roman converting.
It is great, but I could not figure out how to use in combination with
the above syntax (ie use case context.command) or find the appropriate
conversion LUA function (I did not use a custom function).
Is there any way to do something like that:

context([[\def\Macro%s{Macro%s}]],context.convertnumber("R",1400),1400) ???
ie. TEX command is used as a LuaTeX parameter?


context([[\def\Macro%s{Macro%s}]],converters.romannumeral(1400),1400)

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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Jaroslav Hajtmar

Great
Hans, thanx very much for complete an exhaustive answer..
It very help me to solve my module

Regards Jaroslav


Dne 13.7.2011 11:55, Hans Hagen napsal(a):

On 13-7-2011 10:05, Jaroslav Hajtmar wrote:

Hello all.
It is GREAT! Thanx Hans and Wolfgang too. It is very instructive and
inspiring for me...
I was looking for something similar for a long time, but I have not
found anything (not even in the CLD-MKIV and others ...). Finally, after
yours reply to this email find something in the ctx-man.pdf from 1997
year :-).
But I have a few questions and comments on this subject:

1. Is there any possibility to do anything similar with counters,
dimensions etc? I trying but without success.
For example:
context.newcount(mycounter) or context.newcounter(mycounter)
context.mycounter=5 etc.


As currently we cannot define a counter at the tex end (using 
countdef) it would introduce too much complexitity to mimmick that now.


When you do:

context.newcount("name")

you should realize that this command is effectuated after the lua 
call, so if you want a counter also at the tex level you should define 
it at that end,


\newcount\name


or it must be realized by classical way:
context('\\newcount\\mycounter')
context('\\mycounter=10')
context('\\advance\\mycounter by5')
context('\\the\\mycounter')


tex.count.name = 10
tex.count.name = tex.count.name + 5

if you never need the counter at the tex end, you can of course use a 
lua number instead.



similary with \newdimen, \newif etc...


at some point we will have helpers for that


2. Any person interested in using context.setvalue{"Mymacro",somevalue)
and context([[\def\MyMacro#1{#1}]]) syntaxes I have pointed out that the
second syntax only operates when the command is given in a separate LUA
file (ie file.lua) (ie not within an environment \startluacode -
\stopluacode in classical TEX file!!!). Hans told me once that it is the
individual categories of characters (backslash??) (if I remember
correctly).
First syntax works perfectly in LUA and TeX files too.


indeed, but if you already have the command and it's defined as 
unexpandable then you can use the [[ ]] method too



Here I have a question. Why not comment out this case in TEX file?

\startluacode
-- context([[\def\macro#1{#1}]])
\stopluacode

I get error:
! Undefined control sequence.
-- context([[\def \macro
#1{#1}]])
\dodostartluacode ...and \directlua \zerocount {#1
}}
l.25 \stopluacode
?

That category characters again? Comment character -- works differently
in TEX file, and otherwise in the LUA file?
Ie. comment on the backslash?


indeed


3. Wolfgang write about using context command

\convertnumber{R}{1400} and the corresponding syntax:
context.convertnumber("R",1400) to roman converting.
It is great, but I could not figure out how to use in combination with
the above syntax (ie use case context.command) or find the appropriate
conversion LUA function (I did not use a custom function).
Is there any way to do something like that:

context([[\def\Macro%s{Macro%s}]],context.convertnumber("R",1400),1400) 
???

ie. TEX command is used as a LuaTeX parameter?


context([[\def\Macro%s{Macro%s}]],converters.romannumeral(1400),1400)

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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Wolfgang Schuster

Am 13.07.2011 um 12:05 schrieb Jaroslav Hajtmar:

> Great
> Hans, thanx very much for complete an exhaustive answer..
> It very help me to solve my module

A few dozen commands to access values aren’t a perfect solution,
there are better ways to access entries from a Lua table.

\starttext

\startusercode

entries = {
one   = "1",
two   = "2",
three = "Three",
five  = "More text!"
}

function getentry(name)
local entry = entries[name] or ""
global.context(entry)
end

\stopusercode

\define[1]\getentry{\usercode{getentry("#1")}}

\starttabulate
\NC one   \EQ \getentry{one}   \NC\NR
\NC two   \EQ \getentry{two}   \NC\NR
\NC three \EQ \getentry{three} \NC\NR
\NC four  \EQ \getentry{four}  \NC\NR
\NC five  \EQ \getentry{five}  \NC\NR
\stoptabulate

\stoptext

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] theorem environment

2011-07-13 Thread Wolfgang Schuster

Am 13.07.2011 um 07:15 schrieb Andreas Richter:

> Hello,
> 
> Using ConTeXt, I would like to define environments to appear
> like
> 
> --
> Theorem 1.4 (Pythagoras)
> In any right triangle, $c^2 = a^2 + b^2$ holds
> where ...
> --
> 
> and
> 
>  --- Example 1.1 ---
>  Let $a=2$ ...
>  ---
> 
> and (e. g. small, slanted or whatever)
> 
> Remark 1.3
> --
>  | Euclidean ...
>  | ...
> .
> 
> After browsing the documentation on the web, focussing
> on \defineenummeration, I'm still nowhere near the solution.
> Could anyone please give examples of how to do this?

You can change the style, color and spacing with \setupenumerations
but for the rules etc. you need other commands.

\defineenumeration[theorem][text=Theorem,title=yes]
\defineenumeration[example][text=Example]
\defineenumeration[remark] [text=Remark]

\setupenumerations
  [theorem]
  [   
before={\startframedtext[frame=off,topframe=on,bottomframe=on,width=broad,offset=.5ex]},
   after=\stopframedtext,
   inbetween={\blank[small]}]

\setupenumerations
  [example]
  [  command=\textrule,
   after=\textrule,
   inbetween={\blank[nowhite]}]

\setupenumerations
  [remark]
  [style=italic]

\starttext

\starttheorem{Pythagoras}
In any right triangle, $c^2 = a^2 + b^2$ holds where …
\stoptheorem

\startexample
Let $a=2$ ...
\stopexample

\startremark
Euclidean ...
\stopremark

\stoptext

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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Jaroslav Hajtmar

Thanx Wolfgang,

It looks very interesting... It can be used this method for example for 
macro definitions?


When I will return to the subject of this mail:
Can also be used for the council said Hans macros with multiple parameters?

For example macros without parameter is no problem:
context.setvalue('printline',calling.luafunction(),tex.par)
I assume that for a more parameters cannot be used context.setvalue (...) ..

But how to use multiple parameters when defining the macro as follows:
context([[\\def\\paramcontrol#1#2{%s}]],thirddata.scancsv.paramcontrol('#1', 
'#2'))


etc...

I want completely rewrite my entire module into LUA code (this means 
only lua file without TEX code)


Thanx Jaroslav



Dne 13.7.2011 14:56, Wolfgang Schuster napsal(a):

Am 13.07.2011 um 12:05 schrieb Jaroslav Hajtmar:

   

>  Great
>  Hans, thanx very much for complete an exhaustive answer..
>  It very help me to solve my module
 

A few dozen commands to access values aren’t a perfect solution,
there are better ways to access entries from a Lua table.

\starttext

\startusercode

entries = {
 one   = "1",
 two   = "2",
 three = "Three",
 five  = "More text!"
}

function getentry(name)
 local entry = entries[name] or ""
 global.context(entry)
end

\stopusercode

\define[1]\getentry{\usercode{getentry("#1")}}

\starttabulate
\NC one   \EQ \getentry{one}   \NC\NR
\NC two   \EQ \getentry{two}   \NC\NR
\NC three \EQ \getentry{three} \NC\NR
\NC four  \EQ \getentry{four}  \NC\NR
\NC five  \EQ \getentry{five}  \NC\NR
\stoptabulate

\stoptext
   


___
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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Wolfgang Schuster

Am 13.07.2011 um 16:09 schrieb Jaroslav Hajtmar:

> Thanx Wolfgang,
> 
> It looks very interesting... It can be used this method for example for macro 
> definitions?

It depends what you want to achieve, while you try to create many commands
in the form \MacroXXX where each command contains some content i define
only one command which takes the content only when requested.

> When I will return to the subject of this mail:
> Can also be used for the council said Hans macros with multiple parameters?
> 
> For example macros without parameter is no problem:
> context.setvalue('printline',calling.luafunction(),tex.par)
> I assume that for a more parameters cannot be used context.setvalue (...) ..
> 
> But how to use multiple parameters when defining the macro as follows:
> context([[\\def\\paramcontrol#1#2{%s}]],thirddata.scancsv.paramcontrol('#1', 
> '#2'))

Look into cldf-int.lua where you can see a method to create TeX commands
without optional arguments from Lua.

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
___


[NTG-context] Can not become member of NTG

2011-07-13 Thread Cecil Westerhof
I tried to become a member, but after submitting the form I get:
Not acceptable!

I entered all the fields except postbus and telefoon.
-- 
Cecil Westerhof
___
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] Can not become member of NTG

2011-07-13 Thread Mojca Miklavec
On Wed, Jul 13, 2011 at 19:00, Cecil Westerhof wrote:
> I tried to become a member, but after submitting the form I get:
>     Not acceptable!
>
> I entered all the fields except postbus and telefoon.

This is all handled by secretary anyway. The registration is not fully
automatic and the form is there mainly to make sure that all the data
is entered. If there are any complications, you can always send an
email to Willi Egger (who also reads this mailing list) who will
gladly help you further.

It is nice to get a new member!

Mojca
___
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] Optimal way to defining of macros in Luacode in ConTeXt

2011-07-13 Thread Hans Hagen

On 13-7-2011 4:09, Jaroslav Hajtmar wrote:


But how to use multiple parameters when defining the macro as follows:
context([[\\def\\paramcontrol#1#2{%s}]],thirddata.scancsv.paramcontrol('#1',
'#2'))


interfaces.definecommand {
name  = "TwoMandate",
macro = thirddata.scancsv.paramcontrol,
arguments = {
{ "content", "string" },
{ "content", "string" },
},
}


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


[NTG-context] beta

2011-07-13 Thread Hans Hagen

Hi,

I uploaded a beta:

- Project structure related files are now dealt with in lua: it's mostly 
compatible but somewhat more strict (proper push and pop). In the log 
file the used structure is summarized.


- All writing from lua to tex is now under control of the cld 
infrastructure. This means that logging is more complete. The speed 
penalty is neglectable and in some places faster.


- There are a couple of fixes related to marks.

- There are a couple of fixes (thanks to Wolfgang, who checks all 
commands as part of the user interface (setups) documentation).


- In \asciimode, %% now can be used as traditional tex comment starter. 
Also, modules and environments are loaded under the normal catcode regime.


- Typing gets frontstripped with the number of spaces in front of 
\stoptyping so that one can have nicely formatted input like:


\startitemize
  \startitem test

  \starttyping
  test
  \stoptyping

  \stopitem
\stopitemize

- Entities in xml mode have a slightly different roundtrip treatment now 
and hopefully Thomas S as well as Hans vd M files still work ok.


- Unicode math variants (supported by xits) are supported:

\mathematics {
  \utfchar{"2229} =
  \utfchar{"2229}\utfchar{"FE00} =
  \vsone{\utfchar{"2229}}
}

- Defining commands at the lua end now also handles arg only cases and 
has better tracing.


- Some other other things, like \startlayout[page] ... \stoplayout and 
whatever I forgot.


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] \date bug with french

2011-07-13 Thread Romain Diss
Le lundi 04 juillet 2011, Romain Diss a écrit :
> The date printed with the \date command is not correct in french (but ok in
> english).
> See this example :
> 
>   \mainlanguage[fr]
>   \starttext
>  \date
>   \stoptext
> 
> It prints "44 juillet 2011" (today). Without " \mainlanguage[fr]", it’s
> prints "July 4, 2011" (as expected).
> 
> I have "ConTeXt - 2011.06.29 09:57" and "LuaTeX-0.70.1".
> I've never seen this bug before but I don't know if the problem is recent
> or not.

Corrected in the last beta (2011.07.13 20:14). It now works like expected.

Thank you.

-- 
Romain Diss



signature.asc
Description: This is a digitally signed message part.
___
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] Can not become member of NTG

2011-07-13 Thread Taco Hoekwater
Hi Cecil,

On 07/13/11 19:00, Cecil Westerhof wrote:
> I tried to become a member, but after submitting the form I get:
> Not acceptable!

There was a bug in the script, it did not like URLs without the 'www'
prefix. I have fixed that a moment ago, and registering should work
properly now. Thank you for your interest!

Best wishes,
Taco
___
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
___


[NTG-context] How to prepare a template for list of names in ConTeXt

2011-07-13 Thread Marcin Borkowski
Hi all,

I have an ambitious plan to start (again) to use ConTeXt (MkIV, of
course;)), so that I can learn it a bit; also, I'd like to play around
with metapost/metafun (after a long break - I'm a metapost to tikz
convert;)).

I want to prepare a template for a list of names, looking like this (in
ascii art;)):

  List of names
Class  Date 

A-F  M-R
 
 

G-L  S-Z
 
 

(Of course, there will be more horizontal lines).

In other words, I'd like to have two columns (and a title spanning
them) and a lot of places to put down a name.  I'd like each horizontal
line to have a little "hook" and one of the ends, i.e., a quarter of
a circle.  I'd like to have full control over the positioning
(margins, width of the intercolumn space, height of each place for a
name etc.).  I'd like the labels like A-F to be also "underlined" by
similar "hooked lines".

How do you think I should do it?  More specifically:
1. How can I do something like "metapost macro" putting a "left or
right hooked horizontal line, of given length/width/color, at a
specific place"?

2. How can I instruct ConTeXt to put things where I want them?  In
plain TeX or LaTeX, I'd use a bunch of boxes, vskips etc; what is the
"ConTeXt way"?

Thanks in advance!

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