[tex-live] perl or lua standard library modules in texlive

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sun Sep 23 03:14:14 CEST 2012


On Sun, Sep 23, 2012 at 2:04 AM, Michael Palmer wrote:
>
> Could you point me to some example of a somewhat similar package, from which
> I could learn how to arrange the files in mine?

It should be something like this (inside texmf-dist or wherever you
have other files, possibly in TEXMFLOCAL) plus one or two executable
files (lua/python scripts) next to other binaries like "pdflatex":

scripts/mol2chemfig/<whatever-you-want-or-need>
scripts/mol2chemfig/lua/*.lua
scripts/mol2chemfig/python/*.py

tex/latex/mol2chemfig/mol2chemfig.sty
tex/context/third/mol2chemfig/t-mol2chemfig.tex ;)

doc/latex/mol2chemfig/<whatever-you-want-or-need>
doc/latex/mol2chemfig/mol2chemfig-doc.tex !!!
doc/latex/mol2chemfig/mol2chemfig-doc.pdf
doc/latex/mol2chemfig/README
doc/latex/mol2chemfig/samples/fmn.mol
doc/latex/mol2chemfig/samples/peniciling.mol
doc/latex/mol2chemfig/samples/peniciling.tex
doc/latex/mol2chemfig/samples/plp.mol
doc/latex/mol2chemfig/samples/plp.tex
doc/latex/mol2chemfig/samples/plp2.mol
doc/latex/mol2chemfig/samples/plp2.tex
doc/latex/mol2chemfig/samples/plp3.tex
doc/latex/mol2chemfig/samples/plpn.tex


The only "tricky" part that Karl is talking about is that your
executable mol2chemfig inside binaries should be able to load all
other *.py modules inside [texmf]/scripts/mol2chemfig/python/*.py.

You asked for some examples of other programs. My TL contains the
following python scripts:
    de-macro, dviasm, ebong, texliveonfly, xasy

The "xasy" does
    import xasyMainWin
for example and the file seems to be located under
    /usr/local/texlive/2012/texmf/asymptote/GUI/xasyMainWin.py
but I'm not sure which trick exactly does the magic. And I'm not able
to run xasy either since I don't have all the required python modules
installed.

The file texmf.cnf contains
JAVAINPUTS   = .;$TEXMF/scripts/{$progname,$engine,}/java//
PERLINPUTS   = .;$TEXMF/scripts/{$progname,$engine,}/perl//
PYTHONINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/python//
RUBYINPUTS   = .;$TEXMF/scripts/{$progname,$engine,}/ruby//
but I don't believe that this would work out of the box without some
wrapper script somewhere.

[Another "package" uses *a lot* of perl, ruby and lua scripts which
are located inside texmf-dist and the binaries manage to load all the
proper libraries from there using a wrapper, but people would crucify
me if I would suggest to take that package as a role model.]

Mojca


More information about the tex-live mailing list