[NTG-context] Equilibrium in chemical resulted in Undefined Control Sequence error

2011-10-11 Thread Hongwen Qiu
Hi,

The following minimal example:

==
\starttext

\chemical{A,+,B,-,AB}

\stoptext
==

gives the following error under context version: 2011.10.08 11:42,
luatex version beta-0.70.1-2011051918:

! Undefined control sequence.

system   tex  error on line 10 in file test.tex: Undefined
control sequence ...

1 \starttext
2 
3 \chemical{A,+,B,-,AB}
4 
5 \stoptext
6 

argument \xrightpverleftarrow 
{}{}
\mathematics ...mmode #1\else \normalstartimath #1
  \normalstopimath \fi 
\@@cm::i:equilibrium ...\xrightpverleftarrow {}{}}
  \enspace 
l.10 \chemicalequilibrium
 
\inlinechemical ...emicals.inline(\!!bs #1\!!es )}
  }
l.3 \chemical{A,+,B,-,AB}
   
? 

___
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] Strange problem related to \usemodule

2011-10-11 Thread Hans Hagen

On 11-10-2011 03:39, Hongwen Qiu wrote:

On Mon, 2011-10-10 at 14:09 +0200, Hans Hagen wrote:

can you run with \enabletrackers[modules.loading]

Attached is the log with \enabletrackers[modules.loading].


can you try to load the file directly with

\input{/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex}

and see if the command is defined then?

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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Stéphane Klein

Hi,

I use ConTeXT and I look for an item bullet with a size between \bullet 
and \cdot.


Do you have a tip ?

Thanks for your help.

Regards,
Stephane
--
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
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] margin notes

2011-10-11 Thread Meer, H. van der
It seems that margin notes when called from inside 
\startcombination..\stopcombination do not reach the margin of the paper. 
Instead they use a margin inside the combination.
Is that as intended or unavoidable?
It was my objective to have them at the edge of the paper.
See minimal example below.

% Testing margin notes from inside combinations.
% Margin notes do not leave the combinations box.
\setuppapersize[A6][A6]
\starttext
\setupcombinations[location=middle]
test\crlf
\startcombination[2*1]
{abcdefg\inright{m1}}{l1}
{abcdefg\inright{m2}}{l2}
\stopcombination
\crlf
\stoptext



combinations.pdf
Description: combinations.pdf


___
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] Strange problem related to \usemodule

2011-10-11 Thread Hongwen Qiu
On Tue, 2011-10-11 at 09:26 +0200, Hans Hagen wrote:
 can you try to load the file directly with
 
 \input{/ifs2/S2PH/qiuhw/opt/context-1008/tex/texmf-modules/tex/context/third/vim/t-vim.tex}
 
 and see if the command is defined then? 
This method works with other modules, e.g. t-ruby.tex, but not
t-vim.tex, I think that's because the vim module depends on other
modules that's still in texmf-modules.

___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Wolfgang Schuster

Am 11.10.2011 um 09:55 schrieb Stéphane Klein:

 Hi,
 
 I use ConTeXT and I look for an item bullet with a size between \bullet and 
 \cdot.
 
 Do you have a tip ?

\starttext
\symbol[bullet] $\cdot$ \textbullet\ •
\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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Stéphane Klein

Le 11/10/2011 12:05, Wolfgang Schuster a écrit :


Am 11.10.2011 um 09:55 schrieb Stéphane Klein:


Hi,

I use ConTeXT and I look for an item bullet with a size between \bullet and 
\cdot.

Do you have a tip ?


\starttext
\symbol[bullet] $\cdot$ \textbullet\ •
\stoptext


I don't understand, with this code, you display three bullet.
Personnaly, I would like *one* bullet with a size smaller that \bullet 
but bigger that \cdot.


Regards,
Stephane

--
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Stéphane Klein

Le 11/10/2011 12:05, Wolfgang Schuster a écrit :


Am 11.10.2011 um 09:55 schrieb Stéphane Klein:


Hi,

I use ConTeXT and I look for an item bullet with a size between \bullet and 
\cdot.

Do you have a tip ?


\starttext
\symbol[bullet] $\cdot$ \textbullet\ •
\stoptext


I don't understand, with this code, you display three bullet.
Personnaly, I would like *one* bullet with a size smaller that \bullet 
but bigger that \cdot.


Regards,
Stephane

--
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Hongwen Qiu
On Tue, 2011-10-11 at 14:42 +0200, Stéphane Klein wrote:
 I don't understand, with this code, you display three bullet.
One is really \bullet, the other one is \cdot and than one smaller than
\bullet and bigger than \cdot, which is what you want.
 Personnaly, I would like *one* bullet with a size smaller that
 \bullet 
 but bigger that \cdot. 

___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread luigi scarso
On Tue, Oct 11, 2011 at 2:42 PM, Stéphane Klein steph...@harobed.org wrote:
 Le 11/10/2011 12:05, Wolfgang Schuster a écrit :

 Am 11.10.2011 um 09:55 schrieb Stéphane Klein:

 Hi,

 I use ConTeXT and I look for an item bullet with a size between \bullet
 and \cdot.

 Do you have a tip ?

 \starttext
 \symbol[bullet] $\cdot$ \textbullet\ •
 \stoptext

 I don't understand, with this code, you display three bullet.
 Personnaly, I would like *one* bullet with a size smaller that \bullet but
 bigger that \cdot.
There are *four* bullets
1)\symbol[bullet]
2)$\cdot$
3)\textbullet
4) •


-- 
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Stephane Klein

Le 11/10/2011 14:53, luigi scarso a écrit :

\starttext

 \symbol[bullet] $\cdot$ \textbullet\ •
 \stoptext


This is my result : http://dl.stephane-klein.info/context/test1.pdf

Bullet 1, 3, 4 have the same size (I think with my eyes).

This is the context code :

\enableregime [utf-8]
\mainlanguage [fr]
\starttext
\symbol[bullet] $\cdot$ \textbullet\ •
\stoptext

Regards,
Stephane
--
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Peter Münster
On Tue, Oct 11 2011, Stéphane Klein wrote:

 Do you have a tip ?

There is \scale[...]{...}:

\starttext
\dontleavehmode
\scale[scale=700]{•} • \scale[scale=1700]{•}
\stoptext

-- 
   Peter
___
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread luigi scarso
On Tue, Oct 11, 2011 at 3:06 PM, Stephane Klein steph...@harobed.org wrote:
 Le 11/10/2011 14:53, luigi scarso a écrit :

 \starttext

  \symbol[bullet] $\cdot$ \textbullet\ •
  \stoptext


 This is my result : http://dl.stephane-klein.info/context/test1.pdf

 Bullet 1, 3, 4 have the same size (I think with my eyes).

 This is the context code :

 \enableregime [utf-8]
 \mainlanguage [fr]
 \starttext
 \symbol[bullet] $\cdot$ \textbullet\ •
 \stoptext

 Regards,
 Stephane
In MKII yes, in MKIV the first one is bigger than the others.
Anyway, you can always use \scale, as Peter said.
-- 
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] I look for an item bullet with a size between \bullet and \cdot

2011-10-11 Thread Stephane Klein

Le 11/10/2011 15:09, Peter Münster a écrit :

\dontleavehmode
\scale[scale=700]{•} • \scale[scale=1700]{•}


Thanks, it's work :)

--
Stéphane Klein steph...@harobed.org
blog: http://stephane-klein.info
Twitter: http://twitter.com/klein_stephane
pro: http://www.is-webdesign.com

___
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] margin notes

2011-10-11 Thread Hans Hagen

On 11-10-2011 10:03, Meer, H. van der wrote:

It seems that margin notes when called from inside 
\startcombination..\stopcombination do not reach the margin of the paper. 
Instead they use a margin inside the combination.
Is that as intended or unavoidable?
It was my objective to have them at the edge of the paper.
See minimal example below.

% Testing margin notes from inside combinations.
% Margin notes do not leave the combinations box.
\setuppapersize[A6][A6]
\starttext
\setupcombinations[location=middle]
test\crlf
\startcombination[2*1]
{abcdefg\inright{m1}}{l1}
{abcdefg\inright{m2}}{l2}
\stopcombination
\crlf
\stoptext


quite tricky, such notes in an alignment

the next beta will have an experimental fix

\startlinecorrection
\startcombination[2*2]
{abcdefg\inleft[scope=global,stack=yes]{TEST 7}hijklm} {test 7}
{abcdefg\inleft[scope=global,stack=yes]{TEST 8}hijklm} {test 8}
\stopcombination
\stoplinecorrection

seems to work

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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-11 Thread Paul Menzel
Dear ConTeXt folks,


I finally chose MetaPost/MetaFun [1] because of the native integration
with ConTeXt and hopefully easy font handling. I want to use that
throughout my document.

Of course I hit the first problem. Wanting to draw a “simple” function f
like f(x) = e^x, seems hard to accomplish. I guess I should stress that
MetaPost does not have a high accuracy so it might not be the best
solution [5].

There seem to be quite a lot of solutions (mostly macros) on the Web for
this problem so I am wondering if one of them is integrated in MetaFun.

Here are some of my findings.

1. Reading about the graph package by John D. Hobby [2] and which is
also included in ConTeXt [3]. Especially I liked the automatic
coordinate systems. The package seems to only be able to plot graphs
with data points saved in files. So one solution would be to manually
create data files with data points of the relevant function.

2. There is an example in the Drexel Physics Wiki [4].

3. Anthony Phan has also created some macros in his `mps` [5 (currently
not accessible)].

4. André Heck uses the macro packages `courbes` and `grille` from
Jean-Michel Sarlat to show some nice examples in his tutorial »Learning
Metapost by Doing« [6].


So what do you suggest?


Thanks,

Paul


[1] http://www.ntg.nl/pipermail/ntg-context/2011/058527.html
[2] http://tug.org/docs/metapost/mpgraph.pdf
[3] http://wiki.contextgarden.net/Metapost
[4] http://einstein.drexel.edu/liki/index.php/Metapost#Graphing_Functions
[5] http://www-math.univ-poitiers.fr/~phan/downloads/metapost/statsman.pdf
[6] http://staff.science.uva.nl/~heck/Courses/mptut.pdf


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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-11 Thread Paul Menzel
Dear ConTeXt folks,


Am Mittwoch, den 12.10.2011, 00:45 +0200 schrieb Paul Menzel:
 Dear ConTeXt folks,
 
 
 I finally chose MetaPost/MetaFun [1] because of the native integration
 with ConTeXt and hopefully easy font handling. I want to use that
 throughout my document.
 
 Of course I hit the first problem. Wanting to draw a “simple” function f
 like f(x) = e^x, seems hard to accomplish. I guess I should stress that
 MetaPost does not have a high accuracy so it might not be the best
 solution [5].
 
 There seem to be quite a lot of solutions (mostly macros) on the Web for
 this problem so I am wondering if one of them is integrated in MetaFun.
 
 Here are some of my findings.

I just want to add that there seems to be work going on in ConTeXt to
solve these issues as the talk at this years ConTeXt User Meeting of
Alan Braslau suggests [7].

 1. Reading about the graph package by John D. Hobby [2] and which is
 also included in ConTeXt [3]. Especially I liked the automatic
 coordinate systems. The package seems to only be able to plot graphs
 with data points saved in files. So one solution would be to manually
 create data files with data points of the relevant function.
 
 2. There is an example in the Drexel Physics Wiki [4].
 
 3. Anthony Phan has also created some macros in his `mps` [5 (currently
 not accessible)].
 
 4. André Heck uses the macro packages `courbes` and `grille` from
 Jean-Michel Sarlat to show some nice examples in his tutorial »Learning
 Metapost by Doing« [6].
 
 
 So what do you suggest?


Thanks,

Paul


 [1] http://www.ntg.nl/pipermail/ntg-context/2011/058527.html
 [2] http://tug.org/docs/metapost/mpgraph.pdf
 [3] http://wiki.contextgarden.net/Metapost
 [4] http://einstein.drexel.edu/liki/index.php/Metapost#Graphing_Functions
 [5] http://www-math.univ-poitiers.fr/~phan/downloads/metapost/statsman.pdf
 [6] http://staff.science.uva.nl/~heck/Courses/mptut.pdf
[7] 
http://meeting.contextgarden.net/2011/talks/day1_06_alan_plotting/BassangeBraslau.pdf


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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-11 Thread Mojca Miklavec
On Wed, Oct 12, 2011 at 00:45, Paul Menzel wrote:
 Dear ConTeXt folks,

 I finally chose MetaPost/MetaFun [1] because of the native integration
 with ConTeXt and hopefully easy font handling. I want to use that
 throughout my document.

 Of course I hit the first problem. Wanting to draw a “simple” function f
 like f(x) = e^x, seems hard to accomplish. I guess I should stress that
 MetaPost does not have a high accuracy so it might not be the best
 solution [5].

 So what do you suggest?

To wait for next metapost beta (or compile the version in trunk by
yourself; however you might also need to change ConTeXt a bit, so that
it will call metapost with the right parameters).

http://meeting.contextgarden.net/2011/talks/day1_09_taco_metapost/mp2talk.pdf

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] Bug in export with \definehighlight

2011-10-11 Thread Aditya Mahajan

On Mon, 10 Oct 2011, Aditya Mahajan wrote:


Compiling the following document

~~~
\definehighlight [object] [style=mono]

\setupbackend [export=yes]

\starttext
\object{test}
\stoptext
~~~

gives

backend  export  saving xml data in 'test.export
backend  export  saving css image definitions in 'test-images.css
backend  export  saving css style definitions in 'test-styles.css
! LuaTeX error bad argument #3 to '?' (value expected).

system   tex  error on line 0 in file : LuaTeX error  ...

empty file

* ./test
  \stoptext



Quick workaround: use \definestartstop instead of \definehighlight.

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] Bug in export with \definehighlight

2011-10-11 Thread Aditya Mahajan

On Tue, 11 Oct 2011, Aditya Mahajan wrote:


On Mon, 10 Oct 2011, Aditya Mahajan wrote:


Compiling the following document

~~~
\definehighlight [object] [style=mono]

\setupbackend [export=yes]

\starttext
\object{test}
\stoptext
~~~

gives

backend  export  saving xml data in 'test.export
backend  export  saving css image definitions in 'test-images.css
backend  export  saving css style definitions in 'test-styles.css
! LuaTeX error bad argument #3 to '?' (value expected).

system   tex  error on line 0 in file : LuaTeX error  ...

empty file

* ./test
  \stoptext



Quick workaround: use \definestartstop instead of \definehighlight.


The bug is with xml.css.fontspecification function that does not handle 
style=mono (or sans and serif for that matter). The proper solution is to 
convert from context font specification into html font specification for 
all styles.


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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost

2011-10-11 Thread Alan Braslau
Paul,

Metapost can now perform calculations in double precision floating point.
At this time, it is in the svn version and does not work yet as
such integrated in ConTeXt (through mplib). Taco promises this for soon...

The graph package is pretty clever, and I am working on proposals on
how to extend/rewrite this taking advantage of the new metapost
handling of large and small numbers.

To plot a function, you can create a path, as in
path p ; p := 
for i=0 upto 1000:
hide (x := i/1000 ;) 
if (i0) -- fi (x,exp(x))
endfor ;
gplot p ;

One proposal will be to make this even easier with new macros.

Alan

On Wed, Oct 12, 2011 at 12:45:12AM +0200, Paul Menzel wrote:
 Dear ConTeXt folks,
 
 
 I finally chose MetaPost/MetaFun [1] because of the native integration
 with ConTeXt and hopefully easy font handling. I want to use that
 throughout my document.
 
 Of course I hit the first problem. Wanting to draw a “simple” function f
 like f(x) = e^x, seems hard to accomplish. I guess I should stress that
 MetaPost does not have a high accuracy so it might not be the best
 solution [5].
 
 There seem to be quite a lot of solutions (mostly macros) on the Web for
 this problem so I am wondering if one of them is integrated in MetaFun.
 
 Here are some of my findings.
 
 1. Reading about the graph package by John D. Hobby [2] and which is
 also included in ConTeXt [3]. Especially I liked the automatic
 coordinate systems. The package seems to only be able to plot graphs
 with data points saved in files. So one solution would be to manually
 create data files with data points of the relevant function.
 
 2. There is an example in the Drexel Physics Wiki [4].
 
 3. Anthony Phan has also created some macros in his `mps` [5 (currently
 not accessible)].
 
 4. André Heck uses the macro packages `courbes` and `grille` from
 Jean-Michel Sarlat to show some nice examples in his tutorial »Learning
 Metapost by Doing« [6].
 
 
 So what do you suggest?
 
 
 Thanks,
 
 Paul
 
 
 [1] http://www.ntg.nl/pipermail/ntg-context/2011/058527.html
 [2] http://tug.org/docs/metapost/mpgraph.pdf
 [3] http://wiki.contextgarden.net/Metapost
 [4] http://einstein.drexel.edu/liki/index.php/Metapost#Graphing_Functions
 [5] http://www-math.univ-poitiers.fr/~phan/downloads/metapost/statsman.pdf
 [6] http://staff.science.uva.nl/~heck/Courses/mptut.pdf



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


-- 
Alan Braslau
CEA DSM-IRAMIS-SPEC
CNRS URA 2464
Orme des Merisiers
91191 Gif-sur-Yvette cedex FRANCE
tel: +33 1 69 08 73 15
fax: +33 1 69 08 87 86
mailto:alan.bras...@cea.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
___