ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Metapost: point along path and metaobj
@ 2006-06-19  2:45 Aditya Mahajan
  2006-06-19 14:03 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2006-06-19  2:45 UTC (permalink / raw)


Hi,

  Something goes wrong while using metaobj and point something along 
somepath. I do not know if point ... along... is a mp core command or 
something introduced by metafun. Is this metafun's fault, metaobj's 
fault or simply a metapost issue (and thus I should ask on the 
metapost list).

\setupcolors
   [state=start]

\startMPinclusions
   input metaobj;
\stopMPinclusions
% Everything works fine if I comment metaobj.


\starttext
\startMPpage
   path p ; p := (0,0)--(1cm,0) ;
   draw p
     withpen pencircle scaled 2bp
     withcolor 0.8white;

   draw (point .25 along p)--(point .75 along p)
     withpen pencircle scaled 2bp
     withcolor red ;
\stopMPpage
\stoptext

gives

! Missing argument to arctime.
<to be read again>
                    of
along->(arctime((EXPR0)*(arclength(EXPR1)))of
                                              (EXPR1))of(EXPR1)
<to be read again>
                    )
l.295 draw (point .25 along p)
                               --(point .75 along p)

Aditya

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Metapost: point along path and metaobj
  2006-06-19  2:45 Metapost: point along path and metaobj Aditya Mahajan
@ 2006-06-19 14:03 ` Taco Hoekwater
  2006-06-19 15:46   ` PsTRICKS in Context batela
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2006-06-19 14:03 UTC (permalink / raw)


Aditya Mahajan wrote:
> Hi,
> 
>   Something goes wrong while using metaobj and point something along 
> somepath. I do not know if point ... along... is a mp core command or 
> something introduced by metafun. Is this metafun's fault, metaobj's 
> fault or simply a metapost issue (and thus I should ask on the 

It is Metaobj's fault, it redefines (and therefore blocks access to)
the primitive command arctime. So I guess you should complain to
Denis Roegel (at the very least he should save the primitive arctime
under a different name). A workaround (I think) is this:

   input metaobj;
   primarydef pct along pat =
     arctime (pct,pat) of pat
   enddef ;

Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* PsTRICKS in Context
  2006-06-19 14:03 ` Taco Hoekwater
@ 2006-06-19 15:46   ` batela
  2006-06-19 15:52     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: batela @ 2006-06-19 15:46 UTC (permalink / raw)


To all,

I am the author of a physics booklet written in LATEX+PsTRICKS.
Now,  my I intend  is to make one improved version in Context, but I 
have many
schems with  PSTRICKS commands. Did you know  a easy way  to make the 
migration?

Thanks a lot

Jorge

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PsTRICKS in Context
  2006-06-19 15:46   ` PsTRICKS in Context batela
@ 2006-06-19 15:52     ` Hans Hagen
  2006-06-19 16:29       ` batela
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2006-06-19 15:52 UTC (permalink / raw)


batela wrote:
> To all,
>
> I am the author of a physics booklet written in LATEX+PsTRICKS.
> Now,  my I intend  is to make one improved version in Context, but I 
> have many
> schems with  PSTRICKS commands. Did you know  a easy way  to make the 
> migration?
>   
there is a module, m-pstric.tex


\usemodule[pstrick]

\startPSTRICKS
  \pspicture(0,0)(10,10)
    \dorecurse{10}{\psline(0,0)(\recurselevel,10)}
    \dorecurse{10}{\psline(0,0)(10,\recurselevel)}
  \endpspicture
\stopPSTRICKS

an option is to put the graphics in separate files and/or use checksum trickery as used in m-r (not yet done) 

Hans 
 
-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PsTRICKS in Context
  2006-06-19 15:52     ` Hans Hagen
@ 2006-06-19 16:29       ` batela
  0 siblings, 0 replies; 5+ messages in thread
From: batela @ 2006-06-19 16:29 UTC (permalink / raw)



Thanks.

But, in this LATEX_to_Context migration, I need to convert at hand 
several latex commands. For example:

\begin{itemize} to \startitemize

\end{itemize} to \stopitemize


\begin{table}_to_\starttable

and so on.

this is a very hard task.

Perhaps I need to make: perl -ps 's/\begin{itemize}/\startitemize/g'  
*.tex





Em 19/06/2006, às 4:52, Hans Hagen escreveu:

> batela wrote:
>> To all,
>>
>> I am the author of a physics booklet written in LATEX+PsTRICKS.
>> Now,  my I intend  is to make one improved version in Context, but I
>> have many
>> schems with  PSTRICKS commands. Did you know  a easy way  to make the
>> migration?
>>
> there is a module, m-pstric.tex
>
>
> \usemodule[pstrick]
>
> \startPSTRICKS
>   \pspicture(0,0)(10,10)
>     \dorecurse{10}{\psline(0,0)(\recurselevel,10)}
>     \dorecurse{10}{\psline(0,0)(10,\recurselevel)}
>   \endpspicture
> \stopPSTRICKS
>
> an option is to put the graphics in separate files and/or use checksum 
> trickery as used in m-r (not yet done)
>
> Hans
>
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> -----------------------------------------------------------------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>
>
Um Abraço,

Jorge Magalhães

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-19 16:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-19  2:45 Metapost: point along path and metaobj Aditya Mahajan
2006-06-19 14:03 ` Taco Hoekwater
2006-06-19 15:46   ` PsTRICKS in Context batela
2006-06-19 15:52     ` Hans Hagen
2006-06-19 16:29       ` batela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).