summaryrefslogtreecommitdiff
path: root/graphics/mol2chemfig/lua/README
blob: 1f3a74e081250fea51cf456c47da59df5930a316 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
mol2chemfig
-----------------------------------------------------------------
Purpose: Generation of chemfig code from molecular structures
specified in molfile or smiles format

Licence: LPPL (free)

Author: Michael Palmer (mpalmer@uwaterloo.ca)

Licence: Latex Project Licence (free)

Version: 1.4
-----------------------------------------------------------------
This package contains mol2chemfig.lua, the Lua web client version
of mol2chemfig. It is used from the command line but calls the
mol2chemfig server for every request. It expects to be run by
Lua interpreter that is embedded within the luatex executable.

Requirements:

* LuaTeX (available through TeXLive) or another Lua
  interpreter is required to run the program

* The chemfig LaTeX package is required to compile the
  chemfig code generated by mol2chemfig
-------------------------------------------------------------
Installation:

1. The preferred installation method is through TeXLive. When
the script and its prerequisites are installed in this way,
no additional installation or configuration should be
necesseary; it should be possible to run "mol2chemfig.lua"
from a shell window.

Update: The preferred method WOULD be through TeXLive, if
TeXLive actually had coopted mol2chemfig. This, however,
does not seem to have happened. So, manual install is
the only option.

2. If you want to install it manually, you need to ensure that
both mol2chemfig.lua and your Lua interpreter are in your
shell's path. Moreover, your Lua interpreter must be able to
find the auxiliary Lua files (mol2chemfig_client.lua,
mol2chemfig_dkjson.lua, and mol2chemfig_jsonrpc.lua) also
included in this package.

LuaTeX's embedded interpreter will use the kpathsea library
to locate required Lua modules. The directories that it
will search through are configured in the LUAINPUTS variable
inside your system's texmf.cnf configuration file.

If you want the script to be run not by luatex but by your
system's default Lua interpreter, you must change the first
line in mol2chemfig.lua from

#!/usr/bin/env texlua

to

#!/usr/bin/env lua

and also delete or comment out the line

kpse.set_program_name('luatex')

Moreover, you must ensure that the three other .lua files
in this package can be located by your lua interpreter.
-------------------------------------------------------------
Stand-alone version of mol2chemfig

A full locally installable version (as well as the source
code) of the mol2chemfig program is available at

http://chimpsky.uwaterloo.ca/mol2chemfig

The full program requires Python and the indigo
cheminformatics library for Python. See the docs
for additional details.