ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Including lua files
@ 2010-03-13 14:54 Philipp Gesang
  2010-03-13 16:24 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Philipp Gesang @ 2010-03-13 14:54 UTC (permalink / raw)
  To: ntg-context


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

Dear Lua Gurus,


what's the preferred way of including files in Lua?

When trying my module on a different machine I noticed that it fails
because Lua's dofile() does not extend to files in the texmf tree.  Thus
I attempted to include the file with context.ctxlualoadfile() but it
doesn't work either.

Have a relaxed weekend,


Philipp

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

[-- Attachment #1.2: Digital signature --]
[-- 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] 4+ messages in thread

* Re: Including lua files
  2010-03-13 14:54 Including lua files Philipp Gesang
@ 2010-03-13 16:24 ` Wolfgang Schuster
  2010-03-13 18:50   ` Philipp Gesang
  2010-03-14 11:59   ` Hans Hagen
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2010-03-13 16:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 13.03.10 15:54, schrieb Philipp Gesang:
> Dear Lua Gurus,
>
> what's the preferred way of including files in Lua?
>
> When trying my module on a different machine I noticed that it fails
> because Lua's dofile() does not extend to files in the texmf tree.  Thus
> I attempted to include the file with context.ctxlualoadfile() but it
> doesn't work either.
>    
environment.loadluafile(...)?

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
___________________________________________________________________________________


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

* Re: Including lua files
  2010-03-13 16:24 ` Wolfgang Schuster
@ 2010-03-13 18:50   ` Philipp Gesang
  2010-03-14 11:59   ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Philipp Gesang @ 2010-03-13 18:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On 2010-03-13 <17:24:27>, Wolfgang Schuster wrote:
> Am 13.03.10 15:54, schrieb Philipp Gesang:
> >Dear Lua Gurus,
> >
> >what's the preferred way of including files in Lua?
> >
> >When trying my module on a different machine I noticed that it fails
> >because Lua's dofile() does not extend to files in the texmf tree.  Thus
> >I attempted to include the file with context.ctxlualoadfile() but it
> >doesn't work either.
> environment.loadluafile(...)?
What a relief, finally I managed it: could somebody with access to the
context source please add a note luat-env.lua, that filenames passed to
environment.loadluafile() must have their .lua suffix stripped?  This
might save somebody a minor headache someday.

Thanks for the help,


Philipp


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

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

[-- Attachment #1.2: Digital signature --]
[-- 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] 4+ messages in thread

* Re: Including lua files
  2010-03-13 16:24 ` Wolfgang Schuster
  2010-03-13 18:50   ` Philipp Gesang
@ 2010-03-14 11:59   ` Hans Hagen
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2010-03-14 11:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 13-3-2010 17:24, Wolfgang Schuster wrote:
> Am 13.03.10 15:54, schrieb Philipp Gesang:
>> Dear Lua Gurus,
>>
>> what's the preferred way of including files in Lua?
>>
>> When trying my module on a different machine I noticed that it fails
>> because Lua's dofile() does not extend to files in the texmf tree. Thus
>> I attempted to include the file with context.ctxlualoadfile() but it
>> doesn't work either.
> environment.loadluafile(...)?

or

require "whatever.lua"

-----------------------------------------------------------------
                                           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
-----------------------------------------------------------------
___________________________________________________________________________________
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] 4+ messages in thread

end of thread, other threads:[~2010-03-14 11:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-13 14:54 Including lua files Philipp Gesang
2010-03-13 16:24 ` Wolfgang Schuster
2010-03-13 18:50   ` Philipp Gesang
2010-03-14 11:59   ` Hans Hagen

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