Re: [NTG-context] Offtopic: TeX in MetaPost?

2005-12-21 Thread Michal Kvasnička

Good afternoon.

Many  thanks for your answer. I'll try to learn from Metafun macros. 
(Well, I'll try -- but Mr. Hagen macros are usually too clever for my 
stupid brain.)


As for the PSTricks, I used them some years ago -- before I found 
MetaPost. I like MetaPost because:
1) the TeX code and figures are in separate files and are compiled 
separately -- it makes work much faster and reusing code is easier
2) MetaPost allows me calculate figures easily -- most my figures are 
economic graphs -- most of them is not drawn, but calculated (they are 
not data charts)
3) MetaPost is well intergrated with ConTeXt, so I have to use it anyway 
-- I can forget PSTricks and clear my brain :-)


Yours
Michal Kvasnicka



Before you reinvent round objects called wheels please look over
the additional facilities provided by Pstricks, which can be run using
Context and the approproiate module.m-pstric.tex. Instructions
are embedded in the module. It may well be that the kind of
diagrams you are seeking to create in Metapost are already
available via Pstricks. There is a very readable Pstricks manual and a
supplement. 


How do Pstricks and Metapost differ? Well Pstricks is a higher
level language, aimed at creating specific things like x/y
charts, tree diagrams and so on. Matrapost is a lower level, more
generalized facility. Most tasks can be done in either. Common
cases will be more easily handled in Pstricks. More unusual
situations will require the more general power of Metapost. 


John Culleton




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
 



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Offtopic: TeX in MetaPost?

2005-12-21 Thread Hans Hagen

� wrote:


Good afternoon.

Many  thanks for your answer. I'll try to learn from Metafun macros. 
(Well, I'll try -- but Mr. Hagen macros are usually too clever for my 
stupid brain.)


ha, i think that i've a less mathematical brain than you have, so once 
you're  up to speed with metapost your code will be way more clever than 
mine


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Offtopic: TeX in MetaPost?

2005-12-19 Thread Michal Kvasnička

Good evening.

I apologize that I dare to post here such offtopic, but I feel this is 
the right place to get an answer.
I try to write some general-purpose MetaPost macros for me with 
ConTeXt-like interface. For instance, I'd like something like this:
   label(point, label=$A$, xlabel=$x_A$, ylabel=$y_A$, 
ylabelshift=left, lines=no, dotstyle=bigdot, ...);
I've done a lot of work and it almost works, but ... I failed to notice 
that TeX sequences are in normal cases included between btex ... etex 
and are preprocessed. In other words, they cannot be typeset as a 
string. I could use TEX macro, but it slows the process down in a 
horrible way.


I think the best way is this: In the first run of MetaPost to flush out 
all TeX codes, then process it with TeX (texexec), and then to include 
it in the second MetaPost run. But I don't know how to do it? Can you 
help me or at least hint where I could find an answer? And BTW, is this 
a good idea at all? Isn't there a better/faster way?


Many thanks for you kind help.
Michal Kvasnicka

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Offtopic: TeX in MetaPost?

2005-12-19 Thread John R. Culleton
On Monday 19 December 2005 10:28 am, Michal Kvasni?ka wrote:
 Good evening.

 I apologize that I dare to post here such offtopic, but I feel this is
 the right place to get an answer.
 I try to write some general-purpose MetaPost macros for me with
 ConTeXt-like interface. For instance, I'd like something like this:
 label(point, label=$A$, xlabel=$x_A$, ylabel=$y_A$,
 ylabelshift=left, lines=no, dotstyle=bigdot, ...);
 I've done a lot of work and it almost works, but ... I failed to notice
 that TeX sequences are in normal cases included between btex ... etex
 and are preprocessed. In other words, they cannot be typeset as a
 string. I could use TEX macro, but it slows the process down in a
 horrible way.

 I think the best way is this: In the first run of MetaPost to flush out
 all TeX codes, then process it with TeX (texexec), and then to include
 it in the second MetaPost run. But I don't know how to do it? Can you
 help me or at least hint where I could find an answer? And BTW, is this
 a good idea at all? Isn't there a better/faster way?

 Many thanks for you kind help.
 Michal Kvasnicka

I presume you are familiar with Metafun which already provides a
Metapost facility in Context. 

Before you reinvent round objects called wheels please look over
the additional facilities provided by Pstricks, which can be run using
Context and the approproiate module.m-pstric.tex. Instructions
are embedded in the module. It may well be that the kind of
diagrams you are seeking to create in Metapost are already
available via Pstricks. There is a very readable Pstricks manual and a
supplement. 

How do Pstricks and Metapost differ? Well Pstricks is a higher
level language, aimed at creating specific things like x/y
charts, tree diagrams and so on. Matrapost is a lower level, more
generalized facility. Most tasks can be done in either. Common
cases will be more easily handled in Pstricks. More unusual
situations will require the more general power of Metapost. 

John Culleton




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context