Hi there,

it might be that I misread the specification of \require - but perhaps 
you should ensure that the documentation of those LUA primitives is made 
precise and stresses that no file ending is allowed.

I will update pgfplots accordingly. Unless I am mistaken, my Tests did 
not reveal any problems with lualatex.

Best regards

Christian


Am 22.11.2012 00:34, schrieb Aditya Mahajan:
> On Wed, 21 Nov 2012, Thomas Weißschuh wrote:
>
>> Hi,
>>
>> when using (latest) pgfplots with ConTeXt standalone the following error
>> occurs in tex/generic/pgfplots/util/pgfplotsutil.code.tex:1979 :
>>
>>  ! LuaTeX error <\directlua >:1: module 'pgfplots.lua' not found:
>>
>> This is the same exact message and error location as the bug reported
>> by Aditya last month, but this time it's a different issue.
>> It seems like the workaround for the previous bug shadowed this one.
>>
>> For the record: My version of pgfplot has the fix for the previous bug
>> already included.
>>
>> Problem background:
>> The lua function require() appends the .lua file extension to the module
>> name. So require('pgfplots.lua') looks for the file pgfplots.lua.lua,
>> which then fails.
>
> Strictly speaking, require("...") searches for both filename.lua and 
> filename.so.
>
> require("pgfplots.lua") searchs for the file "pgfplots/lua.lua" and 
> "pgfplots/lua.so"
>
>> There was a discussion [0] on the ConTeXt list in which Aditya 
>> mentions [1],
>> that dofile('pgfplots.lua') may be the right function in this 
>> situtation.
>
> I looked into it more, and I think that the original patch my Thomas, 
> changing require"pgfplots.lua") to require("pgfplots"), is the only 
> method that will work with both LaTeX and ConTeXt.
>
> I suggested dofile(...) because the standard approach in ConTeXt is to 
> load lua files using
>
>     dofile(resolvers.findfile("pgfplots.lua"))
>
> However resolvers.findfiles is not a luatex function; rather it is a 
> function defined by ConTeXt data-res.lua and replaces kpse.find_all. 
> resolvers.findfiles caches the result and offers some logging abilities.
>
> Since ConTeXt provides its own library for searching and loading 
> files, it disables the kpse library (it is debatable whether disabling 
> core luatex features is good idea or not, but that is OT here). So, 
> the natural option:
>
>    dofile(kpse.find_all("pgfplots.lua"))
>
> will work in LaTeX but fail in ConTeXt.
>
> On the other hand, require("pgfplots") will work both in LaTeX and 
> ConTeXt.
>
> Aditya
>
> PS: I haven't tested the LaTeX part yet, because my distro's TL 
> package does not have pgfplots.lua as part of the pgfplots package.
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
>
>
> _______________________________________________
> Pgfplots-features mailing list
> Pgfplots-features@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pgfplots-features


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to