Packaging of a standalone program (Digestif)

Zeping Lee zepinglee at gmail.com
Fri Nov 25 15:53:38 CET 2022


Hi Augusto,

I've also written a Lua project <https://github.com/zepinglee/citeproc-lua> and
it works in TeX Live.  I hope the following helps.

The path finding scheme in LuaTeX with TDS is different from standard Lua.
Besides the file name issue mentioned by Karl, the code related to path finding
may also need adaption for TDS. In general, `kpse.set_program_name("luatex")`
is required in the main executable script to load Lua modules from the TDS (see
also section 4.2.2 in the LuaTeX manual).  It replaces `package.searchers[2]`
with the kpse loader which, unlike in standard Lua, looks for Lua modules by
only their basenames.  This means
`TEXMF/scripts/digestif/digestif-langserver.lua` can be loaded via
`require("digestif-langserver")` (provided it's prepended with`digestif-`).
The `.tags` files can be put in `TEXMF/tex/generic/digestif/`and they are
accessed via `kpse.find_file("digestif-primitives.tags")` .

BTW, you can install the files to `kpsewhich -var-value=TEXMFHOME` to test the
TDS structure.


Zeping Lee



> On Nov 17, 2022, at 23:29, Augusto Stoffel <arstoffel at gmail.com> wrote:
> 
> Hi,
> 
> I would like to distribute a standalone Lua program through TeXLive:
> Digestif, a language server for TeX (available at
> https://github.com/astoff/digestif).  It's written in Lua and has no
> dependencies other than the texlua interpreter, which should make
> packaging relatively straightforward.
> 
> Following the CTAN submission instructions, I would simply put all
> relevant files in a zip archive following the directory structure of my
> Git repo.  But then TeXLive would still have to decide where to place
> the files in its own directory structure and make sure the executable
> script works as intended in all platforms.
> 
> Therefore I'm writing to ask how I should organize my CTAN submission to
> make sure everything works smoothly.  In case that helps, the program is
> already available on LuaRocks and I can provide a rockspec file.
> 
> Or perhaps you are able to pull the code directly from LuaRocks, so that
> I don't need to submit the program to CTAN?
> 
> Thanks,
> Augusto




More information about the tex-live mailing list.