ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Lua:mplib
@ 2010-09-23  7:53 Procházka Lukáš
  2010-09-23  8:08 ` Lua:mplib Wolfgang Schuster
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Procházka Lukáš @ 2010-09-23  7:53 UTC (permalink / raw)
  To: ConTeXt

Hello,

I'm looking for some stuff about calling MP from ConTeXt Lua.

The only thing I found is a short reference at http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf, but even when I read some basics (pages 79-83), I don't even know how to draw a line between two points.

So I'd like to find a tutorial or examples or a deeper reference about how to call MP via Lua from ConTeXt. - Any idea?

Cheers,

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
___________________________________________________________________________________


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

* Re: Lua:mplib
  2010-09-23  7:53 Lua:mplib Procházka Lukáš
@ 2010-09-23  8:08 ` Wolfgang Schuster
  2010-09-23  8:20 ` Lua:mplib Philipp Gesang
  2010-09-23  8:23 ` Lua:mplib luigi scarso
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2010-09-23  8:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 718 bytes --]


Am 23.09.2010 um 09:53 schrieb Procházka Lukáš:

> Hello,
> 
> I'm looking for some stuff about calling MP from ConTeXt Lua.
> 
> The only thing I found is a short reference at http://www.luatex.org/svn/trunk/manual/luatexref-t.pdf, but even when I read some basics (pages 79-83), I don't even know how to draw a line between two points.
> 
> So I'd like to find a tutorial or examples or a deeper reference about how to call MP via Lua from ConTeXt. - Any idea?

You don’t have to think so complicated:

\starttext
\startluacode
context.startMPpage()
context("draw fullcircle scaled 2cm;")
context.stopMPpage
\stopluacode
\stoptext

See also http://pragma-ade.com/show-man-44.htm

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 1230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

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

* Re: Lua:mplib
  2010-09-23  7:53 Lua:mplib Procházka Lukáš
  2010-09-23  8:08 ` Lua:mplib Wolfgang Schuster
@ 2010-09-23  8:20 ` Philipp Gesang
  2010-09-23  8:35   ` Lua:mplib Procházka Lukáš
  2010-09-23  8:23 ` Lua:mplib luigi scarso
  2 siblings, 1 reply; 6+ messages in thread
From: Philipp Gesang @ 2010-09-23  8:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 735 bytes --]

On 2010-09-23 <09:53:38>, Procházka Lukáš wrote:
> So I'd like to find a tutorial or examples or a deeper
> reference about how to call MP via Lua from ConTeXt. - Any idea?

Hi Lukáš,

this doesn't seem to be implemented yet, cf. this post:
http://archive.contextgarden.net/message/20100805.225554.4212c0c8.en.html
for now, as Wolfgang suggested, the “building strings and passing
them to context.MPdrawing()” method works acceptably if you
define yourself some wrapper functions.

But maybe Hans already has some prototype for a Metapost-Context
interface in his drawer …

Regards, Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

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

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

* Re: Lua:mplib
  2010-09-23  7:53 Lua:mplib Procházka Lukáš
  2010-09-23  8:08 ` Lua:mplib Wolfgang Schuster
  2010-09-23  8:20 ` Lua:mplib Philipp Gesang
@ 2010-09-23  8:23 ` luigi scarso
  2 siblings, 0 replies; 6+ messages in thread
From: luigi scarso @ 2010-09-23  8:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2010/9/23 Procházka Lukáš <lpr@pontex.cz>:
> So I'd like to find a tutorial or examples or a deeper reference about how
> to call MP via Lua from ConTeXt. - Any idea?
As usual
browse the sources & search for mplib -- they are not so complicated to read

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

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

* Re: Lua:mplib
  2010-09-23  8:20 ` Lua:mplib Philipp Gesang
@ 2010-09-23  8:35   ` Procházka Lukáš
  2010-09-23  9:24     ` Lua:mplib Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Procházka Lukáš @ 2010-09-23  8:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks for the answers to all...

It seems that I'm trying to do similar things as someone else was trying before -

- use of "context.MPdrawing()" looks best at the moment. Maybe it will become "deprecated" as soon as Lua involves MP.

Best,

Lukas


On Thu, 23 Sep 2010 10:20:23 +0200, Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> wrote:

> On 2010-09-23 <09:53:38>, Procházka Lukáš wrote:
>> So I'd like to find a tutorial or examples or a deeper
>> reference about how to call MP via Lua from ConTeXt. - Any idea?
>
> Hi Lukáš,
>
> this doesn't seem to be implemented yet, cf. this post:
> http://archive.contextgarden.net/message/20100805.225554.4212c0c8.en.html
> for now, as Wolfgang suggested, the “building strings and passing
> them to context.MPdrawing()” method works acceptably if you
> define yourself some wrapper functions.
>
> But maybe Hans already has some prototype for a Metapost-Context
> interface in his drawer …
>
> Regards, Philipp
>



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

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

* Re: Lua:mplib
  2010-09-23  8:35   ` Lua:mplib Procházka Lukáš
@ 2010-09-23  9:24     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2010-09-23  9:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 23-9-2010 10:35, Procházka Lukáš wrote:
> Thanks for the answers to all...
>
> It seems that I'm trying to do similar things as someone else was trying
> before -
>
> - use of "context.MPdrawing()" looks best at the moment. Maybe it will
> become "deprecated" as soon as Lua involves MP.

it is unlikely to become deprecated

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
___________________________________________________________________________________

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

end of thread, other threads:[~2010-09-23  9:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-23  7:53 Lua:mplib Procházka Lukáš
2010-09-23  8:08 ` Lua:mplib Wolfgang Schuster
2010-09-23  8:20 ` Lua:mplib Philipp Gesang
2010-09-23  8:35   ` Lua:mplib Procházka Lukáš
2010-09-23  9:24     ` Lua:mplib Hans Hagen
2010-09-23  8:23 ` Lua:mplib luigi scarso

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).