math-core 0.8.1 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/math_core.js +13 -13
- package/dist/math_core_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -191,7 +191,9 @@ new LatexToMathML(options: MathCoreOptions)
|
|
|
191
191
|
| `throwOnError` | `boolean` | `true` | Throw `LatexError` on conversion errors. If `false`, returns an HTML error snippet instead. |
|
|
192
192
|
| `ignoreUnknownCommands` | `boolean` | `false` | Render unknown commands as red text instead of erroring. |
|
|
193
193
|
| `annotation` | `boolean` | `false` | Include the original LaTeX as an annotation in the MathML output. |
|
|
194
|
+
| `allowUnreliableRendering` | `boolean` | `false` | Enable commands whose MathML Core output is rendered unreliably across browsers, such as `\widetilde`, `\widecheck` and `\utilde`. If `false`, these commands are treated as unknown. |
|
|
194
195
|
| `globalGroup` | `boolean` | `false` | Run the conversion in the global group, so that commands defined with `\newcommand` stay defined for subsequent calls to `convert_with_global_state`. If `false`, such definitions are local to the snippet which contains them. |
|
|
196
|
+
| `unicodeSubstitution` | `"never" \| "conventional"` | `"conventional"` | Whether commands like `\coloneqq` are rendered with a dedicated Unicode symbol (`≔`) or as a combination of more basic symbols (`:` and `=`). `"conventional"` substitutes wherever the LaTeX package `unicode-math` would, which is a good middle ground between semantics and faithfulness to the LaTeX output; `"never"` disables the substitutions. |
|
|
195
197
|
| `maxExpansions` | `number` | `1000` | How many custom commands may be expanded in one snippet before the conversion gives up. The limit exists because a macro may expand to itself, directly or indirectly. |
|
|
196
198
|
| `idPrefix` | `string` | `""` | Added to the beginning of every `id` and anchor reference. Use this to avoid conflicts when embedding the output. |
|
|
197
199
|
|
package/dist/math_core.js
CHANGED
|
@@ -208,11 +208,11 @@ function __wbg_get_imports() {
|
|
|
208
208
|
__wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
|
|
209
209
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
210
210
|
},
|
|
211
|
-
|
|
211
|
+
__wbg_allowUnreliableRendering_0c688f2e673263ef: function(arg0) {
|
|
212
212
|
const ret = arg0.allowUnreliableRendering;
|
|
213
213
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
214
214
|
},
|
|
215
|
-
|
|
215
|
+
__wbg_annotation_21d23c44ed560264: function(arg0) {
|
|
216
216
|
const ret = arg0.annotation;
|
|
217
217
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
218
218
|
},
|
|
@@ -220,7 +220,7 @@ function __wbg_get_imports() {
|
|
|
220
220
|
const ret = ConfigParseError.__wrap(arg0);
|
|
221
221
|
return ret;
|
|
222
222
|
},
|
|
223
|
-
|
|
223
|
+
__wbg_displayStyle_8f34f8466c68c3e6: function(arg0) {
|
|
224
224
|
const ret = arg0.displayStyle;
|
|
225
225
|
return ret;
|
|
226
226
|
},
|
|
@@ -236,18 +236,18 @@ function __wbg_get_imports() {
|
|
|
236
236
|
const ret = arg0[arg1 >>> 0];
|
|
237
237
|
return ret;
|
|
238
238
|
},
|
|
239
|
-
|
|
239
|
+
__wbg_globalGroup_e6cfdf49a72c6ace: function(arg0) {
|
|
240
240
|
const ret = arg0.globalGroup;
|
|
241
241
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
242
242
|
},
|
|
243
|
-
|
|
243
|
+
__wbg_idPrefix_74c8aab65e9f7cb8: function(arg0, arg1) {
|
|
244
244
|
const ret = arg1.idPrefix;
|
|
245
245
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
246
246
|
var len1 = WASM_VECTOR_LEN;
|
|
247
247
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
248
248
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
249
249
|
},
|
|
250
|
-
|
|
250
|
+
__wbg_ignoreUnknownCommands_6a05fe2fbcdaf5cb: function(arg0) {
|
|
251
251
|
const ret = arg0.ignoreUnknownCommands;
|
|
252
252
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
253
253
|
},
|
|
@@ -255,7 +255,7 @@ function __wbg_get_imports() {
|
|
|
255
255
|
const ret = Array.isArray(arg0);
|
|
256
256
|
return ret;
|
|
257
257
|
},
|
|
258
|
-
|
|
258
|
+
__wbg_latex_7b59333697348341: function(arg0, arg1) {
|
|
259
259
|
const ret = arg1.latex;
|
|
260
260
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
261
261
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -266,11 +266,11 @@ function __wbg_get_imports() {
|
|
|
266
266
|
const ret = LatexError.__wrap(arg0);
|
|
267
267
|
return ret;
|
|
268
268
|
},
|
|
269
|
-
|
|
269
|
+
__wbg_macros_980bab7dcab4497a: function(arg0) {
|
|
270
270
|
const ret = arg0.macros;
|
|
271
271
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
272
272
|
},
|
|
273
|
-
|
|
273
|
+
__wbg_maxExpansions_a488622f8ecb93ad: function(arg0) {
|
|
274
274
|
const ret = arg0.maxExpansions;
|
|
275
275
|
return isLikeNone(ret) ? Number.MAX_SAFE_INTEGER : (ret) >>> 0;
|
|
276
276
|
},
|
|
@@ -278,7 +278,7 @@ function __wbg_get_imports() {
|
|
|
278
278
|
const ret = arg0.next();
|
|
279
279
|
return ret;
|
|
280
280
|
}, arguments); },
|
|
281
|
-
|
|
281
|
+
__wbg_prettyPrint_f6868ca7e4b2ac12: function(arg0, arg1) {
|
|
282
282
|
const ret = arg1.prettyPrint;
|
|
283
283
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
284
284
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -289,11 +289,11 @@ function __wbg_get_imports() {
|
|
|
289
289
|
const ret = arg0.size;
|
|
290
290
|
return ret;
|
|
291
291
|
},
|
|
292
|
-
|
|
292
|
+
__wbg_throwOnError_271d79a0e89a8c82: function(arg0) {
|
|
293
293
|
const ret = arg0.throwOnError;
|
|
294
294
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
295
295
|
},
|
|
296
|
-
|
|
296
|
+
__wbg_unicodeSubstitution_1eb49d99cb177b14: function(arg0, arg1) {
|
|
297
297
|
const ret = arg1.unicodeSubstitution;
|
|
298
298
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
299
299
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -304,7 +304,7 @@ function __wbg_get_imports() {
|
|
|
304
304
|
const ret = arg0.value;
|
|
305
305
|
return ret;
|
|
306
306
|
},
|
|
307
|
-
|
|
307
|
+
__wbg_xmlNamespace_90ec7bce1e2fb4b9: function(arg0) {
|
|
308
308
|
const ret = arg0.xmlNamespace;
|
|
309
309
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
310
310
|
},
|
package/dist/math_core_bg.wasm
CHANGED
|
Binary file
|