Re: [NTG-context] Custom lua script (updating and debugging)

2010-09-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I have also the experience that when the Lua file is placed where the LUA_PATH 
system variable points (or: see the documentation how exactly LUA_PATH works), 
than I can use the 'require' command and the Lua file will be found.

E.g.:

LUA_PATH = (...);C:\MyDir\?.lua

C:\MyDir\MyFile.lua:

print(This is MyFile.lua)

And a ctx file:

\startluacode
  require(MyFile)
\stopluacode

- Will print This is MyFile.lua to the output stream when converting .tex to 
(e.g.) .pdf.

Lukas


On Tue, 28 Sep 2010 21:30:32 +0200, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:


On Tue, Sep 28, 2010 at 12:41, Stefan Müller wrote:

Hi list,

I'm currently messing around with a custom lua script (a pretty printer) and
I have some beginner trouble.

First: I put the file in MyContexDir\tex\texmf\tex\context\base\.


Put them into
MyContexDir\tex\texmf-local\tex\context\user\
because:
- You need to use texmf-local instead of texmf, else your file might
be deleted when you update the distribution.
- It doesn't really matter where the file is as long as it is under
[TEXMF]\tex\context, but using user is somehow more sensible than
base.


What do
I have to do to let ConTeXt work with the script and to let ConTeXt know
that something has changed in the script? Is context --generate enough
(after initializing with setuptex.bat)?


You need to use context --generate only when you add the script for
the first time. After you modify it, you don't need to do anything
unless you are changing ConTeXt source. If you change ConTeXt source,
you need to also run context --make (but that would be dangerous
anyway).


Second: How can I debug errors in my *.lua file? Just put
 print(debug message)
in the function that is (supposed to be) called?


Yes, or tex.print (depending on how you want to debug).

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
___




--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] insert pagebreak in toc (MkIV)

2010-09-29 Thread Steffen Wolfrum

Am 28.09.2010 um 12:33 schrieb Mari Voipio:

 On Tue, Sep 28, 2010 at 12:19, Steffen Wolfrum cont...@st.estfiles.de wrote:
 \completecontent[pageboundaries={20.3,30}]
 
 
 In current context it doesn't show any effect.
 Is it obsolete in MkIV?
 
 It works for me, even in the fairly complex files that I recently
 upgraded from MKII to MKIV. I would've gone back to using MKII if it
 didn't work...
 
 BTW, my magic line is
 \placecontent[pageboundaries={5.2}]
 
 (I do the TOC heading separately.)
 
 I just tested it works, my ConTeXt is ver 2010.09.22.


If I use eg. pageboundaries={I.} it seems to work ... but:
it works on *all* sections with I.!!

If I want to be more precise and use pageboundaries={B.I.} it does not show any 
effect.

So my assumption is: the pageboundaires command only works if I have a 
full-path list, like this ...

A. Test
B. Test
B.I. Test
B.II. Test
C. Test

But mine looks like this:

A. Test
B. Test
  I. Test
  II. Test
C. Test


Am I right, that pageboundaries doesn't work with the second setup?!

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] Custom lua script (updating and debugging)

2010-09-29 Thread Hans Hagen

On 29-9-2010 8:50, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I have also the experience that when the Lua file is placed where the
LUA_PATH system variable points (or: see the documentation how exactly
LUA_PATH works), than I can use the 'require' command and the Lua file
will be found.

E.g.:

LUA_PATH = (...);C:\MyDir\?.lua

C:\MyDir\MyFile.lua:

print(This is MyFile.lua)

And a ctx file:

\startluacode
require(MyFile)
\stopluacode

- Will print This is MyFile.lua to the output stream when converting
.tex to (e.g.) .pdf.


texmf-[local|project]/scripts/context/lua

should work out ok with require, given that you also have regenerated 
the file database



Lukas


On Tue, 28 Sep 2010 21:30:32 +0200, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:


On Tue, Sep 28, 2010 at 12:41, Stefan Müller wrote:

Hi list,

I'm currently messing around with a custom lua script (a pretty
printer) and
I have some beginner trouble.

First: I put the file in MyContexDir\tex\texmf\tex\context\base\.


Put them into
MyContexDir\tex\texmf-local\tex\context\user\
because:
- You need to use texmf-local instead of texmf, else your file might
be deleted when you update the distribution.
- It doesn't really matter where the file is as long as it is under
[TEXMF]\tex\context, but using user is somehow more sensible than
base.


What do
I have to do to let ConTeXt work with the script and to let ConTeXt know
that something has changed in the script? Is context --generate enough
(after initializing with setuptex.bat)?


You need to use context --generate only when you add the script for
the first time. After you modify it, you don't need to do anything
unless you are changing ConTeXt source. If you change ConTeXt source,
you need to also run context --make (but that would be dangerous
anyway).


Second: How can I debug errors in my *.lua file? Just put
print(debug message)
in the function that is (supposed to be) called?


Yes, or tex.print (depending on how you want to debug).

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
___








--

-
  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] bug with columnsets in projects

2010-09-29 Thread Steffen Wolfrum

Am 28.09.2010 um 16:25 schrieb Steffen Wolfrum:

 Hi,
 
 please see attached example:
 
 If you run the file containing the columnset directly (chap_X) it runs fine.
 
 But if you run MyProduct.tex there is an error:
 
 
 
 ! Missing } inserted.
 
 system   error on line 21 in file MyProduct.tex: Missing  ...
 
 11 %\component TOCtocDatei
 12 \stopfrontmatter
 13 %
 14 \startbodymatter
 15 \component chap_X
 16 %\component teil_1
 17 %\component teil_2
 18 %\component teil_3
 19 %\component teil_4
 20 %\component teil_5
 21   \stopbodymatter
 22 %
 23 \startbackmatter
 24 %\component register
 25 \stopbackmatter
 26 \stopproduct
 
 inserted text 
}
 to be read again 
   \endgroup 
 l.21 \stopbodymatter
 
 ? 
 
 
 
 
 This is with MkIV.



If I would use columns instead of columnsets there is also an error, but 
different:

systems : end file chap_X at line 15
structure   : end of sectionblock bodypart
backends using xmp file 
'/Users/steffen/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1, subpage 1
structure   : begin of sectionblock backpart
structure   : end of sectionblock backpart
)
*


Hope that helps?

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] bug with columnsets in projects

2010-09-29 Thread Steffen Wolfrum

Am 29.09.2010 um 09:27 schrieb Steffen Wolfrum:

 
 Am 28.09.2010 um 16:25 schrieb Steffen Wolfrum:
 
 Hi,
 
 please see attached example:
 
 If you run the file containing the columnset directly (chap_X) it runs fine.
 
 But if you run MyProduct.tex there is an error:
 
 
 
 ! Missing } inserted.
 
 system   error on line 21 in file MyProduct.tex: Missing  ...
 
 11 %\component TOCtocDatei
 12 \stopfrontmatter
 13 %
 14 \startbodymatter
 15 \component chap_X
 16 %\component teil_1
 17 %\component teil_2
 18 %\component teil_3
 19 %\component teil_4
 20 %\component teil_5
 21   \stopbodymatter
 22 %
 23 \startbackmatter
 24 %\component register
 25 \stopbackmatter
 26 \stopproduct
 
 inserted text 
   }
 to be read again 
  \endgroup 
 l.21 \stopbodymatter
 
 ? 
 
 
 
 
 This is with MkIV.
 
 
 
 If I would use columns instead of columnsets there is also an error, but 
 different:
 
 systems : end file chap_X at line 15
 structure   : end of sectionblock bodypart
 backends using xmp file 
 '/Users/steffen/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
 pagesflushing realpage 1, userpage 1, subpage 1
 structure   : begin of sectionblock backpart
 structure   : end of sectionblock backpart
 )
 *


In this case (columns) it would help to include the file not as a \component 
but as a regular file via \input.
This runs without * error.

Yet, trying the same with the original case (columnsets) fails: this just does 
not get processed!
Again a } is supposed to be missing.


Can someone confirm this? Is there a workaround?

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
___


[NTG-context] Interline space in block quotes

2010-09-29 Thread Andreas Harder
Hi all,

it is not possible to adapt the interline space in delimited text environments 
(without explicit add a \par) anymore. Example:

\setupdelimitedtext[blockquote][style=small]
\starttext
\input tufte
\startblockquote
  \input tufte % \par
\stopblockquote
\input tufte
\stoptext

Greeting
Andreas
___
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] prevent page break after head

2010-09-29 Thread Andreas Harder
Hi all,

please have a look at the following example:

\starttext \showframe
\section{test}
\dorecurse{36}{test\par}
\section{test}
\startitemize
  \dorecurse{12}{\item #1}
\stopitemize
% \dorecurse{12}{• #1\blank}
\stoptext

I would like to prevent the page break after the second section. It works okay 
if the head is followed by normal text.

Is there a key I have not found yet? I tried all kind of combinations …

Greeting
Andreas
___
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] prevent page break after head

2010-09-29 Thread Steffen Wolfrum

Am 29.09.2010 um 10:21 schrieb Andreas Harder:

 Hi all,
 
 please have a look at the following example:
 
 \starttext \showframe
 \section{test}
 \dorecurse{36}{test\par}
 \section{test}
 \startitemize
  \dorecurse{12}{\item #1}
 \stopitemize
 % \dorecurse{12}{• #1\blank}
 \stoptext
 
 I would like to prevent the page break after the second section. It works 
 okay if the head is followed by normal text.
 
 Is there a key I have not found yet? I tried all kind of combinations …


Just add a \testpage[4] before the second \section{test}

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] prevent page break after head

2010-09-29 Thread Andreas Harder

Am 29.09.2010 um 10:29 schrieb Steffen Wolfrum:

 
 Am 29.09.2010 um 10:21 schrieb Andreas Harder:
 
 Hi all,
 
 please have a look at the following example:
 
 \starttext \showframe
 \section{test}
 \dorecurse{36}{test\par}
 \section{test}
 \startitemize
 \dorecurse{12}{\item #1}
 \stopitemize
 % \dorecurse{12}{• #1\blank}
 \stoptext
 
 I would like to prevent the page break after the second section. It works 
 okay if the head is followed by normal text.
 
 Is there a key I have not found yet? I tried all kind of combinations …
 
 
 Just add a \testpage[4] before the second \section{test}

Thank you! This works. So I will try 
\setuphead[section][before={\testpage[4]\blank[2*big]}]. But I'm curious, why 
do it work with normal text?

\starttext \showframe
\section{test}
\dorecurse{36}{test\par}
\section{test}
\dorecurse{12}{• #1\blank}
\stoptext

Andreas
___
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] poster in context

2010-09-29 Thread Jan Pohanka

Hello,
I wonder how to create a poster presentation using ConTeXt.
It should have following layout.
 _
|   title, ...|
 _
| |
| |
|  text in 3 columns  |
|  with titles etc.   |
| |
 _
|  acknowledgement|
 _

Is there any way to fix the height of the depicted areas? Now I use  
columnset for the main text. Maybe layers can be useful?


regards
Jan


--
Ing. Jan Pohanka
Department of Measurement
Faculty of Electrical Engineering
Czech Technical University in Prague
Technická 2, 16627 Praha 6
tel. 224352058
email: poha...@fel.cvut.cz
___
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] insert pagebreak in toc (MkIV)

2010-09-29 Thread Hans Hagen

On 29-9-2010 9:22, Steffen Wolfrum wrote:


Am 28.09.2010 um 12:33 schrieb Mari Voipio:


On Tue, Sep 28, 2010 at 12:19, Steffen Wolfrumcont...@st.estfiles.de  wrote:

\completecontent[pageboundaries={20.3,30}]



In current context it doesn't show any effect.
Is it obsolete in MkIV?


It works for me, even in the fairly complex files that I recently
upgraded from MKII to MKIV. I would've gone back to using MKII if it
didn't work...

BTW, my magic line is
\placecontent[pageboundaries={5.2}]

(I do the TOC heading separately.)

I just tested it works, my ConTeXt is ver 2010.09.22.



If I use eg. pageboundaries={I.} it seems to work ... but:
it works on *all* sections with I.!!

If I want to be more precise and use pageboundaries={B.I.} it does not show any 
effect.

So my assumption is: the pageboundaires command only works if I have a 
full-path list, like this ...


wrong assumption. the page boundary mechanism has never been adapted to 
the new structure code


so, I've decided to kick out pageboundaries and provide a more general 
mechanism


\definelistextra[page][before=\page,after=\page]

\starttext

\placelist[chapter,section][criterium=text,extras={1.1=page}]

\chapter{x1}
\section{xx1}
\section{xx2}
\chapter{y2}
\section{yy1}
\section{yy2}

\stoptext

the specification passed in extras uses numbers i.e. no funny 
conversions and strips leading and trailing zero numbered sections.


-
  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] insert pagebreak in toc (MkIV)

2010-09-29 Thread Steffen Wolfrum

Am 29.09.2010 um 10:55 schrieb Hans Hagen:

 On 29-9-2010 9:22, Steffen Wolfrum wrote:
 
 Am 28.09.2010 um 12:33 schrieb Mari Voipio:
 
 On Tue, Sep 28, 2010 at 12:19, Steffen Wolfrumcont...@st.estfiles.de  
 wrote:
 \completecontent[pageboundaries={20.3,30}]
 
 
 In current context it doesn't show any effect.
 Is it obsolete in MkIV?
 
 It works for me, even in the fairly complex files that I recently
 upgraded from MKII to MKIV. I would've gone back to using MKII if it
 didn't work...
 
 BTW, my magic line is
 \placecontent[pageboundaries={5.2}]
 
 (I do the TOC heading separately.)
 
 I just tested it works, my ConTeXt is ver 2010.09.22.
 
 
 If I use eg. pageboundaries={I.} it seems to work ... but:
 it works on *all* sections with I.!!
 
 If I want to be more precise and use pageboundaries={B.I.} it does not show 
 any effect.
 
 So my assumption is: the pageboundaires command only works if I have a 
 full-path list, like this ...
 
 wrong assumption. the page boundary mechanism has never been adapted to the 
 new structure code
 
 so, I've decided to kick out pageboundaries and provide a more general 
 mechanism
 
 \definelistextra[page][before=\page,after=\page]

a very inspiring mechanism, great!


 \starttext
 
\placelist[chapter,section][criterium=text,extras={1.1=page}]
 
\chapter{x1}
\section{xx1}
\section{xx2}
\chapter{y2}
\section{yy1}
\section{yy2}
 
 \stoptext
 
 the specification passed in extras uses numbers i.e. no funny conversions and 
 strips leading and trailing zero numbered sections.

:o)

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] Interline space in block quotes

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 10:01 schrieb Andreas Harder:

 Hi all,
 
 it is not possible to adapt the interline space in delimited text 
 environments (without explicit add a \par) anymore. Example:
 
 \setupdelimitedtext[blockquote][style=small]

\setupdelimitedtext[blockquote][before=\smallbodyfont]

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] prevent page break after head

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 10:21 schrieb Andreas Harder:

 Hi all,
 
 please have a look at the following example:
 
 \starttext \showframe
 \section{test}
 \dorecurse{36}{test\par}
 \section{test}
 \startitemize

\startitemize[intro]

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] Bug in \type

2010-09-29 Thread Hans Hagen

On 28-9-2010 2:38, Aditya Mahajan wrote:

Hi,

There is a bug in buff-ver.mkiv. Minimal example:

\starttext
\type+\test{+
\stoptext


fixed in next beta

-
  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] prevent page break after head

2010-09-29 Thread Andreas Harder

Am 29.09.2010 um 13:22 schrieb Wolfgang Schuster:

 
 Am 29.09.2010 um 10:21 schrieb Andreas Harder:
 
 Hi all,
 
 please have a look at the following example:
 
 \starttext \showframe
 \section{test}
 \dorecurse{36}{test\par}
 \section{test}
 \startitemize
 
 \startitemize[intro]

Thank you for both hints, Wolfgang! 

Andreas
___
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] font sizes (again)

2010-09-29 Thread Florian Wobbe
Hi,

please regard this minimal example:

\setupbodyfont[10pt]
\starttext
\title{Title}
\section{Section}
{\switchtobodyfont[big] big}
{\switchtobodyfont[small] small}
{\tfxx tfxx}
{\tfx tfx}
{\tfa tfa}
{\tfb tfb}
{\tfc tfc}
{\tfd tfd}
\stoptext

Latin Modern Regular is available in different optical sizes - 
lmroman{5,6,7,8,9,10,12,17}-regular.otf - and as context is aware of these 
sizes (configured in typescripts) I wonder why they are not correctly assigned. 
This table indicates what happens instead:

\tfxx 6pt- lmroman6 (as expected)
\tfx  8pt- lmroman8 (as expected)
\tftf 10pt   - lmroman10 (as expected)
\tfa  12.0pt - lmroman10 (instead of lmroman12)
\tfb  14.4pt - lmroman10 (instead of lmroman12)
\tfc  17.3pt - lmroman10 (instead of lmroman17)
\tfd  20.7pt - lmroman10 (instead of lmroman17)

\switchtobodyfont[small]  8pt  - lmroman8 (as expected)
\switchtobodyfont[big]12pt - lmroman12 (as expected)

\title   17.3pt - lmroman10 (instead of lmroman17)
\section 12pt   - lmroman10 (instead of lmroman12)

The commands \title and \section and the font size switches \tfa, b, c, and d 
scale the font to the correct size, however, the wrong optical size is 
assigned. Note, this is not the case for \tfx, xx and \switchtobodyfont. Tested 
in MKIV and MKII (current beta).

Is this a bug or a feature?

Cheers
Florian

___
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] Cambria Math, sum

2010-09-29 Thread Patrick Gundlach
Hi all,

I am pretty sure that this has been asked before (and is already solved)

With
---
\usetypescript[cambria]
\setupbodyfont[cambria]
\starttext
\startformula
\sum_{1  i  10}^j i + 42^{-2} %doesn't make any sense, I know
\stopformula
\stoptext
---

the sum sign is too small for my taste (the size of the line height). What is 
going wrong here? Is it the font or did I forget anything?

Patrick


MTXrun | current version: 2010.09.13 11:06


inline: cambriasample.png___
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] Cambria Math, sum

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 14:34 schrieb Patrick Gundlach:

 Hi all,
 
 I am pretty sure that this has been asked before (and is already solved)

Works here with the latest beta: ConTeXt  ver: 2010.09.28 23:57 MKIV  fmt: 
2010.9.29  int: english/english

BTW: You don’t need \usetypescript in mkiv when the name of the typeface is the 
same as the name of the typescript

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] Cambria Math, sum

2010-09-29 Thread Patrick Gundlach
Hello Wolfgang, Florian and others

 
 Works here with the latest beta: ConTeXt  ver: 2010.09.28 23:57 MKIV  fmt: 
 2010.9.29  int: english/english

Now that I've got two responses that it works fine, I've updated my 
installation and now I have a perfect result. Sorry for the noise.


 
 BTW: You don’t need \usetypescript in mkiv when the name of the typeface is 
 the same as the name of the typescript

Good to know!

Thank you

Patrick

___
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] Cambria and companion fonts

2010-09-29 Thread Patrick Gundlach

While looking at Cambria, is there any typescript (or something similar) that 
defines for example Corbel or Candara as a companion to Cambria?


Patrick


___
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] Cambria and companion fonts

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 14:52 schrieb Patrick Gundlach:

 
 While looking at Cambria, is there any typescript (or something similar) that 
 defines for example Corbel or Candara as a companion to Cambria?

No but you can write your own typescript:

\definetypeface [mainface] [rm] [serif] [cambria]  [default]
\definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
\definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
\definetypeface [mainface] [mm] [math]  [cambria]  [default]

\setupbodyfont[mainface]

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] Calling Lua function from an external package

2010-09-29 Thread Procházka Lukáš

Hello,

I have the following problem.

Let's have T~.lua file which defines a function:

---
function F2()
  context(draw (0,0)--(5cm,0))
end

print(T~OK!)
---

Let's have MP-02.ctx ConTeXt source file:

---
\starttext
  AAA

  \startluacode
function F()
  context(draw (0,0)--(2cm,0))
end

require(T~)

context.startMPcode()
F()
-- F2()
context.stopMPcode()
  \stopluacode
\stoptext
---

Such code works OK - produces .pdf with a text AAA and a horizontal line.

You can find the text T~OK! in the compilation log - that means T~.lua was 
successfully loaded.

When I remove comment marks in front of F2() (which is defined in T~.lua), so I 
get:

---
\starttext
  AAA

  \startluacode
function F()
  context(draw (0,0)--(2cm,0))
end

require(T~)

context.startMPcode()
F()
F2()
context.stopMPcode()
  \stopluacode
\stoptext
---

the compilation to .pdf fails with the following error message:

---
MTXrun | run 1: luatex 
--fmt=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/f53042fa2e1c106bc7e3383ec8c3a00c/formats/cont-en
 
--lua=c:/ConTeXt/tex/texmf-cache/luatex-cache/context/f53042fa2e1c106bc7e3383ec8c3a00c/formats/cont-en.lui
 --backend=pdf ./MP
-02.ctxThis is LuaTeX, Version beta-0.63.0-2010090921 (rev 3873)
 \write18 enabled.
(MP-02.ctx
jobcontrol   resuming randomizer with 0.40830713827937

ConTeXt  ver: 2010.09.22 12:33 MKIV  fmt: 2010.9.22  int: english/english

system  : cont-new loaded
(c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv))
system  : cont-fil loaded
(c:/ConTeXt/tex/texmf-context/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system  : cont-sys.rme loaded
(c:/ConTeXt/tex/texmf-context/tex/context/user/cont-sys.rme 
(c:/ConTeXt/tex/texmf-context/tex/context/base/type-def.mkiv) 
(c:/ConTeXt/tex/texmf-context/tex/context/base/type-lua.mkiv) 
(c:/ConTeXt/tex/texmf-context/tex/context/base/type-siz.mkiv) (c:/ConTeX
t/tex/texmf-context/tex/context/base/type-otf.mkiv))
system  : cont-err loaded
(c:/ConTeXt/tex/texmf-context/tex/context/base/cont-err.tex
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
)
system  : MP-02.top loaded
(MP-02.top)
fonts   : preloading latin modern fonts
{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{c:/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
bodyfont: 12pt rm is loaded
language: language en is active
publications: loading formatting style from bxml-apa
(c:/ConTeXt/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file MP-02.ctx at line 1
T~OK!
mplib   : initializing instance 'metafun' using format 'metafun'
mplib   : loading 'metafun.mp' (experimental metapost version two)
! mp terminal: ! Extra tokens will be flushed.
to be read again
   addto
draw-addto
   .currentpicture.if.picture(EXPR0):also(EXPR0)else:doublepath(EXPR...
to be read again
   ;
* draw (0,0)--(2cm,0)draw (0,0)--(5cm,0);


.

system   error on line 4 in file MP-02.ctx: mp terminal: ! Extra 
tokens will be flushed.
to be read again
   addto
draw-addto
   .currentpicture.if.picture(EXPR0):also(EXPR0)else:doublepath(EXPR...
to be read again
   ;
* draw (0,0)--(2cm,0)draw (0,0)--(5cm,0);


 ...

 1 \starttext
 2   AAA
 3
 4 \startluacode
 5 function F()
 6   context(draw (0,0)--(2cm,0))
 7 end
 8
 9 require(T~)
10
11 context.startMPcode()
12 F()
13 F2()
14 context.stopMPcode()

inserted text ...re.mp ; fi ; ]===], false)}

\processMPgraphic ...e ;\!!es , \MPaskedfigure )}}
  \egroup \placeMPgraphic \d...
l.4 \stopMPcode

  } context.stopMPcode()

\dodostartluacode ...d \directlua \zerocount {#1}}

l.15   \stopluacode
---

It's strange to me, especially when body of F() and F2() is almost identical.

Why? And how do I make it work (I mean still having a function defined in a 
separate file)?

Thank you in advance.

Cheers,

Lukas

T~.lua
Description: Binary data


MP-02.ctx
Description: Binary data
___
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] Cambria/Asana/Neo-Euler (n\choose k)

2010-09-29 Thread Andreas Harder
Hi again.

When it comes to OpenType math fonts …

% \setupbodyfont[cambria]
% \setupbodyfont[asana]
\setupbodyfont[euler]

\startTEXpage[offset=1ex]
  $n\choose k$
\stopTEXpage

The output ist still wrong with the newest beta. It works ok with Type 1 fonts.

Greeting
Andreas
___
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] Calling Lua function from an external package

2010-09-29 Thread Hans Hagen

On 29-9-2010 3:02, Procházka Lukáš wrote:

Hello,

I have the following problem.

Let's have T~.lua file which defines a function:


hm, what is this ~ doing there ... avoid such characters! ~ is HOME on 
some systems


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
___


[NTG-context] structure levels

2010-09-29 Thread Hans Hagen

Hi Alan,

I added a default set

\starttext

\startstructurelevel [title=first top level]

\startstructurelevel [title=first lower level]
\startstructurelevel [title=second lower level]
\startstructurelevel [title=third lower level]
test
\stopstructurelevel
\stopstructurelevel
\stopstructurelevel

\startstructurelevel [title=first lower level]
\startstructurelevel [title=second lower level]
\startstructurelevel [title=third lower level]
test
\stopstructurelevel
\stopstructurelevel
\stopstructurelevel

\stopstructurelevel

\stoptext

this uses

\definestructurelevels
  [default]
  [chapter,
   section,
   subsection,
   subsubsection,
   subsubsubsection,
   subsubsubsubsection]

The more verbose variant is still there:

\definehead[xxsection][subsubsection]
\setuphead [xxsection][color=red]

\definestructurelevels[main][chapter,section,subsection,subsubsection]
\definestructurelevels[next][chapter,section,subsection,xxsection]

\starttext

\startstructurelevel [main] [title=first top level]

\startstructurelevel [main] [title=first lower level]
\startstructurelevel [main] [title=second lower level]
\startstructurelevel [main] [title=third lower level]
test
\stopstructurelevel
\stopstructurelevel
\stopstructurelevel

\startstructurelevel [main] [title=first lower level]
\startstructurelevel [main] [title=second lower level]
\startstructurelevel [next] [title=third lower level]
test
\stopstructurelevel
\stopstructurelevel
\stopstructurelevel

\stopstructurelevel

\stoptext


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] Cambria and companion fonts

2010-09-29 Thread Patrick Gundlach


 While looking at Cambria, is there any typescript (or something similar) 
 that defines for example Corbel or Candara as a companion to Cambria?
 
 No but you can write your own typescript:
 
 \definetypeface [mainface] [rm] [serif] [cambria]  [default]
 \definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
 \definetypeface [mainface] [tt] [mono]  [consolas] [default] [rscale=auto]
 \definetypeface [mainface] [mm] [math]  [cambria]  [default]
 
 \setupbodyfont[mainface]

OK, I see. (I only searched the .tex files, but missed the .mkiv while 
searching for corbel). Thanks again!


But even if I had seen the lines with corbel, I would have asked how to use the 
typescript. The definition in type-otf.mkiv goes like:

\starttypescript [sans] [corbel] [name]
...
...
\stoptypescript


I guess [name] is just a default classifier for defining the base level of a 
filename-font mapping, right? I assume that somewhere there is a statement like

\usetypescript [sans] [corbel] [name]

after saying 

\definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]

Is this the way this is done internally?

What exactly is rscale=auto ?


Patrick

___
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] Calling Lua function from an external package

2010-09-29 Thread Taco Hoekwater


On 09/29/10 15:10, Hans Hagen wrote:
 On 29-9-2010 3:02, Procházka Lukáš wrote:
 Hello,

 I have the following problem.

 Let's have T~.lua file which defines a function:
 
 hm, what is this ~ doing there ... avoid such characters! ~ is HOME on
 some systems

That is true of course, but the problem is much simpler than that:

  Make sure you end your metapost expressions with a semicolon.

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
___


Re: [NTG-context] Cambria and companion fonts

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 15:25 schrieb Patrick Gundlach:

 I guess [name] is just a default classifier for defining the base level of a 
 filename-font mapping, right?

It’s a leftover from mkii where you had [name] and [texnansi,ec,...], the first 
was to map from “Serif” etc. to the symbolic name (e.g. PalatinoItalic) and the 
other to map the symbolic name to the font file.

 I assume that somewhere there is a statement like
 
 \usetypescript [sans] [corbel] [name]
 
 after saying 
 
 \definetypeface [mainface] [ss] [sans]  [corbel]   [default] [rscale=auto]
 
 Is this the way this is done internally?

This was always the case, even in mkii.

 What exactly is rscale=auto ?

Instead of giving a scale factor (e.g. factor=1.1) you can say auto and context 
use the font information to scale the sans font to the same size as the serif 
font.

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] Calling Lua function from an external package

2010-09-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .

... Thanks, it works now! It had to be fixed both in F() and in F2().

(I forgot ; in MP statement as Lua doesn't require ;.)

(Still it's a bit strange to me that calling F() worked even when the MP statement in F() 
was not finished by ; and F2() was not called.)

Lukas


On Wed, 29 Sep 2010 15:27:14 +0200, Taco Hoekwater t...@elvenkind.com wrote:




On 09/29/10 15:10, Hans Hagen wrote:

On 29-9-2010 3:02, Procházka Lukáš wrote:

Hello,

I have the following problem.

Let's have T~.lua file which defines a function:


hm, what is this ~ doing there ... avoid such characters! ~ is HOME on
some systems


That is true of course, but the problem is much simpler than that:

  Make sure you end your metapost expressions with a semicolon.

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
___




--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___
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] Calling Lua function from an external package

2010-09-29 Thread Stefan Müller
I think that ; is not needed to end an MP statement but to separate 
two of them. So it works without as long as you only have one MP statement.


Stefan

On 29.09.2010 15:35, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

... Thanks, it works now! It had to be fixed both in F() and in F2().

(I forgot ; in MP statement as Lua doesn't require ;.)

(Still it's a bit strange to me that calling F() worked even when the MP
statement in F() was not finished by ; and F2() was not called.)

Lukas

___
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] Cambria and companion fonts

2010-09-29 Thread Florian Wobbe

 What exactly is rscale=auto ?
 
 Instead of giving a scale factor (e.g. factor=1.1) you can say auto and 
 context use the font information to scale the sans font to the same size as 
 the serif font.

How does it work internally? Or on which font parameters does this depend on 
(e.g. x-height, font em-units etc.)? Consider the following example which does 
not work here (Modern Typewriter is scaled to small):

\definetypeface [mainface] [rm] [serif] [cambria]  [default]
\definetypeface [mainface] [tt] [mono]  [modern]   [default] [rscale=auto]

Florian
___
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] # in type in tabulate

2010-09-29 Thread Patrick Gundlach
Hi,

this breaks, any workaround?


---
\starttext
\type{#ok}

\starttabulate[|p(4cm)|]
\NC \type{#not ok}\NC\NR  % --- bang!
\stoptabulate
\stoptext
---

Patrick
___
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] # in type in tabulate

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 16:50 schrieb Patrick Gundlach:

 Hi,
 
 this breaks, any workaround?

\asciimode

\starttext

#ok \mono{#ok}

\starttabulate[|p(4cm)|]
\NC \mono{#not ok}\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] # in type in tabulate

2010-09-29 Thread Hans Hagen

On 29-9-2010 4:50, Patrick Gundlach wrote:

\starttext


\asciimode


\type{#ok}

\starttabulate[|p(4cm)|]
\NC \type{#not ok}\NC\NR  %--- bang!
\stoptabulate
\stoptext





-
  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] # in type in tabulate

2010-09-29 Thread luigi scarso
On Wed, Sep 29, 2010 at 5:00 PM, Hans Hagen pra...@wxs.nl wrote:
 On 29-9-2010 4:50, Patrick Gundlach wrote:

 \starttext

 \asciimode
sorry Hans, nothing to do with SuperWolfgang

-- 
luigi
___
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] # in type in tabulate

2010-09-29 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

I found no records to \asciimode or \mono at 
http://wiki.contextgarden.net/Category:Reference/en.

Could they be added? - Even with no description, just to get to know they are 
valid ConTeXt commands.

Lukas


On Wed, 29 Sep 2010 16:58:51 +0200, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:



Am 29.09.2010 um 16:50 schrieb Patrick Gundlach:


Hi,

this breaks, any workaround?


\asciimode

\starttext

#ok \mono{#ok}

\starttabulate[|p(4cm)|]
\NC \mono{#not ok}\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] # in type in tabulate

2010-09-29 Thread Patrick Gundlach
Hello Hans, Wolfgang,

 \asciimode
 
 \starttext
 
 #ok \mono{#ok}

Thanks agin.

I've heard about \asciimode but forgot about it.

Is there any difference between \mono{...} and \type{...}? I guess that type 
does much more to catcodes, but apart from that, both seem to be similar.

Patrick

___
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] # in type in tabulate

2010-09-29 Thread Aditya Mahajan

On Wed, 29 Sep 2010, Patrick Gundlach wrote:

Is there any difference between \mono{...} and \type{...}? I guess that 
type does much more to catcodes, but apart from that, both seem to be 
similar.


- \type typesets its argument verbatim (catcodes, spaces, etc).

- \type has two variants \type{...} (but braces have usual catcode inside
  the arugment, or \type!...! \type+...+ (basically, \typechar...char)
  where everything other than the first char has other catcode. This is
  useful if the argument has unbalanced brances.

- \type may fail in commands that store their arguments to aux files
  (\section, etc) or commands that process their arguments twice (\bTABLE,
  etc) or carry around their arguments (\footnote, etc). In some of these
  cases, using \retype{...} instead works.

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] # in type in tabulate

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 17:37 schrieb Patrick Gundlach:

 Is there any difference between \mono{...} and \type{...}? I guess that type 
 does much more to catcodes, but apart from that, both seem to be similar.

\mono{...} is only another form of {\tt ...} and switch to the typewriter font 
but \type is verbatim mode

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] # in type in tabulate

2010-09-29 Thread Aditya Mahajan

On Wed, 29 Sep 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote:


Hello,

I found no records to \asciimode or \mono at 
http://wiki.contextgarden.net/Category:Reference/en.


Well, the command was added 15-20 days ago to the core...

Could they be added? - Even with no description, just to get to know they are 
valid ConTeXt commands.


Feel free to add it.

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] # in type in tabulate

2010-09-29 Thread Hans Hagen

On 29-9-2010 5:37, Procházka Lukáš Ing. - Pontex s. r. o. wrote:

Hello,

I found no records to \asciimode or \mono at
http://wiki.contextgarden.net/Category:Reference/en.


they were added recently after some discussion with Aditya ... a sort of 
prelude to getting rid of special catcodes


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] placefigure ?

2010-09-29 Thread R. Bastian
On Tue, 28 Sep 2010 13:39:56 +0300
Mari Voipio mari.voi...@iki.fi scribit:

 On Tue, Sep 28, 2010 at 13:22, R. Bastian rbast...@free.fr wrote:
  In Mk II, I need to place figures - with numbers and captions -
  but \placefigure is for floats and never places the figure [here].
  Is there another way?
 
 I've found that mostly [here,force] will do the trick, but sometimes a
 judiciously placed \page helps, too. That is a bit of cheap and sleazy
 way of doing it and I only do that in the final round of layouting,
 but works for me.

[here, force] does when it wants :-)

I will reduce the  size of the 3 figures, add a 4th and play with 'combinatie' 
(2 x 2)
 
 I think the 'real' way would be using layers, but haven't gotten as
 far as to teaching myself *that*. See
 http://wiki.contextgarden.net/Layers for more information.

Layers are a graphic technique. 
 
 
 Regards,
 
 Mari
 ___

René Bastian
www.pythoneon.org
www.musiques-rb.org
___
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] Custom lua script (updating and debugging)

2010-09-29 Thread Stefan Müller

Sorry for replying to the wrong thread...

I just wanted to say that it works now. I justed started again from 
scratch and did the same as below. No idea what caused the trouble.


Thanks again,
Stefan.

On 28.09.2010 23:53, Stefan Müller wrote:

Hi,

thanks for the fast reply Mojca! Unfortunately it is still not working. Here
is what I did. I'm afraid it has possibly more to do with pretty printers in
particular (than lua scripts in general), but actually I have no idea.

I took the file
   MyConTeXtDir/tex/texmf-context/tex/context/base/pret-lua.lua
and copied it to
   MyConTeXtDir/tex/texmf-local/tex/context/user/pret-pas.lua
Next I replaced every occurance of lua in this new file by pas (so this
changed the name of one function and renamed the visualizer itself). Then I
ran context --generate.

My testfile is added below. The end is typeset as if pret-pas.lua wouldn't
exist. If I change option=PAS to option=LUA it works as intended (end is
green). What is going on here? Any help is appreciated.

\installprettytype[PAS][PAS]
\setupcolors[state=start]
\setuptyping[option=color]
\definetyping[PAS][option=PAS, escape=yes, tab=4, numbering=line]

\starttext \startPAS
end
\stopPAS \stoptext

Thanks in advance,
Stefan.

PS: Additional question: Is it possible to integrate option=color into the
\definetyping[PAS]? option={PAS,color}?
___
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] bug with columnsets in projects

2010-09-29 Thread Wolfgang Schuster

Am 28.09.2010 um 16:25 schrieb Steffen Wolfrum:

 Hi,
 
 please see attached example:
 
 If you run the file containing the columnset directly (chap_X) it runs fine.

The error message is misleading but after i copied everything in one file i 
found the culprit,
there is a invalid character in your chap_X file you can see in this message:

! Missing } inserted.

system   error on line 16 in file MyProduct.tex: Missing  ...

 6 
 7 \startcolumnset[INDEX]
 8 
 9 one
10 
11 \column
12 
13 two
14 ^^L\stopcolumnset
15 
16   \stopbodymatter
17 
18 \stopproduct

Remove the form feed between the two and \stopcolumnset and your document runs.

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] Lua programming conventions..

2010-09-29 Thread Jaroslav Hajtmar

Hello, all..
Where can I read something about Lua programming conventions?

I mean programming conventions labeling local and global variables, 
table fields, Lua variables in modules, variables in namespaces etc. etc...
When names are written in capital letters, sign reserved for system 
variables, etc.?


Thanx Jarda
___
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] bug with columnsets in projects

2010-09-29 Thread Steffen Wolfrum

Am 29.09.2010 um 20:05 schrieb Wolfgang Schuster:

 
 Am 28.09.2010 um 16:25 schrieb Steffen Wolfrum:
 
 Hi,
 
 please see attached example:
 
 If you run the file containing the columnset directly (chap_X) it runs fine.
 
 The error message is misleading but after i copied everything in one file i 
 found the culprit,
 there is a invalid character in your chap_X file you can see in this message:


Oh, then this really was misleading!
I never would have searched for this character ...

How did you recognize it?
You wear special glasses for seeing invisible characters, don't you?!


Whatever, thank you very, very much for your efforts :o)

Great!
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] Lua programming conventions..

2010-09-29 Thread luigi scarso
On Wed, Sep 29, 2010 at 8:30 PM, Jaroslav Hajtmar hajt...@gyza.cz wrote:
 Hello, all..
 Where can I read something about Lua programming conventions?

 I mean programming conventions labeling local and global variables, table
 fields, Lua variables in modules, variables in namespaces etc. etc...
 When names are written in capital letters, sign reserved for system
 variables, etc.?
http://www.lua.org/pil/
and context *lua files

-- 
luigi
___
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] bug with columnsets in projects

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 20:51 schrieb Steffen Wolfrum:

 Oh, then this really was misleading!
 I never would have searched for this character ...
 
 How did you recognize it?

1. Create a *minimal* example with only one file, yours was too big to notice 
the control command.

2. Take a look at the command line, in my example i saw ^^L as the problem in 
your text.

 You wear special glasses for seeing invisible characters, don't you?!

You need only a text editor which allows you to visualize control commands.

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] Formatting in TOC

2010-09-29 Thread Tomas Bures

Dear all,

I would like to generate a table of contents, where each item should 
have a number, title and date. I use the user variables this way:



\define[1]\ChapterListTextCommand{%
#1\hskip 1.5em
\hbox{
\doiftextelse{\structurelistuservariable{date}{(\structurelistuservariable{datum})}{}
}
}


But actually I would like to align the date to some fixed horizontal 
position. Something like this:


1. Title of chapter 1 (9.2.2010)  5
2. Title of another chapter   (10.3.2010) .. 10
3. A very long title of a chapter
  (10.5.2010) .. 34
4. Title of fourth chap.  (8.4.2010) ... 25

Another complication is that I would like the line to snap to a grid.
I tried it with framed, but I'm not good enough in ConTeXt.

Please, any idea?

Thank you, best regards,
Tomas

___
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] tagged pdf broken

2010-09-29 Thread Hans Hagen

On 29-9-2010 10:41, Steffen Wolfrum wrote:

Hi,

in todays beta (20100929) the tagged pdf is broken!

No tags are created and Preflight says:
An error occurred while parsing a contents stream


that's a side effect of a change in label mechanism (more generic as the 
letter module needs it own label namespace) and tags are a special 
(limited) variant of labels


I'll fix it

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] Formatting in TOC

2010-09-29 Thread Andreas Harder

Am 29.09.2010 um 23:16 schrieb Tomas Bures:

 Dear all,
 
 I would like to generate a table of contents, where each item should have a 
 number, title and date. I use the user variables this way:
 
 
 \define[1]\ChapterListTextCommand{%
 #1\hskip 1.5em
 \hbox{
 \doiftextelse{\structurelistuservariable{date}{(\structurelistuservariable{datum})}{}
 }
 }
 
 
 But actually I would like to align the date to some fixed horizontal 
 position. Something like this:
 
 1. Title of chapter 1 (9.2.2010)  5
 2. Title of another chapter   (10.3.2010) .. 10
 3. A very long title of a chapter
  (10.5.2010) .. 34
 4. Title of fourth chap.  (8.4.2010) … 25

Hi, isn't Wolfgangs posting 
http://archive.contextgarden.net/message/20100919.163604.e1f8cb40.en.html 
exactly what you search? You can adjust the table settings to achieve your 
needs.

Greeting
Andreas

___
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] [BUG] \placepublications[criterium=all] triggers error in ConTeXt 2010.09.29

2010-09-29 Thread Hongwen Qiu
 Please see the attached minimal example and its error log.
\placepublications[criterium=all] triggers error in ConTeXt 2010.09.29.
It works fine in ConTeXt 2010.09.24.
Both the luatex versions are beta-0.63.0-2010091123.
@unpublished{test,
title={Test},
author={test},
journal={Test},
year=2010,
month=9,
day=29,
}
sorters  using sort sequence: mm mc uc

(test.tex

ConTeXt  ver: 2010.09.29 15:00 MKIV  fmt: 2010.9.29  int: english/english

system  : cont-new loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-new.mkiv))
system  : cont-fil loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system  : cont-sys.rme loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/user/cont-sys.rme 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-def.mkiv) 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-lua.mkiv) 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-siz.mkiv) 
(/home/qiuhw/context/tex/texmf-context/tex/context/base/type-otf.mkiv))
system  : cont-err loaded
(/home/qiuhw/context/tex/texmf-context/tex/context/base/cont-err.tex
systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
)
system  : test.top loaded
%
%   begin of optionfile
%
%   % runtime options files (command line driven)
%   \unprotect
%   % feedback and basic job control
%   % handy for special styles
%   \startluacode
%   document = document or { }
%   document.arguments={
%   }
%   document.files={
%test,
%   }
%   \stopluacode
%   % process info
%   \setupsystem[inputfile=test]
%   \setupsystem[\c!n=1,\c!m=1]
%   % modes
%   % options (not that important)
%   \startsetups *runtime:options
%   \setupoutput[pdftex]
%   \stopsetups
%   % styles and modules
%   \startsetups *runtime:modules
%   \stopsetups
%   % done
%   \protect \endinput
%
%   end of optionfile
%
(test.top)
fonts   : preloading latin modern fonts
{/home/qiuhw/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/qiuhw/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{/home/qiuhw/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
bodyfont: 12pt rm is loaded
language: language en is active
publications: wrote a new auxiliary file cont-en.aux
publications: loading formatting style from bxml-apa
(/home/qiuhw/context/tex/texmf-context/tex/context/base/bxml-apa.mkiv)
systems : begin file test at line 3
! LuaTeX error ...text/tex/texmf-context/tex/context/base/strc-lst.lua:195: bad 
argument #1 to 'gsub' (string expected, got nil)
stack traceback:
[C]: in function 'gsub'
...text/tex/texmf-context/tex/context/base/strc-lst.lua:195: in 
function ...text/tex/texmf-context/tex/context/base/strc-lst.lua:192
(tail call): ?
...text/tex/texmf-context/tex/context/base/strc-lst.lua:392: in 
function 'analyze'
main ctx instance:1: in main chunk.

system   error on line 5 in file test.tex: LuaTeX error  ...

1 \setupbibtex[database=test]
2 
3 \starttext
4 \cite[test]
5   \placepublications[criterium=all]
6 \stoptext


\analyzestructurelist analyze(#1,#2,#3)}
  
\dodeterminelistcharacteristics ...ter \c!number }
  \xdef \utilitylistlength {...
to be read again 
   \initializepubslist 
\dodoplacepublications ...ubs]\initializepubslist 
  \doifnot {\namedlistparame...
l.5 \placepublications[criterium=all]
 
? X
mkiv lua stats : used config file  - 
/home/qiuhw/context/tex/texmf/web2c/texmfcnf.lua
mkiv lua stats : used cache path   - 
/home/qiuhw/context/tex/texmf-cache/luatex-cache/context/3525c3c2a591596c39048524c75fec75
mkiv lua stats : input load time   - 0.047 seconds
mkiv lua stats : stored bytecode data  - 239 modules, 56 tables, 295 chunks
mkiv lua stats : cleaned up reserved nodes - 30 nodes, 9 lists of 411
mkiv lua stats : node memory usage - 1 hlist, 3 glue, 1 penalty, 10 
glyph, 6 attribute, 20 glue_spec, 2 attribute_list, 1 temp, 1 local_par, 1 dir
mkiv lua stats : node list callback tasks  - 6 unique task lists, 1 instances 
(re)created, 281 calls
mkiv lua stats : used backend  - pdf (backend for directly 
generating pdf output)
mkiv lua stats : loaded patterns   - en::2
mkiv lua stats : callbacks - direct: 369, indirect: 4462, 
total: 4831
mkiv lua stats : result saved in file  - test.pdf
mkiv lua stats : loaded fonts  - 33 files: 

Re: [NTG-context] [BUG] \placepublications[criterium=all] triggers error in ConTeXt 2010.09.29

2010-09-29 Thread 李延瑞
在 2010年9月30日 上午10:32,Hongwen Qiu qiuhong...@gmail.com 写道:
  Please see the attached minimal example and its error log.
 \placepublications[criterium=all] triggers error in ConTeXt 2010.09.29.
 It works fine in ConTeXt 2010.09.24.
 Both the luatex versions are beta-0.63.0-2010091123.


It seems that the version of beta in repository is wrong. It is
2010.07.30 but not 2010.09.29.

-- 
Best regards,

Li Yanrui (李延瑞)
___
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] Formatting in TOC

2010-09-29 Thread Wolfgang Schuster

Am 29.09.2010 um 23:16 schrieb Tomas Bures:

 Dear all,
 
 I would like to generate a table of contents, where each item should have a 
 number, title and date. I use the user variables this way:
 
 
 \define[1]\ChapterListTextCommand{%
 #1\hskip 1.5em
 \hbox{
 \doiftextelse{\structurelistuservariable{date}{(\structurelistuservariable{datum})}{}
 }
 }

\define[1]\ChapterListTextCommand
  {\doifsomethingelse{\structurelistuservariable{date}}
 {#1\wordright{\structurelistuservariable{date}}}
 {#1}}

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
___