Re: [NTG-context] [solved] gnuplot: mpost: Not writing to .log (openout_any = p).

2011-12-12 Thread Hans Hagen

On 12-12-2011 01:28, Paul Menzel wrote:

Am Montag, den 12.12.2011, 01:20 +0100 schrieb Paul Menzel:

[…]


I am also getting other errors now and even moving the ConTeXt file to a
new directory I keep getting this error from `mpost`.

 fonts   : using map file: original-ams-euler
 [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1]
 [1.1] [1.1] [1.1] [1.1]
 systems : end file gnup-gnuplot-1-mp-temp at line 130
 (/srv/filme/context/tex/texmf-context/tex/context/base/cont-err.mkii
 systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead
 ) )
 Output written on gnup-gnuplot-1-mp-temp.dvi (16 pages, 1360 bytes).
 Transcript written on gnup-gnuplot-1-mp-temp.log.
 TeXExec | runtime: 0.244803

 This is MetaPost, version 1.504 (kpathsea version 6.0.0)

 mpost: Not writing to .log (openout_any = p).
 ! I can't write on file `.log'.
 Please type another transcript file name:


Once again I was hit by missing `\{start,stop}text` lines.


even then .. mp cannot write the log because you configuration is 
paranoid (which is what the p means in openout_any) so you need to fix 
your cnf file


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] OT: How to reference the ConTeXt project?

2011-12-12 Thread Paul Menzel
Dear Hans and ConTeXt folks,


how do you want me to reference ConTeXt? Is there an article you prefer
or should I just use the reference manual or the Wiki?

Hans Hagen and others (2011), http://contextgarden.net/


Thanks,

Paul


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
___

[NTG-context] pdfselect and context command?

2011-12-12 Thread Verhaag, G.C.H.M.

Hi ConTeXTt User's,

I was looking for the --pdfselect option in the context-command, but it 
doesn't seem to be available.


This option is available in texexec to select certain pages from a pdf file.

Can it also be done in some way using the context-command?

Regards,
Gerard Verhaag
___
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] pdfselect and context command?

2011-12-12 Thread Hans Hagen

On 12-12-2011 11:10, Verhaag, G.C.H.M. wrote:

Hi ConTeXTt User's,

I was looking for the --pdfselect option in the context-command, but it
doesn't seem to be available.

This option is available in texexec to select certain pages from a pdf
file.

Can it also be done in some way using the context-command?


context --extra=select --help


-
  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] Pagemakeup? Was Re: Layers + simplefonts: Using different font in layers?

2011-12-12 Thread Mari Voipio
On Fri, Dec 9, 2011 at 16:52, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:
 \placelayer use the area of the current block (in this case the text are), 
 one way out of this is to use the “pagemakeup” environment where all margins 
 are set to 0pt.

There were no results matching the query.

Create the page pagemakeup on this wiki!

i.e. the Garden can't help here - anybody have time to give me a quick
pagemakeup for dummies? I should be fairly content with couple of
minimal examples, mostlyI manage to elaborate from there once I get
the first thing working.


Thanks,

Mari
___
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] Pagemakeup? Was Re: Layers + simplefonts: Using different font in layers?

2011-12-12 Thread luigi scarso
On Mon, Dec 12, 2011 at 12:07 PM, Mari Voipio mari.voi...@iki.fi wrote:
 On Fri, Dec 9, 2011 at 16:52, Wolfgang Schuster
 schuster.wolfg...@googlemail.com wrote:
 \placelayer use the area of the current block (in this case the text are), 
 one way out of this is to use the “pagemakeup” environment where all margins 
 are set to 0pt.

 There were no results matching the query.

 Create the page pagemakeup on this wiki!

 i.e. the Garden can't help here - anybody have time to give me a quick
 pagemakeup for dummies? I should be fairly content with couple of
 minimal examples, mostlyI manage to elaborate from there once I get
 the first thing working.
Do you mean
http://wiki.contextgarden.net/Makeup
?

-- 
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] Pagemakeup? Was Re: Layers + simplefonts: Using different font in layers?

2011-12-12 Thread Wolfgang Schuster

Am 12.12.2011 um 12:07 schrieb Mari Voipio:

 On Fri, Dec 9, 2011 at 16:52, Wolfgang Schuster
 schuster.wolfg...@googlemail.com wrote:
 \placelayer use the area of the current block (in this case the text are), 
 one way out of this is to use the “pagemakeup” environment where all margins 
 are set to 0pt.
 
 There were no results matching the query.
 
 Create the page pagemakeup on this wiki!
 
 i.e. the Garden can't help here - anybody have time to give me a quick
 pagemakeup for dummies? I should be fairly content with couple of
 minimal examples, mostlyI manage to elaborate from there once I get
 the first thing working.

\definelayer[cover]

\starttext

\startpagemakeup[style={\switchtobodyfont[ss,24pt]}]

\setlayer[cover][x=3cm,y=4cm]{Place}
\setlayer[cover][x=8cm,y=12cm]{your}
\setlayer[cover][x=5cm,y=17cm]{text!}

\placelayer[cover]

\stoppagemakeup

\input knuth

\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] headers: numberconversion=something or \definestructureconversionset

2011-12-12 Thread Wolfgang Schuster

Am 08.12.2011 um 11:21 schrieb Philipp A.:

 hi list,
 
 i want to make an exercise sheet style. exercises are already correctly 
 rendered as “Exercise 1: Text”, but sub-exercises should simply be like 
 “a)”.
 
 what i tried:
 
 \definestructureconversionset[ex][numbers,characters][numbers]
 \setupheads[numberconversion=ex]

sectionconversionset=…

 and
 
 \setuphead[subsection][numberconversion=characters, …]

sectionconversion=…

 but i have no idea what i’m doing in the first case and even less idea of 
 what i’m doing wrong in the second.
 
 documentation would help in both cases, but contextgarden just has some (for 
 me) incomprehensible examples.

For a list with the correct names of the keys look here (the “conversion” in 
the pdf for \setuphead is wrong but i fixed it in my local version): 
https://bitbucket.org/wolfs/commands/downloads

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] \definestartstop (not functioning before/after keys)

2011-12-12 Thread Andreas Harder
Hi Hans,

has something changed with \definestartstop? Setting before and after do not 
change the output.

\definestartstop[test][before=\blank,after=\blank]
\starttext
  before \test{test} after
\stoptext

Tested with the current beta- and experimental-branch.


Regards
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] \definestartstop (not functioning before/after keys)

2011-12-12 Thread Wolfgang Schuster

Am 12.12.2011 um 12:55 schrieb Andreas Harder:

 Hi Hans,
 
 has something changed with \definestartstop? Setting before and after do not 
 change the output.
 
 \definestartstop[test][before=\blank,after=\blank]
 \starttext
  before \test{test} after
 \stoptext
 
 Tested with the current beta- and experimental-branch.

\starttext …\stoptest is not the same as \test{…}, while the environment use 
the before and after keys the command use the inbetween key.

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] \placelist after \chapter

2011-12-12 Thread Felix Ingram
Hi all,

I can't seem to get a list placed after a numbered heading. For example:

\starttext
\title{First one}
\placelist[chapter]
\chapter{Second one}
\placelist[chapter] % This won't be placed
\stoptext


Is this something I should be able to do? The reason I ask is that I'm
looking to generate a summary table in my document that will contain
information from my page titles. I'd like to have the heading title,
the page number and possibly some meta-info that I'm passing to my
custom command. (I'm planning on passing a custom command in the
\setuplist command). If it's not possible to \placelist's after
numbered headings then could someone suggest an alternative method?

Many thanks,

Felix
___
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] \placelist after \chapter

2011-12-12 Thread Wolfgang Schuster

Am 12.12.2011 um 13:04 schrieb Felix Ingram:

 Hi all,
 
 I can't seem to get a list placed after a numbered heading. For example:
 
 \starttext
 \title{First one}
 \placelist[chapter]
 \chapter{Second one}
 \placelist[chapter] % This won't be placed
 \stoptext
 
 
 Is this something I should be able to do? The reason I ask is that I'm
 looking to generate a summary table in my document that will contain
 information from my page titles. I'd like to have the heading title,
 the page number and possibly some meta-info that I'm passing to my
 custom command. (I'm planning on passing a custom command in the
 \setuplist command). If it's not possible to \placelist's after
 numbered headings then could someone suggest an alternative method?

You need \placelist[chapter][criterium=all].

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] Reverse numbering

2011-12-12 Thread Otared Kavian
Hi all,

When using 
\startitemize[n,reverse]
one gets items numbered in reverse order. I wonder if this feature exists also 
for enumerations. An example is given below in which the last enumeration is 
written on top of the file and I wish it were possible to have the enumerations 
numbered in reverse order.

Thanks in advance for any insight: OK
PS: here is an example file:

 enumeration-reverse.tex
\defineenumeration[Lecture]
[location=hanging,
text={Lecture n°}, 
between=,
before=, 
stopper={.},
after= {\hrule\blank}]

\setupenumerations[Lecture][number=yes]
% \setupenumerations[Lecture][numbering=reverse] % this has no effect though…

\starttext

\startLecture Tuesday December 6th: Banach spaces. 
\startitemize[n]
\item First subject.
\item Second subject.
\stopitemize
\stopLecture

\startLecture Tuesday November 29th: Norms. 
\startitemize[n]
\item First subject.
\item Second subject.
\stopitemize
\stopLecture

\startLecture Tuesday November 22nd: Topological Vector Spaces. 
\startitemize[n]
\item First subject.
\item Second subject.
\stopitemize
\stopLecture

\stoptext
%%% end enumeration-reverse.tex
___
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] \definestartstop (not functioning before/after keys)

2011-12-12 Thread Andreas Harder

On 12.12.2011, at 13:00, Wolfgang Schuster wrote:

 
 Am 12.12.2011 um 12:55 schrieb Andreas Harder:
 
 Hi Hans,
 
 has something changed with \definestartstop? Setting before and after do not 
 change the output.
 
 \definestartstop[test][before=\blank,after=\blank]
 \starttext
 before \test{test} after
 \stoptext
 
 Tested with the current beta- and experimental-branch.
 
 \starttext …\stoptest is not the same as \test{…}, while the environment use 
 the before and after keys the command use the inbetween key.

Okay, I see. So, sorry for the noise.

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] Reverse numbering

2011-12-12 Thread Wolfgang Schuster

Am 12.12.2011 um 13:33 schrieb Otared Kavian:

 Hi all,
 
 When using 
   \startitemize[n,reverse]
 one gets items numbered in reverse order. I wonder if this feature exists 
 also for enumerations. An example is given below in which the last 
 enumeration is written on top of the file and I wish it were possible to have 
 the enumerations numbered in reverse order.

The numbering mechanism has indeed such a option but it seems to be not 
available for enumerations.

\definenumber[foo]
\definenumber[bar][numberorder=reverse]

\define\test
  {\incrementnumber[foo] \incrementnumber[bar]%
   \convertednumber[foo]:\convertednumber[bar]}

\starttext
\dorecurse{9}{\test\par}
\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
___


[NTG-context] getcitedata

2011-12-12 Thread Eidenbenz Michael
Hi all,

I'm looking for some information on the command

\getcitedata [field][key] to \macroname

i only manage to get results using a bbl file  \input bibtest.bbl
is there a way to use it with a bib file directly via

\setupbibtex[database=mylib] so i can run context just once?

Thanks Michael
___
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] Reverse numbering

2011-12-12 Thread Otared Kavian
Hi Wolfgang,

Thank you for your attention: in fact you pointed out how to solve the problem… 
Beginning with what you wrote, after a few trials and errors I ended up with 
the following which gives what I meant:
%%% begin reverse-enumeration.tex
\definenumber[ReverseNumberOrder][numberorder=reverse]

\defineenumeration[Lecture]
[location=hanging,
text={Lecture n° {\convertednumber[ReverseNumberOrder]}.}, 
between=,
before={\incrementnumber[ReverseNumberOrder]},
number=no,
after={\hrule\blank}]

\starttext

\startLecture Tuesday December 6th: Banach spaces. 
\startitemize[n]
\item First subject.
\item Second subject.
\stopitemize
\stopLecture

\startLecture Tuesday November 29th: Norms. 
\startitemize[n]
\item First subject.
\item Second subject.
\stopitemize
\stopLecture

\startLecture Tuesday November 22nd: Topological Vector Spaces. 
\startitemize[n]
\item First subject.
\item Second subject.
\stopitemize
\stopLecture

\stoptext
%%% end reverse-enumeration.tex

Best regards: OK

On 12 déc. 2011, at 14:03, Wolfgang Schuster wrote:

 
 Am 12.12.2011 um 13:33 schrieb Otared Kavian:
 
 Hi all,
 
 When using 
  \startitemize[n,reverse]
 one gets items numbered in reverse order. I wonder if this feature exists 
 also for enumerations. An example is given below in which the last 
 enumeration is written on top of the file and I wish it were possible to 
 have the enumerations numbered in reverse order.
 
 The numbering mechanism has indeed such a option but it seems to be not 
 available for enumerations.
 
 \definenumber[foo]
 \definenumber[bar][numberorder=reverse]
 
 \define\test
  {\incrementnumber[foo] \incrementnumber[bar]%
   \convertednumber[foo]:\convertednumber[bar]}
 
 \starttext
 \dorecurse{9}{\test\par}
 \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
 ___

%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 avenue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: otared.kav...@math.uvsq.fr




___
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] \placelist after \chapter

2011-12-12 Thread Felix Ingram
Thanks Wolfgang - that works as expected. I'm trying to create a table
from the headings (as previously mentioned). Something like this:

\setuplist[chapter][criterium=all,alternative=command,command=\MySummaryTable,before={\setupTABLE[frame=on]\bTABLE\bTABLEbody},after={\eTABLEbody\eTABLE}]

\define[3]\MySummaryTable{\bTR\bTD #1 \eTD\bTD #2 \eTD\bTD #3 \eTD\eTR}

\starttext
\placecontent
\chapter{First one}
\chapter{Second one}
\chapter{Third one}
\chapter{Fourth one}
\chapter{Fifth one}
\placelist[chapter][criterium=all]
\stoptext

While the content gets placed it doesn't appear in a table. I also
notice that the same layout is used in the first \placecontent line.
In my final document I'd like to have my headings included as usual in
the table of contents but then have my own custom list appear as a
table later in the document. Is it possible to define a separate
format for a list that can be used outside of the ToC?

Felix
___
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] getcitedata bug in mkiv?

2011-12-12 Thread Eidenbenz Michael
hi all,

referring to my previous question: the following gives me a correct pdf with 
mkII but nothing at all with mkiv. is this a bug?

thanks an best michael


\setupbibtex [database=mylib]

\def\mycite#1{
\bgroup
\getcitedata[title][#1] to \mytitle
\mytitle
\egroup}

\starttext
\mycite{meinautor:2000}
\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
___


[NTG-context] Mailing list archive (archive.contextgarden.net) will be down or at least not updated

2011-12-12 Thread Mojca Miklavec
Hello,

We are moving the mail server from Germany to Jožef Stefan Institute
in Ljubljana and would like to let you know that mailing list archive
won't be updated when that happens.


So: copy of mailing list archive (archive.contextgarden.net) won't be
updated for at least some time, but there is also a chance that it
will be completely replaced by a different solution. Not that it would
be technically impossible to continue updating it, but I think that
setting up mailing lists has a much higher priority at the moment than
old archives (which are much better at gmane.org anyway).

We will get new mailing lists on the new server soon (some of them for
members of ConTeXt Group, http://group.contextgarden.net, some of them
for distribution etc.)

If anyone has any thoughts about this, you may write me off-list (I
will post a summary to the mailing list later on).

The list ntg-context at ntg.nl won't be moved due to longstanding
tradition at ntg.nl, but we will move some mailing lists from obscure
locations such as launchpad (where we had a mailing list for binary
builders).

Mojca

(There is no reason to take lurker down at this moment, but we are
somehow afraid that people would rely on it returning the latest
mails.)
___
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 and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Paul Menzel
Dear ConTeXt folks,


I have two coefficients saved in a text file

-0.157737135681261
-0.211443105668896

and I want to use them to plot a line with gnuplot.

Having several of those files I want to use Lua to create the formula
for the line for me.

I have not yet figured out how to read values from a file in Lua and
just tried to print a constant to the gnuplot command.

I tried the following.

\usemodule[gnuplot]

\startGNUPLOTscript[lua]
   plot \ctxlua{context(1.2 * x + 3)}
\stopGNUPLOTscript

\startGNUPLOTscript[nolua]
   plot 1.2 * x + 3
\stopGNUPLOTscript

\starttext
\useGNUPLOTgraphic[lua]

Above should be a plot.

\useGNUPLOTgraphic[nolua]

\blank
\CONTEXT\ \contextmark\ \contextversion
\stoptext

But only the second plot done and for the first the following error is
shown.

mtxrun  |
mtxrun  | executing: gnuplot gnup-gnuplot-1.plt
mtxrun  |
mtxrun  |
   plot \ctxlua{context(1.2 * x + 3)}
^
gnup-gnuplot-1.tmp, line 1: invalid character \

Is there a way to manipulate gnuplot scripts with Lua?


Thanks,

Paul
\usemodule[gnuplot]

\startGNUPLOTscript[lua]
   plot \ctxlua{context(1.2 * x + 3)}
\stopGNUPLOTscript

\startGNUPLOTscript[nolua]
   plot 1.2 * x + 3
\stopGNUPLOTscript

\starttext
\useGNUPLOTgraphic[lua]

Above should be a plot.

\useGNUPLOTgraphic[nolua]

\blank
\CONTEXT\ \contextmark\ \contextversion
\stoptext


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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Mojca Miklavec
On Mon, Dec 12, 2011 at 22:39, Paul Menzel wrote:
 Dear ConTeXt folks,


 I have two coefficients saved in a text file

        -0.157737135681261
        -0.211443105668896

 and I want to use them to plot a line with gnuplot.

 Having several of those files I want to use Lua to create the formula
 for the line for me.

 I have not yet figured out how to read values from a file in Lua and
 just tried to print a constant to the gnuplot command.

 I tried the following.

        \usemodule[gnuplot]

        \startGNUPLOTscript[lua]
           plot \ctxlua{context(1.2 * x + 3)}
        \stopGNUPLOTscript

This won't work. The reason is that contents between
\startGNUPLOTscript and \stopGNUPLOTscript are not parsed by ConTeXt
on purpose.

It was very very very painful if not impossible to get it right with
parsing. I often do things like
\def\E#1{$10^{#1}$}

\startGNUPLOTscript[name]
set logscale y
set format y \\E{%T}
plot sin(x) t '$\sin(x) [\E{3}]$' # usually something else with
logscale, but just to show the point
\stopGNUPLOTscript

and if ConTeXt starts parsing this it becomes a pure nightmare.
Realize that it can easily happen that ConTeXt then writes out
set logscale y
set format y some junk leftovers from \\
Eungrouped { since % starts comment
plot sin(x) t '\math{\mathrm{sin}(x) [{10^{3}}]}' arbitrary junk
from expansion ...



However, \startGNUPLOTinclusions is parsed and you could in theory
misuse that, but it would be very bad coding practice.

It would be a lot better to come up with some proposal how to change
the interface to enable what you want to do. (To be honest, it is
still on my todo list to migrate to Aditya's filter module in the
background, but I don't find the courage to start since I have no idea
how many bugs will creep in.)

But a serious question: what *exactly* do you want to do with lua that
you are unable to do with some (even though ugly) gnuplot trickery?
Gnuplot does have some basic programmable capabilities. I can imagine
that you should be able to do something like:

# params.dat
a=-0.157737135681261
b=-0.211443105668896

\startGNUPLOTinclusions
f(x,a,b)=a*x+b
\stopGNUPLOTinclusions

\startGNUPLOTscript[name]
load 'params.dat'
plot f(x,a,b)
\stopGNUPLOTscript

And if needed you can create params.dat on the fly (but I believe that
the same should be doable even if you start with just pure data values
and do some dirty tricks in gnuplot).

Yet another trick could be to create a text file on the fly with lua
(if you really really really need that) and then your script only says
something like.

# bla.plt created on the fly with lua scripts
plot 1.2 * x + 3

\startGNUPLOTscript[bla]
load 'bla.plt'
\stopGNUPLOTscript

I leave creating a suitable 'bla.plt' with lua to others ...

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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Mojca Miklavec
On Mon, Dec 12, 2011 at 23:07, Mojca Miklavec wrote:

 However, \startGNUPLOTinclusions is parsed and you could in theory
 misuse that, but it would be very bad coding practice.

(Wait, I'm not sure about that. I think that I fixed that for the same
reason, but I need to check.)

Either way the moral of the story is still the same: context parsing
is very very very confusing and you don't want to go there. In
particular you never know if something should be parsed and executed
before or after gnuplot processing.

One more example. One thing that would most probably work (I didn't
try it) would be the following:

\startGNUPLOTscript[name]
plot sin(x) t '$\pi = \ctxlua{math.pi()}$'
\stopGNUPLOTscript

How can you explain to ConTeXt whether lua command has to be executed
before or after gnuplot does its job? (label width will be wrong in
either case, but that's not the point)

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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Hans Hagen

On 12-12-2011 22:39, Paul Menzel wrote:

Dear ConTeXt folks,


I have two coefficients saved in a text file

 -0.157737135681261
 -0.211443105668896

and I want to use them to plot a line with gnuplot.

Having several of those files I want to use Lua to create the formula
for the line for me.

I have not yet figured out how to read values from a file in Lua and
just tried to print a constant to the gnuplot command.

I tried the following.

 \usemodule[gnuplot]

 \startGNUPLOTscript[lua]
plot \ctxlua{context(1.2 * x + 3)}
 \stopGNUPLOTscript

 \startGNUPLOTscript[nolua]
plot 1.2 * x + 3
 \stopGNUPLOTscript

 \starttext
 \useGNUPLOTgraphic[lua]

 Above should be a plot.

 \useGNUPLOTgraphic[nolua]

 \blank
 \CONTEXT\ \contextmark\ \contextversion
 \stoptext


You have to twist your mide a bit:

\startluacode
  local x = 10
  context.startGNUPLOTscript{ lua }
  context(plot %s,1.2 * x + 3)
  context.stopGNUPLOTscript()
\stopluacode


\starttext
\useGNUPLOTgraphic[lua]
\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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Hans Hagen

On 12-12-2011 23:13, Mojca Miklavec wrote:


Either way the moral of the story is still the same: context parsing
is very very very confusing and you don't want to go there. In
particular you never know if something should be parsed and executed
before or after gnuplot processing.


Actually this kind of parsing is rather predictable: you use a buffer, 
so no parsing takes place. On the other hand, the mp environments are 
passed directly and therefore the content is expanded, unless a macro is 
defined as unexpandable (which many macros are).


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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Mojca Miklavec
On Mon, Dec 12, 2011 at 23:17, Hans Hagen wrote:

 You have to twist your mide a bit:

 \startluacode
  local x = 10
  context.startGNUPLOTscript{ lua }
  context(plot %s,1.2 * x + 3)
  context.stopGNUPLOTscript()
 \stopluacode


 \starttext
 \useGNUPLOTgraphic[lua]
 \stoptext

Oh, I like this one!

Not that it works at the moment, but fixing the module to make it work
is doable (which is not to say that I know how to do it).

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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Paul Menzel
Am Montag, den 12.12.2011, 23:07 +0100 schrieb Mojca Miklavec:
 On Mon, Dec 12, 2011 at 22:39, Paul Menzel wrote:

  I have two coefficients saved in a text file
 
 -0.157737135681261
 -0.211443105668896
 
  and I want to use them to plot a line with gnuplot.
 
  Having several of those files I want to use Lua to create the formula
  for the line for me.
 
  I have not yet figured out how to read values from a file in Lua and
  just tried to print a constant to the gnuplot command.
 
  I tried the following.
 
 \usemodule[gnuplot]
 
 \startGNUPLOTscript[lua]
plot \ctxlua{context(1.2 * x + 3)}
 \stopGNUPLOTscript
 
 This won't work. The reason is that contents between
 \startGNUPLOTscript and \stopGNUPLOTscript are not parsed by ConTeXt
 on purpose.
 
 It was very very very painful if not impossible to get it right with
 parsing. I often do things like
 \def\E#1{$10^{#1}$}
 
 \startGNUPLOTscript[name]
 set logscale y
 set format y \\E{%T}
 plot sin(x) t '$\sin(x) [\E{3}]$' # usually something else with
 logscale, but just to show the point
 \stopGNUPLOTscript
 
 and if ConTeXt starts parsing this it becomes a pure nightmare.
 Realize that it can easily happen that ConTeXt then writes out
 set logscale y
 set format y some junk leftovers from \\
 Eungrouped { since % starts comment
 plot sin(x) t '\math{\mathrm{sin}(x) [{10^{3}}]}' arbitrary junk
 from expansion ...
 
 
 
 However, \startGNUPLOTinclusions is parsed and you could in theory
 misuse that, but it would be very bad coding practice.

Thank you very much for your explanations.

 It would be a lot better to come up with some proposal how to change
 the interface to enable what you want to do. (To be honest, it is
 still on my todo list to migrate to Aditya's filter module in the
 background, but I don't find the courage to start since I have no idea
 how many bugs will creep in.)

I do not know this very well, so I do not know what would change when
using the filter module. I guess in the end being able to pass a
plt-file to `\startGNUPLOTscript` would be enough.

 But a serious question: what *exactly* do you want to do with lua that
 you are unable to do with some (even though ugly) gnuplot trickery?

I do not know. This was just a product out of my ignorance. Searching
for `gnuplot load parameters` or something like that only turned `fit`
related stuff.

Thinking about this, I should have searched harder or looked at the
manual or examples.

 Gnuplot does have some basic programmable capabilities. I can imagine
 that you should be able to do something like:
 
 # params.dat
 a=-0.157737135681261
 b=-0.211443105668896
 
 \startGNUPLOTinclusions
 f(x,a,b)=a*x+b
 \stopGNUPLOTinclusions
 
 \startGNUPLOTscript[name]
 load 'params.dat'
 plot f(x,a,b)
 \stopGNUPLOTscript

 And if needed you can create params.dat on the fly (but I believe that
 the same should be doable even if you start with just pure data values
 and do some dirty tricks in gnuplot).

That pretty much what I need. Thank you!

What I do is to do simulations and then do the linear regression using R
[1]. (I know gnuplot can do that too, but I got some errors with it and
using R seems easier for me.) Then the calculated coefficient are saved
to a separate file because having discovered your nice gnuplot module I
want to use that for plotting. Now I need to read in those parameters. I
guess I have to compose the plot manually but those parameters were
essential.

 Yet another trick could be to create a text file on the fly with lua
 (if you really really really need that) and then your script only says
 something like.
 
 # bla.plt created on the fly with lua scripts
 plot 1.2 * x + 3
 
 \startGNUPLOTscript[bla]
 load 'bla.plt'
 \stopGNUPLOTscript
 
 I leave creating a suitable 'bla.plt' with lua to others ...

That is in my opinion the best solution. If I want to script something
there are enough solutions already. Being able to use the tools of once
choice and to insert the result should fit everyone’s need.

Thank you again very much for your help.


Thanks,

Paul


[1] http://www.r-project.org/


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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Paul Menzel
Am Montag, den 12.12.2011, 23:13 +0100 schrieb Mojca Miklavec:

[…]

 One more example. One thing that would most probably work (I didn't
 try it) would be the following:
 
 \startGNUPLOTscript[name]
 plot sin(x) t '$\pi = \ctxlua{math.pi()}$'
 \stopGNUPLOTscript

It has some syntax errors, but that is what I tried first and it worked
great. Here is a full example.

\usemodule[gnuplot]

\startGNUPLOTscript[pi]
plot pi t '$π = \ctxlua{context(math.pi)}$'
\stopGNUPLOTscript

\starttext
\useGNUPLOTgraphic[pi]

\blank
\CONTEXT\ \contextmark\ \contextversion
\stoptext


Thanks,

Paul


gnup.pdf
Description: Adobe PDF document
\usemodule[gnuplot]

\startGNUPLOTscript[pi]
plot pi t '$π = \ctxlua{context(math.pi)}$'
\stopGNUPLOTscript

\starttext
\useGNUPLOTgraphic[pi]

\blank
\CONTEXT\ \contextmark\ \contextversion
\stoptext


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
___

[NTG-context] xml attribute conditional

2011-12-12 Thread Jon Crump
All,

I have a conditional expression that checks to see if the current node
has any ancestor whose xml:id attribute matches a string

\xmldoifelse{#1}{ancestor::div[@xml:id='apr_engl']}

What I need is a test to see if the current node has any ancestor
whose xml:id attribute _contains_ a substring. Something like this:

\xmldoifelse{#1}{ancestor::div[ @xml:id contains('_engl')]}

trying this:
\xmldoifelse{#1}{ancestor::div[ contains(@xml:id, '_engl')]}

got me this error:
! LuaTeX error local expr = xml.expressions...:3: bad argument
#1 to 'contains' (string expected, got nil)

any suggestions?

Jon
___
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] Preserving Output Files

2011-12-12 Thread Kip Warner
On Fri, 2011-12-09 at 20:26 +0100, Hans Hagen wrote:
 I only see
 
 cont-en.fmt  : format file, sits in the cache and stays there
 cont-en.lui  : lua startup stub, idem
 
 handbook.tex : your file, is kept where it is
 
 Hans

Then I am not sure what file it is missing then since all of those files
exist. 

$ ls
-s 
/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.fmt
 
/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui
 Source/Handbook.tex 
7868 
/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.fmt

32 
/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui
  32 Source/Handbook.tex

Here is the full console output:

$ luatex --file-line-error --interaction=batchmode
--fmt=/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.fmt
 
--lua=/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui
 --backend=pdf Source/Handbook.tex
This is LuaTeX, Version beta-0.71.0-202616 (rev 4358) 
 \write18 enabled.
This went wrong: cannot open : No such file or directory
system   Handbook.top loaded

fontslatin modern fonts are not preloaded
languageslanguage en is active
fontspreloading latin modern fonts (second stage)
fontspreloading latin modern fonts (third stage)

Clearly the message is ambiguous since I am not sure which file it is
referring to.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


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] Reverse numbering

2011-12-12 Thread Aditya Mahajan

On Mon, 12 Dec 2011, Otared Kavian wrote:


Hi Wolfgang,

Thank you for your attention: in fact you pointed out how to solve the problem…
Beginning with what you wrote, after a few trials and errors I ended up with 
the following which gives what I meant:
%%% begin reverse-enumeration.tex
\definenumber[ReverseNumberOrder][numberorder=reverse]

\defineenumeration[Lecture]
[location=hanging,
text={Lecture n° {\convertednumber[ReverseNumberOrder]}.},
between=,
before={\incrementnumber[ReverseNumberOrder]},
number=no,
after={\hrule\blank}]


Untested, but

\defineenumeration[Lecture][number=ReverseNumberOrder]

should also work.

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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Aditya Mahajan

On Mon, 12 Dec 2011, Mojca Miklavec wrote:


On Mon, Dec 12, 2011 at 23:17, Hans Hagen wrote:


You have to twist your mide a bit:

\startluacode
 local x = 10
 context.startGNUPLOTscript{ lua }
 context(plot %s,1.2 * x + 3)
 context.stopGNUPLOTscript()
\stopluacode


\starttext
\useGNUPLOTgraphic[lua]
\stoptext


Oh, I like this one!

Not that it works at the moment, but fixing the module to make it work
is doable (which is not to say that I know how to do it).


I have not looked into the internals of gnuplot in a while, but

context(\\startGNUplotscript[lua])
context(plot %s, 1.2*x + 3)
context(\\stopGNUplotscript)

should work.

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] Lua and module gnuplot: Manipulate Gnuplot script with Lua

2011-12-12 Thread Aditya Mahajan

On Mon, 12 Dec 2011, Mojca Miklavec wrote:


It would be a lot better to come up with some proposal how to change
the interface to enable what you want to do. (To be honest, it is
still on my todo list to migrate to Aditya's filter module in the
background, but I don't find the courage to start since I have no idea
how many bugs will creep in.)


Hey, there are no bugs in the filter module ;) If you can send me a 
complete behavioral description of what the gnuplot module does (what 
should be written to gnuplot file, what exact command should be called, 
etc), then I could easily write a wrapper based on the filter module.


But the filter module will not help with the OP's question, as the content 
I treat the filter environment as a buffer and don't parse it at all.


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] Reverse numbering

2011-12-12 Thread Otared Kavian

On 13 déc. 2011, at 07:39, Aditya Mahajan wrote:
 […]
 Untested, but
 
 \defineenumeration[Lecture][number=ReverseNumberOrder]
 
 should also work.
 
 Aditya


Hi Aditya,

Thanks for the hint, but unfortunately it does not work as expected: no numbers 
show up.
Maybe there is a way by using « numberconversion », but I could not figure it 
out.

Best regards: OK___
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] Reverse numbering

2011-12-12 Thread Aditya Mahajan

On Tue, 13 Dec 2011, Otared Kavian wrote:



On 13 déc. 2011, at 07:39, Aditya Mahajan wrote:

[…]
Untested, but

\defineenumeration[Lecture][number=ReverseNumberOrder]

should also work.

Aditya



Hi Aditya,

Thanks for the hint, but unfortunately it does not work as expected: no numbers 
show up.
Maybe there is a way by using « numberconversion », but I could not figure it 
out.


I don't remeber the exact syntax and don't have time to look it up, but 
check out my MAPS article on theorems (it is also a MyWay, I think). There 
is a way to couple numbers of different theorems (so that you get Theorem 
1, Lemma 2, Theorem 3, etc), and the same syntax should work for using a 
different counter.


Another approach could be to use

\defineenumeration[Lecture][...]
\setupnumber[Lecture][numberorder=reverse]

(again untested)

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
___