├── .gitignore
├── MSI
├── License.rtf
├── MathML-fonts.msi
├── MathML-fonts.wxs
└── README.md
├── README.md
├── bug-648548
├── README.md
└── bootstrap.js
├── image-to-mathml
├── README.md
├── data
│ ├── LaTeX_Delimiters.js
│ ├── LaTeX_NoDelimiters.js
│ ├── addRulePanel.html
│ ├── addRulePanel.js
│ ├── convert.js
│ ├── icon16.png
│ ├── icon32.png
│ └── icon64.png
├── icon.png
├── icon64.png
├── lib
│ ├── LaTeXML.js
│ ├── Mathematica.js
│ ├── main.js
│ ├── predefinedRules.js
│ └── sanitizer.js
├── locale
│ ├── en-US.properties
│ ├── fr-FR.properties
│ └── pt-BR.properties
└── package.json
├── mathml-copy
├── README.md
├── data
│ ├── get-annotations.js
│ └── get-mathml-source.js
├── lib
│ ├── copy-mathml.js
│ └── main.js
├── locale
│ ├── ar.properties
│ ├── de-DE.properties
│ ├── en-US.properties
│ ├── es-ES.properties
│ ├── fr-FR.properties
│ ├── hi-IN.properties
│ ├── hu-HU.properties
│ ├── mr-IN.properties
│ ├── pt-BR.properties
│ ├── pt-PT.properties
│ └── zh-CN.properties
└── package.json
├── mathml-ctop
├── .gitignore
├── Makefile
├── README.md
├── config
└── src
│ ├── bootstrap.js
│ ├── chrome.manifest
│ └── install.rdf
├── mathml-fonts
├── .gitignore
├── Makefile.in
├── MathML-fonts
│ ├── bootstrap.js
│ ├── install.rdf
│ └── resource
│ │ └── mathml.css
├── README.md
├── configure
└── configure.ac
├── mathml-fontsettings
├── README.md
├── data
│ └── set-style.js
├── lib
│ └── main.js
├── locale
│ ├── en-US.properties
│ ├── fr-FR.properties
│ └── pt-BR.properties
└── package.json
├── mathml-viewsource
├── README.md
├── data
│ ├── get-mathml-source.js
│ ├── prism.css
│ ├── prism.js
│ ├── view-mathml-source.html
│ └── view-mathml-source.js
├── index.js
├── locale
│ ├── ar.properties
│ ├── ast.properties
│ ├── cs.properties
│ ├── de.properties
│ ├── en-GB.properties
│ ├── en-US.properties
│ ├── eo.properties
│ ├── es-AR.properties
│ ├── es-CL.properties
│ ├── es-ES.properties
│ ├── es-MX.properties
│ ├── fa.properties
│ ├── fr.properties
│ ├── fy-NL.properties
│ ├── gl.properties
│ ├── he.properties
│ ├── hu.properties
│ ├── id.properties
│ ├── it.properties
│ ├── ja-JP-mac.properties
│ ├── ja.properties
│ ├── kk.properties
│ ├── ko.properties
│ ├── lt.properties
│ ├── lv.properties
│ ├── nb-NO.properties
│ ├── nl.properties
│ ├── nn-NO.properties
│ ├── pl.properties
│ ├── pt-BR.properties
│ ├── pt-PT.properties
│ ├── ru.properties
│ ├── sk.properties
│ ├── sl.properties
│ ├── sv-SE.properties
│ ├── th.properties
│ ├── tr.properties
│ ├── uk.properties
│ ├── vi.properties
│ ├── zh-CN.properties
│ └── zh-TW.properties
└── package.json
├── mathml-zoom
├── README.md
├── data
│ ├── zoom.css
│ └── zoom.js
├── icon64.png
├── lib
│ └── main.js
└── package.json
├── mathparser
├── README.md
├── mathparser-base.diff
├── mathparser-dictionary.diff
├── mathparser-itex.diff
├── mathparser-simple.diff
├── mathparser-tests.diff
├── mathparser-utils.diff
└── mathzilla-parser.xhtml
├── mathzilla.svg
├── mathzilla
├── README.md
├── data
│ ├── ctop.xsl
│ └── mathzilla-parser.xhtml
├── lib
│ ├── content-to-presentation.js
│ ├── copy-mathml.js
│ ├── image-to-mathml.js
│ └── main.js
└── package.json
├── native-mathml
├── README.md
├── data
│ ├── bug-fixes.js
│ ├── katex.css
│ ├── mediawiki.css
│ └── menu-cookie.js
├── icon.png
├── icon64.png
├── lib
│ └── main.js
├── locale
│ ├── ar.properties
│ ├── en-US.properties
│ ├── fr-FR.properties
│ └── pt-BR.properties
└── package.json
├── texzilla
├── README.md
├── data
│ ├── TeXZilla.js
│ ├── index.html
│ ├── logo.png
│ └── logo.svg
├── lib
│ ├── TeXZilla.js
│ └── main.js
├── package.json
└── test
│ └── test-TeXZilla.js
└── xpi
├── mathparser-0.1.xpi
└── mathzilla-0.1.xpi
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | mathml-fonts/MSI/*.msi
3 |
--------------------------------------------------------------------------------
/MSI/MathML-fonts.msi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fred-wang/Mathzilla/ff1382d1e340511ff3b2039cd12fff53fa6a3328/MSI/MathML-fonts.msi
--------------------------------------------------------------------------------
/MSI/README.md:
--------------------------------------------------------------------------------
1 | # MSI
2 |
3 | **This package is no longer maintained. Cambria Math is installed by default on
4 | Windows 7 and higher and is usable with Firefox 31 or higher, so this installer
5 | is becoming obsolete.**
6 |
7 | This directory contains the source of the MathML fonts Windows installer.
8 | Instructions on how to build it are given in `MathML-fonts.wxs`.
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Mathzilla
2 |
3 | The goal of the Mathzilla Project is to provide add-ons to extend Mozilla
4 | products with new MathML-related features. See the [Mathzilla collection on AMO](https://addons.mozilla.org/collections/fred_wang/mathzilla/).
5 |
6 | **Warning: This directory contains some obsolete or experimental content and is
7 | only kept for historical purpose.**
8 |
9 | The following extensions have been converted to the
10 | [WebExtension](https://developer.mozilla.org/en-US/Add-ons/WebExtensions) format
11 | and are tracked in separate repositories:
12 |
13 | - [Image To MathML](https://github.com/fred-wang/webextension-image-to-mathml)
14 | - [MathML Copy](https://github.com/fred-wang/webextension-mathml-copy)
15 | - [MathML Fonts](https://github.com/fred-wang/MathFonts/tree/master/webextension)
16 | - [MathML Font Settings](https://github.com/fred-wang/webextension-mathml-font-settings)
17 | - [MathML View Source](https://github.com/fred-wang/webextension-mathml-view-source/)
18 | - [MathML Zoom](https://github.com/fred-wang/webextension-mathml-zoom)
19 | - [Native MathML](https://github.com/fred-wang/webextension-native-mathml)
20 | - [Content MathML Polyfill](https://github.com/fred-wang/webextension-content-mathml-polyfill)
21 | - [Presentation MathML Polyfill](https://github.com/fred-wang/webextension-presentation-mathml-polyfill)
22 | - [TeXZilla](https://github.com/fred-wang/TeXZilla/tree/master/webextension)
23 |
--------------------------------------------------------------------------------
/bug-648548/README.md:
--------------------------------------------------------------------------------
1 | This was an experimental code to use Windows' API to register fonts.
2 | See also [bug 648548](https://bugzilla.mozilla.org/show_bug.cgi?id=648548)
3 | and the
4 | [MissingFontsNotifier](https://github.com/fred-wang/MissingFontsNotifier).
5 |
--------------------------------------------------------------------------------
/bug-648548/bootstrap.js:
--------------------------------------------------------------------------------
1 | const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
2 |
3 | Cu.import("resource://gre/modules/Services.jsm");
4 | Cu.import("resource://gre/modules/devtools/Console.jsm");
5 | Cu.import("resource://gre/modules/ctypes.jsm");
6 |
7 | const kAddonID = "bug-648548@mozilla.org";
8 | const kFontList = [/* ... */];
9 | const kRuntime = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);
10 |
11 | function windowsBroadCastFontChange()
12 | {
13 | // These are taken from MinGW-w64
14 | const HWND_BROADCAST = ctypes.voidptr_t(0xFFFF);
15 | const WM_FONTCHANGE = 0x001D;
16 | let libUser32 = ctypes.open("User32.dll");
17 | let SendMessage =
18 | libUser32.declare("SendMessageA",
19 | ctypes.winapi_abi,
20 | ctypes.long, // LRESULT
21 | ctypes.voidptr_t, // HWND
22 | ctypes.unsigned_int, // UINT
23 | ctypes.int, // WPARAM
24 | ctypes.long // LPARAM
25 | );
26 | SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
27 | libUser32.close();
28 | }
29 |
30 | function windowsRegisterFont(aFontPath)
31 | {
32 | // Add the font resource and broadcast the change.
33 | let libGdi32 = ctypes.open("Gdi32.dll");
34 | let AddFontResource =
35 | libGdi32.declare("AddFontResourceA",
36 | ctypes.winapi_abi,
37 | ctypes.int, // int
38 | ctypes.char.ptr // LPCTSTR lpszFilename
39 | );
40 | if (AddFontResource(aFontPath) == 0) {
41 | console.error("Failed to add font resource " + aFontPath);
42 | }
43 | libGdi32.close();
44 | }
45 |
46 | function windowsUnregisterFont(aFontPath)
47 | {
48 | let libGdi32 = ctypes.open("Gdi32.dll");
49 | let RemoveFontResource =
50 | libGdi32.declare("RemoveFontResourceA",
51 | ctypes.winapi_abi,
52 | ctypes.int, // BOOL
53 | ctypes.char.ptr // LPCTSTR lpFileName
54 | );
55 | if (RemoveFontResource(aFontPath) == 0) {
56 | console.error("Failed to remove font resource " + aFontPath);
57 | }
58 | libGdi32.close();
59 | }
60 |
61 | function getFontsDir()
62 | {
63 | // Ensure there is a fonts/ directory in the profile directory.
64 | let fontsDir = Cc["@mozilla.org/toolkit/profile-service;1"].
65 | createInstance(Ci.nsIToolkitProfileService).
66 | selectedProfile.localDir.clone();
67 | fontsDir.appendRelativePath("fonts");
68 | if (!fontsDir.exists()) {
69 | fontsDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0x1ff);
70 | } else {
71 | fontsDir.permissions = 0x1ff;
72 | }
73 | return fontsDir;
74 | }
75 |
76 | function updateFontList()
77 | {
78 | if (kRuntime.OS == "WINNT") {
79 | windowsBroadCastFontChange();
80 | }
81 | let fonts = Cc["@mozilla.org/gfx/fontenumerator;1"].
82 | getService(Components.interfaces.nsIFontEnumerator);
83 | fonts.updateFontList();
84 | }
85 |
86 | function startup(aData, aReason)
87 | {
88 | let fontsDir = getFontsDir();
89 |
90 | for (var i = 0; i < kFontList.length; i++) {
91 | // Get the path of the file copied to the profile directory.
92 | let profileFontFile = fontsDir.clone();
93 | profileFontFile.append(kFontList[i]);
94 |
95 | if (aReason == APP_STARTUP) {
96 | if (kRuntime.OS == "WINNT" && profileFontFile.exists()) {
97 | windowsRegisterFont(profileFontFile.path);
98 | }
99 | continue;
100 | }
101 |
102 | // Copy the file from the addon directory to profile directory.
103 | if (!profileFontFile.exists()) {
104 | let addonFontFile = Cc["@mozilla.org/file/directory_service;1"].
105 | getService(Ci.nsIProperties).
106 | get("ProfD", Ci.nsIFile);
107 | addonFontFile.appendRelativePath("extensions");
108 | addonFontFile.appendRelativePath(kAddonID);
109 | addonFontFile.append(kFontList[i]);
110 | addonFontFile.copyTo(fontsDir, kFontList[i]);
111 | if (kRuntime.OS == "WINNT") {
112 | windowsRegisterFont(profileFontFile.path);
113 | }
114 | }
115 | }
116 |
117 | updateFontList();
118 | }
119 |
120 | function shutdown(aData, aReason)
121 | {
122 | let fontsDir = getFontsDir();
123 |
124 | for (var i = 0; i < kFontList.length; i++) {
125 |
126 | let profileFontFile = fontsDir.clone();
127 | profileFontFile.append(kFontList[i]);
128 | if (kRuntime.OS == "WINNT" && profileFontFile.exists()) {
129 | windowsUnregisterFont(profileFontFile.path);
130 | }
131 |
132 | if (aReason == APP_SHUTDOWN) {
133 | continue;
134 | }
135 |
136 | // Remove the file from the profile directory.
137 | if (profileFontFile.exists()) {
138 | profileFontFile.remove(true);
139 | }
140 | }
141 |
142 | updateFontList();
143 | }
144 |
145 | function install() {}
146 | function uninstall() {}
147 |
--------------------------------------------------------------------------------
/image-to-mathml/README.md:
--------------------------------------------------------------------------------
1 | # Image to MathML
2 |
3 | This directory contains the source of the [Image to MathML add-on](https://addons.mozilla.org/en-US/firefox/addon/image-to-mathml/) which is
4 | built with the [Add-on SDK](https://developer.mozilla.org/en-US/Add-ons/SDK).
5 |
6 | Users should report any bug to the
7 | [GitHub tracker](https://github.com/fred-wang/Mathzilla/issues).
8 |
9 | Localizers should look at the `locale/` directory. To add a new translation,
10 | copy `en-US.properties` to another `*.properties` with the appropriate
11 | [Locale Code](https://wiki.mozilla.org/L10n:Locale_Codes). Please check the
12 | [GitHub Localization issue](https://github.com/fred-wang/Mathzilla/issues/17).
13 |
--------------------------------------------------------------------------------
/image-to-mathml/data/LaTeX_Delimiters.js:
--------------------------------------------------------------------------------
1 | /* -*- Mode: Java; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
2 | /* vim: set ts=2 et sw=2 tw=80: */
3 | /* This Source Code Form is subject to the terms of the Mozilla Public
4 | * License, v. 2.0. If a copy of the MPL was not distributed with this
5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 |
7 | "use strict";
8 |
9 | // See LaTeX_Delimiters in locale/en-US.properties and lib/predefinedRules.js
10 | // for a description of this script and its options.
11 |
12 | var options = JSON.parse(self.options);
13 |
14 | self.port.on("convert-images", function () {
15 | var images = document.body.querySelectorAll(options.selectors),
16 | i, img, alt, m;
17 | for (i = 0; i < images.length; i++) {
18 | img = images[i]; alt = img.alt;
19 | if ((m = alt.match(/^\s*\$\$([^]+)\$\$\s*$/)) ||
20 | (m = alt.match(/^\s*\\\[([^]+)\\\]\s*$/)) ||
21 | (m =
22 | alt.match(/^\s*\\begin{displaymath}([^]+)\\end{displaymath}\s*$/))) {
23 | // Display equations
24 | fromLaTeXRequest(img, options.preloadList, m[1], function(aMath) {
25 | if (options.useDisplayAttribute) {
26 | aMath.setAttribute("display", "block");
27 | } else {
28 | aMath.setAttribute("displaystyle", "true");
29 | }
30 | });
31 | } else if ((m = alt.match(/^\s*\$([^]+)\$\s*$/)) ||
32 | (m = alt.match(/^\s*\\\(([^]+)\\\)\s*$/))) {
33 | // Inline equations
34 | fromLaTeXRequest(img, options.preloadList, m[1], null);
35 | }
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/image-to-mathml/data/LaTeX_NoDelimiters.js:
--------------------------------------------------------------------------------
1 | /* -*- Mode: Java; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
2 | /* vim: set ts=2 et sw=2 tw=80: */
3 | /* This Source Code Form is subject to the terms of the Mozilla Public
4 | * License, v. 2.0. If a copy of the MPL was not distributed with this
5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 |
7 | "use strict";
8 |
9 | // See LaTeX_NoDelimiters in locale/en-US.properties and lib/predefinedRules.js
10 | // for a description of this script and its options.
11 |
12 | var options = JSON.parse(self.options);
13 |
14 | self.port.on("convert-images", function () {
15 | var images, i, img;
16 | if (options.selectorsNone !== "") {
17 | images = document.body.querySelectorAll(options.selectorsNone);
18 | for (i = 0; i < images.length; i++) {
19 | img = images[i];
20 | fromLaTeXRequest(img, options.preloadList, img.alt, null);
21 | }
22 | }
23 | if (options.selectorsInlineDisplayStyle !== "") {
24 | images = document.body.querySelectorAll(options.
25 | selectorsInlineDisplayStyle);
26 | for (i = 0; i < images.length; i++) {
27 | img = images[i];
28 | fromLaTeXRequest(img, options.preloadList, img.alt, function(aMath) {
29 | aMath.setAttribute("displaystyle", "true");
30 | });
31 | }
32 | }
33 | if (options.selectorsDisplay !== "") {
34 | images = document.body.querySelectorAll(options.selectorsDisplay);
35 | for (i = 0; i < images.length; i++) {
36 | img = images[i];
37 | fromLaTeXRequest(img, options.preloadList, img.alt, function(aMath) {
38 | aMath.setAttribute("display", "block");
39 | });
40 | }
41 | }
42 | });
43 |
--------------------------------------------------------------------------------
/image-to-mathml/data/addRulePanel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |

43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/image-to-mathml/data/addRulePanel.js:
--------------------------------------------------------------------------------
1 | /* -*- Mode: Java; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
2 | /* vim: set ts=2 et sw=2 tw=80: */
3 | /* This Source Code Form is subject to the terms of the Mozilla Public
4 | * License, v. 2.0. If a copy of the MPL was not distributed with this
5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 |
7 | "use strict";
8 |
9 | var scripts, selectedScript;
10 |
11 | function urlPatternChanged()
12 | {
13 | var pattern = document.getElementById("urlPattern");
14 | document.getElementById("OKButton").disabled = (pattern.value === "");
15 | document.getElementById("DeleteButton").disabled = true;
16 | if (pattern.value !== "") {
17 | self.port.emit("get-rule-data", pattern.value);
18 | }
19 | }
20 |
21 | function selectedScriptChanged(aData)
22 | {
23 | console.log("xxxxx"+aData);
24 | var i, s, options, o;
25 |
26 | // Get the selected script
27 | if (aData) {
28 | i = 0;
29 | for (s in scripts) {
30 | if (s === aData.Script) {
31 | break;
32 | }
33 | i++;
34 | }
35 | document.getElementById("scriptSelect").selectedIndex = i;
36 | } else {
37 | i = document.getElementById("scriptSelect").selectedIndex;
38 | for (s in scripts) {
39 | if (i == 0) {
40 | break;
41 | }
42 | i--;
43 | }
44 | }
45 | selectedScript = s;
46 | s = scripts[selectedScript];
47 | document.getElementById("infoScript").textContent = s.description;
48 |
49 | // Set the options
50 | var refOption = document.getElementById("refOption");
51 | while (refOption.nextElementSibling) {
52 | refOption.parentNode.removeChild(refOption.nextElementSibling);
53 | }
54 | for (o in s.ScriptOptions) {
55 | var option = s.ScriptOptions[o];
56 | var value = option.value;
57 | if (aData) {
58 | value = aData.ScriptOptions[o];
59 | }
60 | var newOption = refOption.cloneNode(true);
61 | newOption.removeAttribute("id");
62 | var label = newOption.getElementsByTagName("label")[0];
63 | label.setAttribute("for", o);
64 | label.textContent = option.title;
65 | newOption.getElementsByClassName("infoOption")[0].textContent =
66 | option.description;
67 | var input = newOption.getElementsByTagName("input")[0];
68 | input.setAttribute("id", o);
69 | if (option.type === "bool") {
70 | input.type = "checkbox";
71 | input.checked = value;
72 | } else if (option.type === "string") {
73 | input.type = "text";
74 | input.value = value;
75 | } else {
76 | throw "Unknown option type: " + option.type;
77 | }
78 | refOption.parentNode.appendChild(newOption);
79 | }
80 | }
81 |
82 | function submitRule()
83 | {
84 | var s = scripts[selectedScript];
85 | var json = {
86 | URLPattern: document.getElementById("urlPattern").value,
87 | Script: selectedScript,
88 | ScriptOptions: {}
89 | };
90 | for (var o in s.ScriptOptions) {
91 | var input = document.getElementById(o);
92 | var option = s.ScriptOptions[o];
93 | if (option.type === "bool") {
94 | json.ScriptOptions[o] = input.checked;
95 | } else if (option.type === "string") {
96 | json.ScriptOptions[o] = input.value;
97 | } else {
98 | throw "Unknown option type: " + option.type;
99 | }
100 | }
101 | self.port.emit("update-rule", json);
102 | }
103 |
104 | self.port.on("send-main-data", function (aData) {
105 | scripts = aData.scripts;
106 |
107 | var local = aData.local, s, i, selectElement, selectChild;
108 |
109 | // Set the document direction.
110 | document.body.setAttribute("dir", aData.dir);
111 |
112 | // Localize the labels.
113 | for (s in local) {
114 | var elements = document.getElementsByClassName(s);
115 | for (i = 0; i < elements.length; i++) {
116 | elements[i].textContent = local[s];
117 | }
118 | }
119 |
120 | // Set the default URL pattern.
121 | var urlPattern = document.getElementById("urlPattern");
122 | urlPattern.value = aData.urlPattern;
123 | urlPattern.addEventListener("change", urlPatternChanged);
124 | urlPatternChanged();
125 |
126 | // Set the predefined script list.
127 | selectElement = document.getElementById("scriptSelect");
128 | selectChild = selectElement.firstElementChild;
129 | for (s in scripts) {
130 | if (!selectChild) {
131 | selectChild = document.createElement("option");
132 | selectElement.appendChild(selectChild);
133 | }
134 | selectChild.textContent = scripts[s].title;
135 | selectChild = selectChild.nextElementSibling;
136 | }
137 | selectElement.addEventListener("change", function () {
138 | selectedScriptChanged(null);
139 | });
140 | selectedScriptChanged(null);
141 |
142 | // Event for the cancel, OK and delete buttons.
143 | document.getElementById("CancelButton").addEventListener("click",
144 | function() { self.port.emit("cancel"); }
145 | );
146 | document.getElementById("OKButton").addEventListener("click", submitRule);
147 | document.getElementById("DeleteButton").addEventListener("click",
148 | function() {
149 | self.port.emit("delete-rule",
150 | document.getElementById("urlPattern").value);
151 | }
152 | );
153 | });
154 |
155 | self.port.on("send-rule-data", function (aData) {
156 | var pattern = document.getElementById("urlPattern").value;
157 | if (aData.URLPattern !== pattern || !aData.Script) {
158 | return;
159 | }
160 | aData.ScriptOptions = JSON.parse(aData.ScriptOptions);
161 |
162 | // The rule data has been found, enable the button.
163 | document.getElementById("DeleteButton").disabled = false;
164 |
165 | // Select the script
166 | selectedScriptChanged(aData)
167 | });
168 |
--------------------------------------------------------------------------------
/image-to-mathml/data/convert.js:
--------------------------------------------------------------------------------
1 | /* -*- Mode: Java; tab-width: 2; indent-tabs-mode:nil; c-basic-offset: 2 -*- */
2 | /* vim: set ts=2 et sw=2 tw=80: */
3 | /* This Source Code Form is subject to the terms of the Mozilla Public
4 | * License, v. 2.0. If a copy of the MPL was not distributed with this
5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 |
7 | "use strict";
8 |
9 | // Associative array indexed by the LaTeX source. The elements are arrays of
10 | // JSON objects
11 | //
12 | // { image: ...,
13 | // callback: function(aMath) { ... } }
14 | //
15 | // where image is the
element to convert into a