├── README.md
├── counters
├── License.txt
├── README.md
├── counters.js
└── unpacked
│ └── counters.js
├── everymath
├── License.txt
├── README.md
├── everymath.js
└── unpacked
│ └── everymath.js
├── forloop
├── License.txt
├── README.md
├── forloop.js
└── unpacked
│ └── forloop.js
├── forminput
├── License.txt
├── README.md
├── forminput.js
└── unpacked
│ └── forminput.js
├── img
├── LICENSE
├── README.md
├── img.js
└── unpacked
│ └── img.js
├── knowl
├── License.txt
├── README.md
├── knowl.js
└── unpacked
│ └── knowl.js
├── longdiv
├── LICENSE
├── README.md
├── longdiv.js
└── unpacked
│ └── longdiv.js
├── modifymenu
├── License.txt
├── README.md
├── modifymenu.js
└── unpacked
│ └── modifymenu.js
├── physics
├── License.js
├── License.txt
├── README.md
├── index.html
├── index.mmd
├── physics.js
├── physics.sh
├── physics.xlsx
├── test
│ ├── macro.html
│ ├── macro.js
│ ├── macro.md
│ ├── tables.md
│ ├── test-physics-js-mathjax-cdn.html
│ ├── test-physics-js-mathjax-cdn.md
│ ├── test-physics-js-unpacked.html
│ ├── test-physics-js-unpacked.md
│ ├── test-physics-js.html
│ ├── test-physics-js.md
│ ├── test-physics-latex.mmd
│ └── test-physics-latex.pdf
└── unpacked
│ └── physics.js
├── preamble
├── License.txt
├── README.md
├── preamble.js
└── unpacked
│ └── preamble.js
├── siunitx
├── ImplementationDetails.md
├── License.txt
├── README.md
├── siunitx.js
└── unpacked
│ └── siunitx.js
├── sqrtspacing
├── License.txt
├── README.md
├── sqrtspacing.js
└── unpacked
│ └── sqrtspacing.js
├── toggles
├── License.txt
├── README.md
├── toggles.js
└── unpacked
│ └── toggles.js
└── xyjax
├── LICENSE
├── README.md
├── unpacked
└── xypic.js
└── xypic.js
/README.md:
--------------------------------------------------------------------------------
1 | mathjax-third-party-extensions
2 | ==============================
3 |
4 | A collection of MathJax extensions provided by third-party contributors. This repository is mirrored on the MathJax CDN.
5 |
6 | ## Contributing
7 |
8 | We'd be thrilled to include your extension!
9 |
10 | To add an extension, simply create a pull request. Please structure your contribution along the lines of existing extensions. In particular, make sure that
11 |
12 | * Create a subfolder
13 | * Add a `README` file with some basic information on the extension (see other extensions for inspiration)
14 | * Add a `License.txt` file. We require Apache-license-2 comaptible licenses.
15 | * 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+.
16 | * 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.
17 |
18 |
19 | ## Using third party extensions.
20 |
21 | 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.
22 |
23 |
24 | To add the third party repository to your configuration use
25 |
26 |
29 |
30 | or equivalently,
31 |
32 |
39 |
40 | in your configuration. See also the [documentation page on third party extensions and this repository](http://docs.mathjax.org/en/latest/options/ThirdParty.html#mathjax-third-party-extension-repository).
41 |
42 | ## Writing extensions
43 |
44 | The MathJax documentation [contains a tutorial on extension writing](http://docs.mathjax.org/en/latest/advanced/extension-writing.html).
45 |
46 | Afterwards, you might want to start by looking at some of the extensions here and [the MathJax core extensions](http://github.com/mathjax/MathJax/tree/master/unpacked/extensions).
47 |
--------------------------------------------------------------------------------
/counters/License.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 |
3 | Version 2.0, January 2004
4 |
5 | http://www.apache.org/licenses/
6 |
7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8 |
9 | 1. Definitions.
10 |
11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16 |
17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18 |
19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20 |
21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22 |
23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24 |
25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26 |
27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28 |
29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30 |
31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32 |
33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34 |
35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36 |
37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and
38 | You must cause any modified files to carry prominent notices stating that You changed the files; and
39 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
41 |
42 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
43 |
44 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
45 |
46 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
47 |
48 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
49 |
50 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
51 |
52 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
53 |
54 | END OF TERMS AND CONDITIONS
55 |
--------------------------------------------------------------------------------
/counters/README.md:
--------------------------------------------------------------------------------
1 | #Extension: counters for the MathJax third party repository
2 |
3 | A version of `counters.js` for the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions), including a compressed version (using YUI, see the [MathJax-dev tools](https://github.com/mathjax/mathjax-dev)).
4 |
5 | # About counters
6 |
7 | Implements LaTeX counters for MathJax.
8 |
9 | ##Usage:
10 |
11 | \newcounter{name}[depend]
12 | \setcounter{name}{number}
13 | \addtocounter{name}{number}
14 | \arabic{name}
15 | \alph{name}
16 | \Alph{name}
17 | \roman{name}
18 | \Roman{name}
19 | \value{name}
20 |
21 | The `\value` macro is only valid in the number argument for `\setcounter` and
22 | `\addtocounter`.
23 |
24 | The extension does not implement the `\fnsymbol` or `\usecounter` macros, which only make sense in the context of LaTeX features which MathJax does not support. Similarly, the extension does not implement the standard LaTeX counters, such as page, section, figure, and enumi.
25 |
26 |
27 | References:
28 |
29 | - counters: https://github.com/leathrum/mathjax-ext-contrib/tree/master/counters
30 | - MathJax: http://www.mathjax.org/
31 |
32 |
33 | ## Using the MathJax CDN {#CDN}
34 |
35 | The MathJax CDN hosts a copy of this extension via the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions). To use the CDN copy, you need MathJax v2.4 (or higher) and configure the third party extension repository as described in the [MathJax documentation](http://docs.mathjax.org/).
36 |
37 | Then add the extension to your configuration like any other third party extension from the MathJax CDN. For example, your inline configuration might be
38 |
39 |
45 |
--------------------------------------------------------------------------------
/everymath/everymath.js:
--------------------------------------------------------------------------------
1 | /****************************************************
2 | *
3 | * TeX-everymath.js
4 | *
5 | * Implements the \everymath macro for TeX input. You can configure
6 | * the initial value with the
7 | *
8 | * ---------------------------------------------------------------------
9 | *
10 | * Copyright (c) 2011-2014 Davide Cervone .
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the "License");
13 | * you may not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * http://www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an "AS IS" BASIS,
20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | *
24 | */
25 | MathJax.Extension["TeX/everymath"]={version:"1.0",config:{everymath:""}},MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var e=MathJax.InputJax.TeX,t=e.Definitions;EVERYMATH=MathJax.Extension["TeX/everymath"],CONFIG=EVERYMATH.config,EVERYMATH.config=MathJax.Hub.config.TeX;for(var a in CONFIG)CONFIG.hasOwnProperty(a)&&null==EVERYMATH.config[a]&&(EVERYMATH.config[a]=config[a]);if(CONFIG=EVERYMATH.config,t.macros.everymath="Everymath",e.Parse.Augment({Everymath:function(e){CONFIG.everymath=this.GetArgument(e)}}),e.prefilterHooks)e.prefilterHooks.Add(function(e){e.math=CONFIG.everymath+e.math},1);else{var r=e.prefilterMath;e.Augment({prefilterMath:function(t,a,n){return t=CONFIG.everymath+t,r.call(e,t,a,n)}})}}),MathJax.Ajax.loadComplete("[Contrib]/everymath/everymath.js");
--------------------------------------------------------------------------------
/everymath/unpacked/everymath.js:
--------------------------------------------------------------------------------
1 | /****************************************************
2 | *
3 | * TeX-everymath.js
4 | *
5 | * Implements the \everymath macro for TeX input. You can configure
6 | * the initial value with the
7 | *
8 | * TeX: { everymath: "tokens" }
9 | *
10 | * configuration block, (where "tokens" is replaced by whatever you want
11 | * to insert at the beginning of every math expression). Otherwise, use
12 | *
13 | * \(\everymath{tokens}\)
14 | *
15 | * to set the string to be inserted before each math expression.
16 | *
17 | * You can load this file via the config=file parameter on the script
18 | * tag that loads MathJax.js, or by including it in the extensions
19 | * array in your configuration.
20 | *
21 | * Be sure to change the loadComplete() address to the URL
22 | * of the location of this file on your server.
23 | *
24 | * ---------------------------------------------------------------------
25 | *
26 | * Copyright (c) 2011-2014 Davide Cervone .
27 | *
28 | * Licensed under the Apache License, Version 2.0 (the "License");
29 | * you may not use this file except in compliance with the License.
30 | * You may obtain a copy of the License at
31 | *
32 | * http://www.apache.org/licenses/LICENSE-2.0
33 | *
34 | * Unless required by applicable law or agreed to in writing, software
35 | * distributed under the License is distributed on an "AS IS" BASIS,
36 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 | * See the License for the specific language governing permissions and
38 | * limitations under the License.
39 | *
40 | */
41 |
42 | MathJax.Extension["TeX/everymath"] = {
43 | version: "1.0",
44 | config: {everymath: ""}
45 | };
46 |
47 | MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
48 | var TEX = MathJax.InputJax.TeX,
49 | TEXDEF = TEX.Definitions;
50 | EVERYMATH = MathJax.Extension["TeX/everymath"],
51 | CONFIG = EVERYMATH.config;
52 | //
53 | // MathJax.Hub.CombineConfig only works for new configuration blocks,
54 | // but we are adding to the existing TeX block, so insert the preferences
55 | // that aren't already set.
56 | //
57 | EVERYMATH.config = MathJax.Hub.config.TeX;
58 | for (var id in CONFIG) {
59 | if (CONFIG.hasOwnProperty(id) && EVERYMATH.config[id] == null) {
60 | EVERYMATH.config[id] = config[id];
61 | }
62 | }
63 | CONFIG = EVERYMATH.config;
64 |
65 | //
66 | // Implements \everymath{tokens}
67 | //
68 | TEXDEF.macros.everymath = "Everymath";
69 | TEX.Parse.Augment({
70 | Everymath: function (name) {
71 | CONFIG.everymath = this.GetArgument(name);
72 | }
73 | });
74 |
75 | if (TEX.prefilterHooks) {
76 | // v2.0 approach
77 | TEX.prefilterHooks.Add(function (data) {data.math = CONFIG.everymath + data.math}, 1);
78 | } else {
79 | // v1.x approach
80 | var PREFILTER = TEX.prefilterMath;
81 | TEX.Augment({
82 | prefilterMath: function (math,displaymode,script) {
83 | math = CONFIG.everymath + math;
84 | return PREFILTER.call(TEX,math,displaymode,script);
85 | }
86 | });
87 | }
88 |
89 | });
90 |
91 | MathJax.Ajax.loadComplete("[Contrib]/everymath/unpacked/everymath.js");
92 |
93 |
--------------------------------------------------------------------------------
/forloop/License.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 |
3 | Version 2.0, January 2004
4 |
5 | http://www.apache.org/licenses/
6 |
7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8 |
9 | 1. Definitions.
10 |
11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16 |
17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18 |
19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20 |
21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22 |
23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24 |
25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26 |
27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28 |
29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30 |
31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32 |
33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34 |
35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36 |
37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and
38 | You must cause any modified files to carry prominent notices stating that You changed the files; and
39 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
41 |
42 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
43 |
44 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
45 |
46 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
47 |
48 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
49 |
50 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
51 |
52 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
53 |
54 | END OF TERMS AND CONDITIONS
55 |
--------------------------------------------------------------------------------
/forloop/README.md:
--------------------------------------------------------------------------------
1 | # Extension: forloop for the MathJax third party repository
2 |
3 | A version of `everymath.js` for the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions), including a compressed version (using YUI, see the [MathJax-dev tools](https://github.com/mathjax/mathjax-dev)).
4 |
5 | # About forloop
6 |
7 | Implements simple for-loop iteration for MathJax, with special handling for arrays.
8 |
9 | # Usage:
10 |
11 | \forloop[step]{start}{stop}{counter}{code}
12 | \ForArray[step]{start}{stop}{counter}{code}
13 |
14 |
15 | The `\forloop` macro does *not* work well with `array` environments, because
16 | the `&` and `\\` special sequences do not work correctly in the LaTeX code
17 | block. For that reason, the `\ForArray` macro is provided -- it formats the
18 | table based on the loop and constructs its own internal `mtable` for the
19 | MathJax internal representation directly, with default spacing and styling.
20 |
21 | Loops can be nested if needed. The `\ForArray` macro should not be nested
22 | to a depth more than 2 -- in this case, the inner loop adds entries to rows
23 | of the array, and the outer loop adds the rows to the array.
24 |
25 | If you want delimiters (such as square brackets or parentheses) around an
26 | array built with `\ForArray`, these will need to be added explicitly in
27 | the surrounding LaTeX code.
28 |
29 | This extension requires (and loads automatically) the `counters` extension,
30 | also available in this repository. If you use a local copy of this
31 | extension, you will need to decide also whether to use a local copy of
32 | the `counters` extension, and if so, change the URL in the `Require()`
33 | method call at the beginning of this extension script.
34 |
35 | Provides `\everymath` macro to place tokens at beginning of all math
36 | environments.
37 |
38 | References:
39 |
40 | - forloop: https://github.com/leathrum/mathjax-ext-contrib/tree/master/forloop
41 | - MathJax: http://www.mathjax.org/
42 |
43 |
44 | ## Using the MathJax CDN {#CDN}
45 |
46 | The MathJax CDN hosts a copy of this extension via the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions). To use the CDN copy, you need MathJax v2.4 (or higher) and configure the third party extension repository as described in the [MathJax documentation](http://docs.mathjax.org/).
47 |
48 | Then add the extension to your configuration like any other third party extension from the MathJax CDN. For example, your inline configuration might be
49 |
50 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | # History:
54 |
55 | *29 Jan 2012* -- Tom Leathrum
56 | Moved to GitHub repo, further history tracking there
57 | *28 Dec 2011* -- Tom Leathrum
58 | a few minor tweaks -- changed macro name from `\Input` to `\FormInput`, added value attribute optional parameter
59 | *23 Dec 2011* -- Davide Cervonne
60 |
61 |
--------------------------------------------------------------------------------
/forminput/forminput.js:
--------------------------------------------------------------------------------
1 | /****************************************************
2 | *
3 | * forminput.js
4 | *
5 | * Implements the \FormInput extension for including text elements in
6 | * math expressions. This only works in HTML-CSS output (all browsers),
7 | * and NativeMML output in Firefox (but not IE/MathPlayer or Opera).
8 | *
9 | * ---------------------------------------------------------------------
10 | *
11 | * Copyright (c) 2011-2014 Davide Cervone .
12 | *
13 | * Licensed under the Apache License, Version 2.0 (the "License");
14 | * you may not use this file except in compliance with the License.
15 | * You may obtain a copy of the License at
16 | *
17 | * http://www.apache.org/licenses/LICENSE-2.0
18 | *
19 | * Unless required by applicable law or agreed to in writing, software
20 | * distributed under the License is distributed on an "AS IS" BASIS,
21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | * See the License for the specific language governing permissions and
23 | * limitations under the License.
24 | *
25 | */
26 | MathJax.Callback.Queue(MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var t=MathJax.InputJax.TeX,a=t.Definitions,e=MathJax.ElementJax.mml,n=MathJax.HTML;a.macros.FormInput="FormInput",t.Parse.Augment({FormInput:function(t){var a=this.GetBrackets(t),i=this.GetBrackets(t),m=this.GetBrackets(t),s=this.GetArgument(t);(null==a||""===a)&&(a="2"),null==m&&(m=""),i=("MathJax_Input "+(i||"")).replace(/ +$/,"");var l=n.Element("input",{type:"text",name:s,id:s,size:a,className:i,value:m});l.setAttribute("xmlns","http://www.w3.org/1999/xhtml");var r=e["annotation-xml"](e.xml(l)).With({encoding:"application/xhtml+xml",isToken:!0});this.Push(e.semantics(r))}})})),MathJax.Ajax.loadComplete("[Contrib]/forminput/forminput.js");
--------------------------------------------------------------------------------
/forminput/unpacked/forminput.js:
--------------------------------------------------------------------------------
1 | /****************************************************
2 | *
3 | * forminput.js
4 | *
5 | * Implements the \FormInput extension for including text elements in
6 | * math expressions. This only works in HTML-CSS output (all browsers),
7 | * and NativeMML output in Firefox (but not IE/MathPlayer or Opera).
8 | *
9 | * The macro is \FormInput{name} where "name" is the CSS id to use for the
10 | * element. The Default size is 2, but you can use an optional
11 | * argument to set a different size, as in \FormInput[size]{name}. Finally,
12 | * you can use a second optional parameter to specify a CSS class for the
13 | * element (which can be styled to suit your needs). All the elements
14 | * generated by this extension are in class MathJax_Input, so you can
15 | * style that to change the default presentation.
16 | *
17 | * You can load this file via the config=file parameter on the script
18 | * tag that loads MathJax.js, or by including it in the extensions
19 | * array in your configuration.
20 | *
21 | * Be sure to change the loadComplete() address to the URL
22 | * of the location of this file on your server.
23 | *
24 | * ---------------------------------------------------------------------
25 | *
26 | * Copyright (c) 2011-2014 Davide Cervone .
27 | *
28 | * Licensed under the Apache License, Version 2.0 (the "License");
29 | * you may not use this file except in compliance with the License.
30 | * You may obtain a copy of the License at
31 | *
32 | * http://www.apache.org/licenses/LICENSE-2.0
33 | *
34 | * Unless required by applicable law or agreed to in writing, software
35 | * distributed under the License is distributed on an "AS IS" BASIS,
36 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37 | * See the License for the specific language governing permissions and
38 | * limitations under the License.
39 | *
40 | */
41 |
42 | MathJax.Callback.Queue(
43 | MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
44 | var VERSION = "1.0";
45 |
46 | var TEX = MathJax.InputJax.TeX,
47 | TEXDEF = TEX.Definitions,
48 | MML = MathJax.ElementJax.mml,
49 | HTML = MathJax.HTML;
50 |
51 | TEXDEF.macros.FormInput = "FormInput";
52 |
53 | TEX.Parse.Augment({
54 | //
55 | // Implements \FormInput[size][class]{name}
56 | //
57 | FormInput: function (name) {
58 | var size = this.GetBrackets(name),
59 | cls = this.GetBrackets(name),
60 | val = this.GetBrackets(name),
61 | id = this.GetArgument(name);
62 | if (size == null || size === "") {size = "2"}
63 | if (val == null) {val = ""}
64 | cls = ("MathJax_Input "+(cls||"")).replace(/ +$/,"");
65 | var input = HTML.Element("input",{type:"text", name:id, id:id, size:size, className:cls, value:val});
66 | input.setAttribute("xmlns","http://www.w3.org/1999/xhtml");
67 | var mml = MML["annotation-xml"](MML.xml(input)).With({encoding:"application/xhtml+xml",isToken:true});
68 | this.Push(MML.semantics(mml));
69 | }
70 | });
71 |
72 | }));
73 |
74 | MathJax.Ajax.loadComplete("[Contrib]/forminput/unpacked/forminput.js");
75 |
76 |
--------------------------------------------------------------------------------
/img/README.md:
--------------------------------------------------------------------------------
1 | mathjax-extension-TeX-img
2 | =========================
3 |
4 | MathJax TeX extension to embed images in math.
5 |
6 | # Extension: img.js, leveraging mglyph in TeX input
7 |
8 | This extension implements a TeX macro for embedding images
9 | in mathematical formula. It leverages the standard MathML
10 | mglyph tag which is designed for this purpose.
11 |
12 |
13 | # About img
14 |
15 | Provides a macro for embedding images in math.
16 |
17 |
18 | # Usage:
19 |
20 | \img[valign=,width=,height=]{URL}
21 |
22 | or
23 |
24 | \img[][][]{URL}
25 |
26 | This adds an `\img` macro for inserting images into a MathJax expression.
27 | Apart from the URL for the image, it takes three optional parameters:
28 | The vertical alignment value, the width, and the height of the image.
29 | Leave them out to get default values.
30 |
31 | With no vertical-align value, the image will sit on the baseline. With
32 | not width or height, the image will be its natural size. With one of
33 | the width or height specified, the image will be scaled to match that
34 | dimension while keeping the aspect ratio the same. If both are given,
35 | then image will be scaled to match both dimensions, without regard to
36 | the original aspect ratio.
37 |
38 |
39 | References:
40 |
41 | - img: https://github.com/pkra/mathjax-extension-tex-img
42 | - MathJax: http://www.mathjax.org/
43 | - Original discussion https://groups.google.com/d/msg/mathjax-users/SXjY3rQXOzc/YGcc48HwDR4J
44 |
45 |
46 | ## Using the MathJax CDN
47 |
48 | The MathJax CDN hosts a copy of this extension via the [MathJax third party
49 | extension
50 | repository](https://github.com/mathjax/MathJax-third-party-extensions). To use
51 | the CDN copy, you need MathJax v2.4 (or higher) and configure the third party
52 | extension repository as described in the [MathJax
53 | documentation](http://docs.mathjax.org/).
54 |
55 | Then add the extension to your configuration like any other third party
56 | extension from the MathJax CDN. For example, your inline configuration might be
57 |
58 |
13 |
14 |
16 |
17 | # Usage in TeX:
18 |
19 | \knowl{url}{math}
20 |
21 | # Usage in MathML
22 |
23 | ...
24 |
25 | Example:
26 |
27 |
28 | Γ
29 |
30 |
31 | References:
32 |
33 | - knowl: https://github.com/leathrum/mathjax-ext-contrib/tree/master/knowl
34 | - MathJax: http://www.mathjax.org/
35 |
36 |
37 | ## Using the MathJax CDN {#CDN}
38 |
39 | The MathJax CDN hosts a copy of this extension via the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions). To use the CDN copy, you need MathJax v2.4 (or higher) and configure the third party extension repository as described in the [MathJax documentation](http://docs.mathjax.org/).
40 |
41 | Then add the extension to your configuration like any other third party extension from the MathJax CDN. For example, your inline configuration might be
42 |
43 |
40 |
--------------------------------------------------------------------------------
/longdiv/longdiv.js:
--------------------------------------------------------------------------------
1 | /*************************************************************
2 | *
3 | * MathJax/extensions/TeX/longdiv.js
4 | *
5 | * Implements the \longdiv macro, which implements rendering
6 | * of US style long division
7 | *
8 | * Usage:
9 | *
10 | * \longdiv{dividend}{divisor}
11 | *
12 | * ---------------------------------------------------------------------
13 | *
14 | * Copyright (c) 2014 David Carlisle, The MathJax Consortium
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 | MathJax.Extension["TeX/longdiv"]={version:"0.1",padtol:function(a,n){for(var t="",r=a;n>r;r++)t+="\\?";return t},SimpleLongDiv:function(a,n){il=a.length,jl=n.length,j=parseInt(n,10),ia=a.substr(0,jl),parseInt(ia,10)=s;s++){r=parseInt(rstr,10),a1=Math.floor(r/j),ans+=a1;var l=j*a1;rstr=r-j*a1+"",work=work+"\\\\\n&"+pad+"\\underline{"+this.padtol((l+"").length,s==jl?jl:t)+l+"}",work=work+"\\\\\n&"+pad+this.padtol(rstr.length,s==jl?jl:t)+rstr+a.substr(s,1),rstr+=a.substr(s,1),pad=(s==jl&&t>jl?"":"\\?")+pad}for(var o="",i=0;jl-1>i;i++)o="\\?"+o;return"\n\\def\\?{\\phantom{0}}\n\\begin{array}{r@{}l}\n&"+o+ans+"\\\\"+e+"\n"+work+"\n\\end{array}\n"}},MathJax.Hub.Register.StartupHook("TeX enclose Ready",function(){var a=MathJax.InputJax.TeX,n=(MathJax.ElementJax.mml,MathJax.Extension["TeX/longdiv"]);n.TEX=a,a.Definitions.Add({macros:{longdiv:"LongDiv"}},null,!0),a.Parse.Augment({LongDiv:function(t){var r=this.GetArgument(t),e=this.GetArgument(t);this.Push(a.Parse(n.SimpleLongDiv(r,e),this.stack.env).mml())}}),MathJax.Hub.Startup.signal.Post("TeX longdiv Ready")}),MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/TeX/enclose.js"],["loadComplete",MathJax.Ajax,"[Contrib]/longdiv/longdiv.js"]););
--------------------------------------------------------------------------------
/longdiv/unpacked/longdiv.js:
--------------------------------------------------------------------------------
1 | /*************************************************************
2 | *
3 | * MathJax/extensions/TeX/longdiv.js
4 | *
5 | * Implements the \longdiv macro, which implements rendering
6 | * of US style long division
7 | *
8 | * Usage:
9 | *
10 | * \longdiv{dividend}{divisor}
11 | *
12 | * ---------------------------------------------------------------------
13 | *
14 | * Copyright (c) 2014 David Carlisle, The MathJax Consortium
15 | *
16 | * Licensed under the Apache License, Version 2.0 (the "License");
17 | * you may not use this file except in compliance with the License.
18 | * You may obtain a copy of the License at
19 | *
20 | * http://www.apache.org/licenses/LICENSE-2.0
21 | *
22 | * Unless required by applicable law or agreed to in writing, software
23 | * distributed under the License is distributed on an "AS IS" BASIS,
24 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25 | * See the License for the specific language governing permissions and
26 | * limitations under the License.
27 | */
28 | MathJax.Extension["TeX/longdiv"] = {
29 | version: "0.1",
30 | padtol: function (s, l) {
31 | var v = "";
32 | for (var tmp = s; tmp < l; tmp++) {
33 | v = v + "\\?";
34 | }
35 | return v;
36 | },
37 |
38 | SimpleLongDiv: function (istr, jstr) {
39 | il = istr.length;
40 | jl = jstr.length;
41 |
42 | j = parseInt(jstr, 10);
43 |
44 | ia = istr.substr(0, jl);
45 |
46 |
47 | if (parseInt(ia, 10) < j) {
48 | jl = jl + 1;
49 | }
50 |
51 | var jpadl = jstr.length + 1;
52 |
53 | ans = "";
54 | work = "";
55 | work = jstr + "& \\hspace{-0.5em} \\enclose{longdiv}{" + istr + "}";
56 | pad = "";
57 |
58 |
59 | var ansline = "";
60 | rstr = istr.substr(0, jl);
61 |
62 |
63 | for (var k = jl; k <= il; k++) {
64 | r = parseInt(rstr, 10);
65 | a1 = Math.floor(r / j);
66 | ans = ans + a1;
67 | var jtimes = j * a1;
68 | rstr = (r - j * a1) + "";
69 | work = work + "\\\\\n&" + pad + "\\underline{" + this.padtol((jtimes + "").length, (k == jl ? jl : jpadl)) + jtimes + "}";
70 | work = work + "\\\\\n&" + pad + this.padtol(rstr.length, (k == jl ? jl : jpadl)) + rstr + istr.substr(k, 1);
71 | rstr = rstr + istr.substr(k, 1);
72 | pad = ((k == jl && jl < jpadl) ? "" : "\\?") + pad;
73 | }
74 |
75 | var anspad = "";
76 | for (var tmp = 0; tmp < jl - 1; tmp++) {
77 | anspad = "\\?" + anspad;
78 | }
79 |
80 | return "\n\\def\\?{\\phantom{0}}\n\\begin{array}{r@{}l}\n&" + anspad + ans + "\\\\" + ansline + "\n" + work + "\n\\end{array}\n";
81 | }
82 |
83 |
84 | };
85 |
86 | MathJax.Hub.Register.StartupHook("TeX enclose Ready", function () {
87 | var TEX = MathJax.InputJax.TeX,
88 | MML = MathJax.ElementJax.mml;
89 | var LONGDIV = MathJax.Extension["TeX/longdiv"];
90 |
91 | LONGDIV.TEX = TEX; // for reference in longDiv above
92 | //
93 | // Set up control sequenecs
94 | //
95 | TEX.Definitions.Add({
96 | macros: {
97 | longdiv: 'LongDiv'
98 | }
99 | }, null, true);
100 |
101 | TEX.Parse.Augment({
102 | LongDiv: function (name) {
103 | var num = this.GetArgument(name),
104 | den = this.GetArgument(name);
105 | this.Push(TEX.Parse(LONGDIV.SimpleLongDiv(num, den), this.stack.env).mml());
106 | }
107 |
108 | });
109 |
110 | MathJax.Hub.Startup.signal.Post("TeX longdiv Ready");
111 |
112 | });
113 | MathJax.Callback.Queue(
114 | ["Require",MathJax.Ajax,"[MathJax]/extensions/TeX/enclose.js"],
115 | ["loadComplete",MathJax.Ajax,"[Contrib]/longdiv/unpacked/longdiv.js"]
116 | );
--------------------------------------------------------------------------------
/modifymenu/License.txt:
--------------------------------------------------------------------------------
1 | Apache License
2 |
3 | Version 2.0, January 2004
4 |
5 | http://www.apache.org/licenses/
6 |
7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8 |
9 | 1. Definitions.
10 |
11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16 |
17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18 |
19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20 |
21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22 |
23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24 |
25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26 |
27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28 |
29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30 |
31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32 |
33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34 |
35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36 |
37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and
38 | You must cause any modified files to carry prominent notices stating that You changed the files; and
39 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
41 |
42 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
43 |
44 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
45 |
46 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
47 |
48 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
49 |
50 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
51 |
52 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
53 |
54 | END OF TERMS AND CONDITIONS
55 |
--------------------------------------------------------------------------------
/modifymenu/README.md:
--------------------------------------------------------------------------------
1 | # Extension: modifymenu for the MathJax third party repository
2 |
3 | A version of `modifymenu.js` for the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions), including a compressed version (using YUI, see the [MathJax-dev tools](https://github.com/mathjax/mathjax-dev)).
4 |
5 | # About modifymenu
6 |
7 | Augments the `MathJax.Menu` object with utility methods for manipulating and
8 | modifying the MathJax contextual menu.
9 |
10 | # Usage:
11 |
12 | MathJax.Menu.appendItem(item)
13 | MathJax.Menu.addItemAtIndex(item,index)
14 | MathJax.Menu.addItemFirst(item)
15 | MathJax.Menu.addItemLast(item)
16 | MathJax.Menu.addItemAfterIndex(item,index)
17 | MathJax.Menu.getItemIndexByName(name)
18 | MathJax.Menu.getItemByName(name)
19 | MathJax.Menu.addItemAfterByName(item,name)
20 | MathJax.Menu.deleteItemAtIndex(index)
21 | MathJax.Menu.deleteItem(item)
22 | MathJax.Menu.deleteItemByName(name)
23 | MathJax.Menu.hideItemAtIndex(index)
24 | MathJax.Menu.hideItem(item)
25 | MathJax.Menu.hideItemByName(name)
26 | MathJax.Menu.showItemAtIndex(index)
27 | MathJax.Menu.showItem(item)
28 | MathJax.Menu.showItemByName(name)
29 | MathJax.Menu.disableItemAtIndex(index)
30 | MathJax.Menu.disableItem(item)
31 | MathJax.Menu.disableItemByName(name)
32 | MathJax.Menu.enableItemAtIndex(index)
33 | MathJax.Menu.enableItem(item)
34 | MathJax.Menu.enableItemByName(name)
35 |
36 | MathJax.Menu.ITEM.CHECKBOX.check(boolean)
37 |
38 | MathJax.Menu.ITEM.RADIO.select(item)
39 |
40 |
41 | These methods need to be called to modify an object of type `MathJax.Menu` -- in
42 | particular, the variable `MathJax.Menu.menu` stores the current contextual menu
43 | in a variable of type `MathJax.Menu`, so to modify the current menu, the call
44 | will take a form similar to:
45 |
46 | MathJax.Menu.menu.appendItem(item)
47 |
48 | The `MathJax.Menu.ITEM` class describes menu items -- subclasses include
49 | `COMMAND`, `LABEL`, `RULE`, `SUBMENU`, `CHECKBOX`, and `RADIO`. So, for
50 | example, to add a menu item "test" at the end of the main contextual menu
51 | which launches an alert box containing the message "Hello World!":
52 |
53 | MathJax.Menu.menu.append(MathJax.Menu.ITEM.COMMAND("test",
54 | function () { alert("Hello World!"); } ) );
55 |
56 | A `SUBMENU` item includes a variable `menu` of type `MathJax.Menu`
57 | containing the submenu, so to access and modify the submenu, the call will
58 | take a form similar to:
59 |
60 | MathJax.Menu.menu.getItemByName("Submenu Name").menu.append(item)
61 |
62 | The methods in this extension provide means to add, delete, access, hide,
63 | show, disable, or enable menu items, accessing the items by index, name, or
64 | item identity.
65 |
66 | ### Notes on MathJax versions
67 |
68 | Note that the contextual menu for MathJax version 2.0 is different from the
69 | contextual menu for MathJax version 1.1 -- some menu items have different
70 | names and positions, and the overall organization of the menu is different.
71 | For this reason, this extension needs to be used very carefully when the MathJax
72 | version being used by readers may not be known. The samples use specific versions
73 | of MathJax for this reason -- the first sample uses MathJax version 1.1, the second
74 | sample uses MathJax version 2.1.
75 | References:
76 |
77 | - modifymenu: https://github.com/leathrum/mathjax-ext-contrib/tree/master/modifymenu
78 | - MathJax: http://www.mathjax.org/
79 |
80 |
81 | ## Using the MathJax CDN {#CDN}
82 |
83 | The MathJax CDN hosts a copy of this extension via the [MathJax third party extension repository](https://github.com/mathjax/MathJax-third-party-extensions). To use the CDN copy, you need MathJax v2.4 (or higher) and configure the third party extension repository as described in the [MathJax documentation](http://docs.mathjax.org/).
84 |
85 | Then add the extension to your configuration like any other third party extension from the MathJax CDN. For example, your inline configuration might be
86 |
87 |
6 |
7 |
8 |
9 |
10 | LaTeX Physics Package in MathJax
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
The following commands in the Physics Package is not implemented yet:
45 |
46 |
47 |
All Matrix Macros
48 |
So far everything done here is by string substitution. Whenever commands involving the following cannot be done simply by string substitution and hence not working:
49 |
50 |
51 |
* modified command
52 |
[] (or ()) is involved
53 |
variable no. of arguments
54 |
55 |
Examples of commands that doesn’t work: \dv: has all the properties mentioned above
56 |
57 |
58 |
As I mentioned, everything done so far is by string substitution only. Some hints are given in Pull Request#16—MathJax-third-party-extensions but my skill is too limited to understand how the above cases should be handled. Feel free to improve it though.
Columns M-V excluding column O are copied to test/macro.js
68 |
69 |
70 |
License.js is used to store the license that should be appended to the .js files.
71 |
72 |
Other files are built automatically by physics.sh. MultiMarkdown, UglifyJS2, LaTeX are assumed. I used it on Mac and have no idea if the way my bash script is written is OS agnostic or not.
As a PDF generated by LaTeX: this is the reference file using the LaTeX’s the Physics Package. You can compare the LaTeX output and HTML output and you will see which one is working now or yet to be implemented.
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
i.e. only the one pushed to MathJax’s official third parties extensions repository is tested ↩
92 |
93 |
94 |
95 |
Rather than as an extension loaded separately, this one is a macro put in the file directly ↩