GithubHelp home page GithubHelp logo

edwardt / mathjax-third-party-extensions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mathjax/mathjax-third-party-extensions

0.0 2.0 0.0 2.04 MB

A collection of MathJax extensions provided by third-party contributors

JavaScript 100.00%

mathjax-third-party-extensions's Introduction

mathjax-third-party-extensions

A collection of MathJax extensions provided by third-party contributors. This repository is mirrored on the MathJax CDN.

Contributing

We'd be thrilled to include your extension!

To add an extension, simply create a pull request. Please structure your contribution along the lines of existing extensions. In particular, make sure that

  • Create a subfolder
  • Add a README file with some basic information on the extension (see other extensions for inspiration)
  • Add a License.txt file. We require Apache-license-2 comaptible licenses.
  • The loadComplete call in your extension should be of the form [Contrib]/foldername/filename.js to work generically with a third party location in MathJax v2.4+.
  • Preferably, contribute both a packed (using uglify, YUI etc) as well as an unpacked version; the unpacked version should be placed under foldername/unpacked/ with a working loadComplete call.

Using third party extensions.

We host copy of the third-party extension repository on the MathJax CDN. This means anything you contribute here will be easily available to all MathJax CDN users.

Since MathJax v2.7, MathJax simplifies loading third party extensions: just prefix the extension name with [Contrib] and the relative path in this repository.

For example,

<script type="text/x-mathjax-config>
  MathJax.Hub.Config({
    extensions: ["tex2jax.js","[Contrib]/img/img.js"],
    jax: ["input/TeX","output/HTML-CSS"],
    tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
  });
</script>

would load the img extension.

If you are using MathJax v2.6 or below, you will need to define [Contrib] manually.

Either add

<script type="text/x-mathjax-config">
  MathJax.Ajax.config.path["Contrib"] = "//cdn.mathjax.org/mathjax/contrib";
</script>

or equivalently,

<script type="text/javascript">
  window.MathJax = {
    AuthorInit: function () {
            MathJax.Ajax.config.path["Contrib"] = "//cdn.mathjax.org/mathjax/contrib";
        }
  };
</script>

to your configuration. See also the documentation page on third party extensions and this repository.

Writing extensions

The MathJax documentation contains a tutorial on extension writing.

Afterwards, you might want to start by looking at some of the extensions here and the MathJax core extensions.

mathjax-third-party-extensions's People

Contributors

burnpanck avatar dainiak avatar drlippman avatar evgenystan avatar ickc avatar mhchem avatar omarithawi avatar pkra avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.