Coder Social home page Coder Social logo

luapackageloader's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

luapackageloader's Issues

Missing package name in `\ProvidesPackage` definition

The current package definition is as following:

\ProvidesPackage{}[\luapackageloaderpkgdate\space v\luapackageloaderversion\space Lua package searchers for LuaTeX]

This leads to the warning

LaTeX Warning: You have requested package `luapackageloader',
               but the package provides `'.

which is caused by the empty argument of \ProvidesPackage.

Write a troubleshooting guide

This should include common gotchas like

  • Using packages that are known to work with Lua 5.2 (because LuaTeX is at 5.2)
  • running $eval (luarocks path) to make sure LuaRocks paths are added to package.cpath and package.path.
  • We could also include creating a separate clean Lua tree using hererocks

write docs in pandoc

WIll make it easier to have the docs in Markdown (for web), LaTeX and PDF (for CTAN)

luapackageloader not using LUA_CPATH

Hello,

I am unable to load an external C module installed via luarocks. I am running Mac OS 11.3.1 and have installed luarocks via homebrew and am using TeX live. To reproduce:

  1. brew install luarocks
  2. Install a lua module that uses a C library, in my case cjson: luarocks install lua-cjson
  3. Make sure LUA_PATH and LUA_CPATH environment variables match output of luarocks path.
  4. Run lualatex --shell-escape on a .tex file which contains lua code calling cjson (or another library; I've also run into issues trying to get lua-curl to work): local cjson = require("cjson"). This produces the following:
./vazneExamples.lua:3: module 'cjson' not found:
        no field package.preload['cjson']
        [lua searcher]: module not found: 'cjson'
        no file '/opt/homebrew/Cellar/luarocks/3.8.0/share/lua/5.4/cjson.lua'
        no file '/opt/homebrew/share/lua/5.4/cjson.lua'
        no file '/opt/homebrew/share/lua/5.4/cjson/init.lua'
        no file '/opt/homebrew/lib/lua/5.4/cjson.lua'
        no file '/opt/homebrew/lib/lua/5.4/cjson/init.lua'
        no file './cjson.lua'
        no file './cjson/init.lua'
        no file '/Users/jessebrault/.luarocks/share/lua/5.4/cjson.lua'
        no file '/Users/jessebrault/.luarocks/share/lua/5.4/cjson/init.lua'
        [kpse C searcher] file not found: 'cjson'
stack traceback:
        [C]: in function 'require'
        ./vazneExamples.lua:3: in main chunk
        [C]: in function 'require'
        [\directlua]:2: in main chunk.

It appears that the luapackageloader is not using the C searcher/looking on LUA_CPATH. It is looking on LUA_PATH, as evidenced by the above.

I am wondering if there is any advice for this. I would love to use this package in my current project. Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.