npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tex2max

v1.3.1

Published

LaTeX math to Maxima code converter

Downloads

61

Readme

TeX2Max

npm version Language grade: JavaScript

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

Environments in which to use TeX2Max

TeX2Max supports Node and AMD, in addition to normal browser support.

Main

lib/
├── tex2max.amd.js        (AMD)
├── tex2max.js            (UMD)
└── tex2max.common.js     (CommonJS, default)

Getting started

Installation

npm install tex2max

In browser:

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

The unpkg provides CDN support for tex2max.js's JavaScript. You can find the links here.

Alternativeley, you can download the latest standalone JavaScript files (ES5)

Usage

Syntax

new tex2max(options)
  • options (optional)
    • Type: Object
    • The options for the converter. Check out the available options.

Examples

Node
const TeX2Max = require('tex2max');
const converter = new TeX2Max(options);
AMD
define(['./path/to/tex2max.amd'], function(TeX2Max) {
    const converter = new TeX2Max(options);
});
Window
const TeX2Max = window.tex2max;
const converter = new TeX2Max(options);

⬆ back to top

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.

onlySingleVariables

  • Type: Boolean
  • Default: false

Enable to only allow single variable names.

handleEquation

  • Type: Boolean
  • Default: false

Enable to let Maxima solve an algebraic equation.

addTimesSign

  • Type: Boolean
  • Default: true

Add multiplication sign where multiplication is implied.

disallowDecimalPoints

  • Type: Boolean
  • Default: false

Enable to disallow decimal point separators . in numbers.

disallowllowDecimalCommas

  • Type: Boolean
  • Default: false

Enable to disallow decimal comma separators , in numbers.

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.
    • The options for the converter. Check out the available 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

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

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

Enter the TeX2Max directory and run the build script:

npm run build

Feedback:

Project lead: Hans Georg Schaathun [email protected]

Developer: André Storhaug [email protected]

License

TeX2Max is Licensed under the GNU General Public, License Version 3.

⬆ back to top