Skip to content

Commit

Permalink
Merge pull request #22 from KQMATH/develop
Browse files Browse the repository at this point in the history
v1.0.2
  • Loading branch information
andstor authored Jan 21, 2019
2 parents 303d104 + a7bbe25 commit 5fe0ea5
Show file tree
Hide file tree
Showing 32 changed files with 8,575 additions and 427 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# JetBrains IDEs: IntelliJ
.idea/


# Node
node_modules
dist
npm-debug.log
.env

# Windows
.DS_Store
Empty file added .npmignore
Empty file.
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

104 changes: 100 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,101 @@
# tex2max
Converts TeX to Maxima input strings
# TeX2Max
TeX2Max is a JavaScript library for converting LaTeX math to Maxima code.

Note that this project is still very early in development.
It's still far from usable in a production environment.
## Environments in which to use TeX2Max
TeX2Max supports Node and AMD, in addition to normal browser support.

## Main
```text
dist/
├── tex2max.amd.js (AMD)
├── tex2max.amd.min.js (AMD, compressed)
├── tex2max.js (UMD)
├── tex2max.min.js (UMD, compressed)
├── tex2max.common.js (CommonJS, default)
└── tex2max.common.min.js (CommonJS, compressed)
```

## Getting started

### Installation

```shell
npm install tex2max
```

In browser:

```html
<script src="/path/to/tex2max.js"></script>
```

The [unpkg](https://unpkg.com) provides CDN support for tex2max.js's JavaScript. You can find the links [here](https://unpkg.com/tex2max).

Alternativeley, you can download the [latest standalone JavaScript files (ES5)](https://github.com/KQMATH/tex2max/releases/latest)

### Usage
#### Syntax
```
new tex2max(options)
```
* options (optional)
* Type: Object
* The options for the converter. Check out the available [options](#options).

#### Examples
##### Node
```js
const TeX2Max = require('tex2max');
const converter = new TeX2Max(options);
```

##### AMD
```js
define(['./path/to/tex2max.amd'], function(TeX2Max) {
const converter = new TeX2Max(options);
});
```

##### Window
```js
const converter = new tex2max(options);
```
[⬆ back to top](#tex2max)

## Options
The TeX2Max class also support multiple optional configurations. These should be passed as an object to the TeX2Max class object.
If no manual configurations are set, default options are used.
#### Default options
```js
const options = {
onlySingleVariables: false,
handleEquation: false,
addTimesSign: true,
onlyGreekName: false,
onlyGreekSymbol: false,
debugging: false
};
```

## Build instructions

Clone a copy of the main TeX2Max git repo by running:

```bash
git clone git://github.com/KQMATH/tex2max.git
```

Enter the TeX2Max directory and run the build script:
```bash
npm run build
```

## Feedback:
**Project lead:** Hans Georg Schaathun <hasc@ntnu.no>

**Developer:** [André Storhaug](https://github.com/andstor) <andr3.storhaug@gmail.com>

## License
TeX2Max is Licensed under the [GNU General Public, License Version 3](https://github.com/KQMATH/tex2max/blob/master/LICENSE).

[⬆ back to top](#tex2max)
3 changes: 3 additions & 0 deletions build/merge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import merge from '../src/index'

module.exports = merge;
Loading

0 comments on commit 5fe0ea5

Please sign in to comment.