Skip to content

Commit

Permalink
Merge branch 'develop' for 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Feb 7, 2020
2 parents bbd6eb4 + 0eb1705 commit 1d5ce98
Show file tree
Hide file tree
Showing 119 changed files with 2,935 additions and 1,968 deletions.
30 changes: 19 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ do you expect to happen instead?

Feature requests are welcome. Before you submit one, be sure to have:

1. **Used the GitHub search** to check that the feature hasn't already
 been requested.
1. **Used the GitHub search** to check that the feature hasn't already
been requested.
2. Take a moment to think about whether your idea fits with the scope
and aims of the project, or if it might better fit being a [custom
extension](https://github.com/mathjax/MathJax-third-party-extensions).
Expand All @@ -146,7 +147,14 @@ a refactor, or an improvement to a feature, etc., please be sure to:

## Working on MathJax core

You want to contribute code? We describe how below. First, note that the MathJax source code is in the <https://github.com/mathjax/MathJax-src> repository, not the <https://github.com/mathjax/MathJax> repository, which contains the packaged component files for distribution on CDNs and the [mathjax npm package](https://www.npmjs.com/package/mathjax) (the source code is included in the [mathjax-full npm package](https://www.npmjs.com/package/mathjax-src)).
You want to contribute code? We describe how below. First, note that
the MathJax source code is in the
<https://github.com/mathjax/MathJax-src> repository, not the
<https://github.com/mathjax/MathJax> repository, which contains the
packaged component files for distribution on CDNs and the [mathjax npm
package](https://www.npmjs.com/package/mathjax) (the source code is
included in the [mathjax-full npm
package](https://www.npmjs.com/package/mathjax-full)).

### Key Branches & Tags

Expand All @@ -155,27 +163,27 @@ MathJax uses several permanent branches in the [MathJax source repository](https
- **[develop](https://github.com/mathjax/MathJax-src/tree/develop)**
is the development branch. All work on the next release happens here
so you should generally branch off `develop` if you are going to
submit a pull request. Do **NOT** use this branch for a production
submit a pull request. Do **NOT** use this branch for a production
site.

- **[master](https://github.com/mathjax/MathJax-src)** contains the latest
release of MathJax. This branch may be used in production. Do
**NOT** use this branch to work on MathJax's source.

These branches reflect version 3 of MathJax, which is substantially
differentfrom the version 2 codebase. Version 2 will continue to be
maintained while websites transition to version 3, with work being
done using the following branches in the [MathJax distribution
different from the version 2 codebase. Version 2 will continue to be
maintained while web sites transition to version 3, with work being
done using the following branches in the [MathJax distribution
repository](https://github.com/mathjax/MathJax):

- **[legacy-v2-develop](https://github.com/mathjax/MathJax/tree/legacy-v2-develop)**
- **[legacy-v2-develop](https://github.com/mathjax/MathJax/tree/legacy-v2-develop)**
is the development branch for changes to the legacy version 2 code.
Any pull requests for version 2 should be branched from here. Do
**NOT** use this branch for a production site.
Any pull requests for version 2 should be branched from here. Do
**NOT** use this branch for a production site.

- **[legacy-v2](https://github.com/mathjax/MathJax/tree/legacy-v2)**
is the branch that contains any updates to version 2 following
the release of version 3. Do **NOT** use this branch to work on
is the branch that contains any updates to version 2 following
the release of version 3. Do **NOT** use this branch to work on
MathJax's source.

In addition to these branches, MathJax uses tags to identify the
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# MathJax (Source Repository)
<img class="shield" alt="GitHub release version" src="https://img.shields.io/github/v/release/mathjax/MathJax-src?sort=semver"> <img class="shield" alt="GitHub release version (branch)" src="https://img.shields.io/github/package-json/v/mathjax/MathJax/legacy-v2?label=release v2">
<a class="reference external image-reference" href="http://www.numfocus.org"><img alt="powered-by NumFocus" src="https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&amp;amp;colorA=E1523D&amp;amp;colorB=007D8A"></a>

## Beautiful math in all browsers

Expand Down Expand Up @@ -65,12 +67,13 @@ Repository](https://github.com/mathjax/MathJax-demos-web) for more information.

### Using MathJax Components in node applications

To use MathJax components in a node application, install the `mathjax`
package:
To use MathJax components in a node application, install the `mathjax` package:

npm install mathjax
npm install mathjax@3

and require `mathjax` within your application:
(we are still making updates to version 2, so you should include `@3` since the latest chronological version may not be version 3).

Then require `mathjax` within your application:

require('mathjax').init({ ... }).then((MathJax) => { ... });

Expand Down Expand Up @@ -120,8 +123,8 @@ If you want to work from the GitHub repository directly, then do the following:

git clone https://github.com/mathjax/MathJax-src.git mathjax-src
cd mathjax-src
npm run compile
npm run make-components
npm run --silent compile
npm run --silent make-components

in order to compile the JavaScript files from the TypeScript source,
and build the component files from the JavaScript files.
Expand Down
7 changes: 7 additions & 0 deletions components/src/a11y/assistive-mml/assistive-mml.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import './lib/assistive-mml.js';

import {AssistiveMmlHandler} from '../../../../js/a11y/assistive-mml.js';

if (MathJax.startup) {
MathJax.startup.extendHandler(handler => AssistiveMmlHandler(handler));
}
5 changes: 5 additions & 0 deletions components/src/a11y/assistive-mml/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"component": "a11y/assistive-mml",
"targets": ["a11y/assistive-mml.ts"]
}

11 changes: 11 additions & 0 deletions components/src/a11y/assistive-mml/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const PACKAGE = require('../../../webpack.common.js');

module.exports = PACKAGE(
'a11y/assistive-mml', // the package to build
'../../../../js', // location of the MathJax js library
[ // packages to link to
'components/src/input/mml/lib',
'components/src/core/lib'
],
__dirname // our directory
);
13 changes: 5 additions & 8 deletions components/src/dependencies.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
"use strict";
Object.defineProperty(exports, '__esModule', {value: true});

exports.dependencies = {
export const dependencies = {
'a11y/semantic-enrich': ['input/mml', '[sre]', 'input/mml'],
'a11y/complexity': ['a11y/semantic-enrich'],
'a11y/explorer': ['a11y/semantic-enrich', 'ui/menu'],
Expand Down Expand Up @@ -32,10 +29,10 @@ exports.dependencies = {
'[tex]/verb': ['input/tex-base']
};

exports.paths = {
export const paths = {
tex: '[mathjax]/input/tex/extensions',
sre: '[mathjax]/sre/sre_browser'
}
};

const allPackages = [
'[tex]/action',
Expand All @@ -61,7 +58,7 @@ const allPackages = [
'[tex]/verb'
];

exports.provides = {
export const provides = {
'startup': ['loader'],
'input/tex': [
'input/tex-base',
Expand All @@ -78,4 +75,4 @@ exports.provides = {
...allPackages
],
'[tex]/all-packages': allPackages
}
};
1 change: 1 addition & 0 deletions components/src/input/tex/extensions/ams_cd/amsCd.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './lib/amsCd.js';
1 change: 0 additions & 1 deletion components/src/input/tex/extensions/ams_cd/amscd.js

This file was deleted.

2 changes: 1 addition & 1 deletion components/src/input/tex/extensions/ams_cd/build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"component": "input/tex/extensions/amscd",
"component": "input/tex/extensions/amsCd",
"targets": ["input/tex/ams_cd"]
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const PACKAGE = require('../../../../../webpack.common.js');

module.exports = PACKAGE(
'input/tex/extensions/amscd', // the package to build
'input/tex/extensions/amsCd', // the package to build
'../../../../../../js', // location of the MathJax js library
[ // packages to link to
'components/src/input/tex-base/lib',
Expand Down
1 change: 1 addition & 0 deletions components/src/mml-chtml/mml-chtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import '../input/mml/mml.js';
import '../output/chtml/chtml.js';
import '../output/chtml/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/mml-chtml/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/mml',
'output/chtml', 'output/chtml/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/mml-svg/mml-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import '../input/mml/mml.js';
import '../output/svg/svg.js';
import '../output/svg/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/mml-svg/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/mml',
'output/svg', 'output/svg/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
4 changes: 3 additions & 1 deletion components/src/node-main/node-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ const {dependencies, paths, provides} = require('../dependencies.js');
* Set up the initial configuration
*/
combineDefaults(MathJax.config, 'loader', {
require: global.require, // use node's require() to load files
require: eval('require'), // use node's require() to load files
failed: (err) => {throw err} // pass on error message to init()'s catch function
});
combineDefaults(MathJax.config.loader, 'dependencies', dependencies);
combineDefaults(MathJax.config.loader, 'paths', paths);
combineDefaults(MathJax.config.loader, 'provides', provides);
MathJax.config.loader.paths.mathjax =
path.resolve(MathJax.config.loader.require.resolve('mathjax/package.json'), '..', 'es5');

/*
* Preload core and liteDOM adaptor (needed for node)
Expand Down
6 changes: 3 additions & 3 deletions components/src/source.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use strict";
Object.defineProperty(exports, '__esModule', {value: true});
const src = __dirname;
exports.source = {

export const source = {
'core': `${src}/core/core.js`,
'adaptors/liteDOM': `${src}/adaptors/liteDOM/liteDOM.js`,
'input/tex': `${src}/input/tex/tex.js`,
Expand Down Expand Up @@ -38,6 +37,7 @@ exports.source = {
'output/chtml/fonts/tex': `${src}/output/chtml/fonts/tex/tex.js`,
'output/svg': `${src}/output/svg/svg.js`,
'output/svg/fonts/tex': `${src}/output/svg/fonts/tex/tex.js`,
'a11y/assistive-mml': `${src}/a11y/assistive-mml/assistive-mml.js`,
'a11y/semantic-enrich': `${src}/a11y/semantic-enrich/semantic-enrich.js`,
'a11y/complexity': `${src}/a11y/complexity/complexity.js`,
'a11y/explorer': `${src}/a11y/explorer/explorer.js`,
Expand Down
2 changes: 1 addition & 1 deletion components/src/tex-chtml-full/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/tex-full',
'output/chtml', 'output/chtml/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/tex-chtml-full/tex-chtml-full.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import '../input/tex-full/tex-full.js';
import '../output/chtml/chtml.js';
import '../output/chtml/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/tex-chtml/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/tex',
'output/chtml', 'output/chtml/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/tex-chtml/tex-chtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import '../input/tex/tex.js';
import '../output/chtml/chtml.js';
import '../output/chtml/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/tex-mml-chtml/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/tex', 'input/mml',
'output/chtml', 'output/chtml/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/tex-mml-chtml/tex-mml-chtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import '../input/mml/mml.js';
import '../output/chtml/chtml.js';
import '../output/chtml/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/tex-mml-svg/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/tex', 'input/mml',
'output/svg', 'output/svg/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/tex-mml-svg/tex-mml-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import '../input/mml/mml.js';
import '../output/svg/svg.js';
import '../output/svg/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/tex-svg-full/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/tex-full',
'output/svg', 'output/svg/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/tex-svg-full/tex-svg-full.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import '../input/tex-full/tex-full.js';
import '../output/svg/svg.js';
import '../output/svg/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
2 changes: 1 addition & 1 deletion components/src/tex-svg/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Loader.preLoad(
'core',
'input/tex',
'output/svg', 'output/svg/fonts/tex.js',
'ui/menu'
'ui/menu', 'a11y/assistive-mml'
);
1 change: 1 addition & 0 deletions components/src/tex-svg/tex-svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ import '../input/tex/tex.js';
import '../output/svg/svg.js';
import '../output/svg/fonts/tex/tex.js';
import '../ui/menu/menu.js';
import '../a11y/assistive-mml/assistive-mml.js';
import '../startup/startup.js';
Loading

0 comments on commit 1d5ce98

Please sign in to comment.