Skip to content

Commit

Permalink
Merge pull request #25 from KQMATH/develop
Browse files Browse the repository at this point in the history
v1.0.4
  • Loading branch information
andstor authored Jan 27, 2019
2 parents 316fbf9 + 76bdb9b commit 542da2a
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 18 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ and this project adheres to [Semantic Versioning](https://semver.org).

## [Unreleased]

## [1.0.4] - 2019-01-27
### Added
- Added documentation for options and methods in README file.
- Badge for the current npm version in README file.

## [1.0.3] - 2019-01-22
### Changed
- Update listing of distributed files in README file.

## 1.0.2 - 2019-01-22


[Unreleased]: https://github.com/KQMATH/tex2max/compare/v1.0.3...HEAD
[Unreleased]: https://github.com/KQMATH/tex2max/compare/v1.0.4...HEAD
[1.0.4]: https://github.com/KQMATH/tex2max/compare/v1.0.3...v1.0.4
[1.0.3]: https://github.com/KQMATH/tex2max/compare/v1.0.2...v1.0.3
86 changes: 72 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# TeX2Max
[![npm version](http://img.shields.io/npm/v/tex2max.svg?style=flat)](https://npmjs.org/package/tex2max "View this project on npm")

TeX2Max is a JavaScript library for converting LaTeX math to Maxima code.

## Environments in which to use TeX2Max
Expand Down Expand Up @@ -55,24 +57,80 @@ define(['./path/to/tex2max.amd'], function(TeX2Max) {

##### Window
```js
const converter = new tex2max(options);
const TeX2Max = window.tex2max;
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
};
```
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.

### onlySingleVariables
- Type: `Boolean`
- Default: `false`

Enable to only allow single variable names.

### handleEquation
- Type: `Boolean`
- Default: `false`

Enable to let Maxima [solve](http://maxima.sourceforge.net/docs/manual/maxima_20.html#solve) an algebraic equation.

### addTimesSign
- Type: `Boolean`
- Default: `true`

Add multiplication sign where multiplication is implied.

### onlyGreekName
- Type: `Boolean`
- Default: `false`

Enable to convert all greek letters to names.

### onlyGreekSymbol
- Type: `Boolean`
- Default: `false`

Enable to convert all greek letters to symbols.

### debugging
- Type: `Boolean`
- Default: `false`

Enable to produce debugging info.

## Methods

### toMaxima(latex)
- **latex**:
- Type: `String`
- LaTeX math string.

- (return value):
- Type: `String`
- Maxima code string.

Convert LaTeX math into Maxima code.

### updateOptions(options)
- **options** (optional):
- Type: Object
- Default: See the defaults for all the [options](#options).
- The options for the converter. Check out the available [options](#options).

Update the converter options.

**Note:** This resets all settings. If one or more settings passed as parameter are missing, defaults will be used.

### getLastInput()

Get the latest latex input.

### getLastResult()

Get the latest conversion result.

## Build instructions

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tex2max",
"version": "1.0.3",
"version": "1.0.4",
"description": "LaTeX math to Maxima code converter",
"main": "dist/tex2max.common.js",
"unpkg": "dist/tex2max.js",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ${pkg.name} v${pkg.version} ${date}
by ${pkg.author.name} ${pkg.author.email}
${pkg.homepage}
Copyright: 2018 NTNU
Copyright: 2019 NTNU
License: ${pkg.license}
Build: [hash]
Expand Down

0 comments on commit 542da2a

Please sign in to comment.