Skip to content

Commit 2905b87

Browse files
authored
Moved Instalation instrucitons down in the readme
1 parent 374d02a commit 2905b87

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

README.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,12 @@ This package provides access to Mathematica/Wolfram Engine via the MathLink libr
66

77
## Installation
88

9-
The package requires an installation of either [Mathematica](http://www.wolfram.com/mathematica/) or the free [Wolfram Engine](https://www.wolfram.com/engine/). It will attempt to find the installation at build time; if this fails, you will need to set the following environment variables:
10-
- `JULIA_MATHKERNEL`: the path of the MathKernel executable
11-
- `JULIA_MATHLINK`: the path of the MathLink dynamic library named
12-
- `libML64i4.so`/ `libML32i4.so` on Linux
13-
- `ml64i4.dll`/`ml32i4.dll`/`libML64.dll`/ `libML32.dll` on Windows
14-
15-
After setting you may need to manually build the package
16-
```julia
17-
(@v1.X) pkg> build MathLink
18-
```
19-
20-
A separate workaround is to directly edit the deps/deps.jl file, which should be located (on Linux) at `~/.julia/packages/MathLink/<version dependent>/deps/deps.jl`
21-
22-
The contents of `deps.jl` could for instance read
23-
```julia
24-
const mlib = "/usr/local/Wolfram/Mathematica/11.3/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4"
25-
const mker = "WolframKernel"
26-
```
27-
After createing the file `deps.jl` try loading MathLink the usual way
28-
```julia
29-
(@v1.X) pkg> using MathLink
30-
```
9+
The package requires an installation of either [Mathematica](http://www.wolfram.com/mathematica/) or the free [Wolfram Engine](https://www.wolfram.com/engine/). It will attempt to find the installation at build time; if this fails, please see the [installation troublesshoot](#installation-troubleshoot) below.
3110

3211

3312
## Usage
3413

35-
The main interface consists of the `W""` string macro for specifying symbols. These are call-overloaded for building more complicated expressions
14+
The main interface consists of the `W""` string macro for specifying symbols. These are call-overloaded for building more complicated expressions.
3615

3716
```julia
3817
julia> using MathLink
@@ -73,7 +52,7 @@ julia> weval(sinx; x=2.0)
7352

7453
## The algebraic operators
7554

76-
MathLink also overloads the `+`, `-`, `*`, `/` operations
55+
MathLink also overloads the `+`, `-`, `*`, `/` operations.
7756

7857
```julia
7958
julia> using MathLink
@@ -105,7 +84,7 @@ julia> W"a"-W"a"
10584

10685
## Fractions and Complex numbers
10786

108-
The package also contains extentions to handle fractions
87+
The package also contains extensions to handle fractions.
10988

11089
```julia
11190
julia> weval(1//2)
@@ -130,7 +109,7 @@ W"Times"(-1, W"c")
130109

131110

132111
## Matrix Multiplication
133-
Since the arithematic operators are overloaded, operations such as matrix multiplication are also possible by default
112+
Since the arithmetic operators are overloaded, operations such as matrix multiplication are also possible by default.
134113

135114
```julia
136115
julia> P12 = [ 0 1 ; 1 0 ]
@@ -183,9 +162,34 @@ julia> W2Mstr(W`b/(c^(a+c))`)
183162

184163

185164
## LateX printing in JuPyter Notebooks
186-
Printing in Juypter notebooks is by defaults done in latex.
165+
Printing in Juypter notebooks is, by default, done in latex.
187166
This can be turned off with the command `MathLink.set_texOutput(false)`
188167

168+
## Installation Troubleshoot
169+
The package requires an installation of either [Mathematica](http://www.wolfram.com/mathematica/) or the free [Wolfram Engine](https://www.wolfram.com/engine/). It will attempt to find the installation at build time; if this fails, you will need to set the following environment variables:
170+
- `JULIA_MATHKERNEL`: the path of the MathKernel executable
171+
- `JULIA_MATHLINK`: the path of the MathLink dynamic library named
172+
- `libML64i4.so`/ `libML32i4.so` on Linux
173+
- `ml64i4.dll`/`ml32i4.dll`/`libML64.dll`/ `libML32.dll` on Windows
174+
175+
After setting, you may need to manually build the package
176+
```julia
177+
(@v1.X) pkg> build MathLink
178+
```
179+
180+
A separate workaround is to directly edit the deps/deps.jl file, which should be located (on Linux) at `~/.julia/packages/MathLink/<version dependent>/deps/deps.jl`
181+
182+
The contents of `deps.jl` could for instance, read
183+
```julia
184+
const mlib = "/usr/local/Wolfram/Mathematica/11.3/SystemFiles/Links/MathLink/DeveloperKit/Linux-x86-64/CompilerAdditions/libML64i4"
185+
const mker = "WolframKernel"
186+
```
187+
After creating the file `deps.jl` try loading MathLink the usual way
188+
```julia
189+
(@v1.X) pkg> using MathLink
190+
```
191+
192+
189193
## Notes
190194

191195
- Mathematica, Wolfram, MathLink are all trademarks of Wolfram Research.

0 commit comments

Comments
 (0)