@drghaliasri/butex 5.5.5 → 5.6.1
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 +39 -1
- package/dist/document.js +36 -0
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +36 -0
- package/dist/document.mjs.map +1 -1
- package/dist/document2.d.mts +4 -2
- package/dist/document2.d.ts +4 -2
- package/dist/document2.js +173 -20
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs +173 -20
- package/dist/document2.mjs.map +1 -1
- package/dist/index.d.mts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.global.js +79 -14
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +79 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +79 -14
- package/dist/index.mjs.map +1 -1
- package/dist/react-document.js +254 -7
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +254 -7
- package/dist/react-document.mjs.map +1 -1
- package/dist/react-document2.d.mts +17 -5
- package/dist/react-document2.d.ts +17 -5
- package/dist/react-document2.js +1185 -817
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +1186 -818
- package/dist/react-document2.mjs.map +1 -1
- package/dist/react.d.mts +35 -0
- package/dist/react.d.ts +35 -0
- package/dist/react.js +1277 -7
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1277 -7
- package/dist/react.mjs.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@ Peer dependency: `mathjax` ^4.x (aligned with MathJax 4 components). If you use
|
|
|
64
64
|
5. When using **SVG** (`tex-svg.js`), call `BuTeX.registerBuTeXSvgTextWrapper(MathJax)` **after** `defaultReady()` so Takween/Diwani/Maghribi text, `\ad`, and Arabic atomic commands (`\arsin`, etc.) render in the preview with the correct fonts. CommonHTML (`tex-chtml.js`) uses the injected CSS classes instead.
|
|
65
65
|
6. Render math with `renderBuTeXMathIsland(tex, options?)` or mount into a host element via `mountBuTeXMathIsland(host, tex, options?)`. Pass `output: 'svg'` when the host loads `tex-svg.js`, or `output: 'chtml'` with `tex-chtml.js`. For raw Arabic TeX that did not come from the editor AST, pass `mirrorOperators: true` to wrap directional operators according to BuTeX's shared operator table. `ButexEditor` picks SVG vs CHTML automatically from the loaded MathJax bundle (`tex2svg` vs `tex2chtml`).
|
|
66
66
|
|
|
67
|
-
Ensure TeX `packages` includes `butex-arabic-math` (use `BUTEX_TEX_PACKAGE` in config when using `{ '[+]': [...] }`).
|
|
67
|
+
Ensure TeX `packages` includes `butex-arabic-math` (use `BUTEX_TEX_PACKAGE` in config when using `{ '[+]': [...] }`). BuTeX registers lightweight browser compatibility macros for toolbar symbols such as `\coloneqq` and `\eqqcolon`; XeLaTeX export still relies on the document preamble's `mathtools`.
|
|
68
68
|
|
|
69
69
|
## Usage (npm / bundler)
|
|
70
70
|
|
|
@@ -393,6 +393,44 @@ onDocumentChange={(node) => {
|
|
|
393
393
|
|
|
394
394
|
Do not call `JSON.stringify(documentNode)` directly. JSON serialization removes `CharNode`, `CommandNode`, and other equation prototypes: the saved TeX source can still render in preview, but the structured equation cannot reopen in the editor. Also do not feed every change callback back into `initialDocument`; that prop is for initial or externally loaded data, and changing it resets the editor state and undo history. Keep the current save snapshot in a ref or separate state that is not passed back as `initialDocument`. Change callbacks run during editing, so debounce network autosaves or save explicitly.
|
|
395
395
|
|
|
396
|
+
##### Host-driven figure insert
|
|
397
|
+
|
|
398
|
+
After an external upload (for example S3), insert a figure on the **live** editor without remounting or rewriting `initialDocument`:
|
|
399
|
+
|
|
400
|
+
```tsx
|
|
401
|
+
'use client';
|
|
402
|
+
|
|
403
|
+
import { useRef } from 'react';
|
|
404
|
+
import {
|
|
405
|
+
ButexDocumentEditor2,
|
|
406
|
+
type ButexDocumentEditor2Ref,
|
|
407
|
+
} from '@drghaliasri/butex/react-document2';
|
|
408
|
+
|
|
409
|
+
export function ArticleEditorWithUpload() {
|
|
410
|
+
const editorRef = useRef<ButexDocumentEditor2Ref>(null);
|
|
411
|
+
|
|
412
|
+
async function onFileUploaded(uuid: string) {
|
|
413
|
+
// Sets \\includegraphics{assets/<uuid>.jpg} after the focused block.
|
|
414
|
+
// Do not call addDocument2ImageBlock outside the component or remount with key++.
|
|
415
|
+
editorRef.current?.insertImageBlock(`assets/${uuid}.jpg`);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
return (
|
|
419
|
+
<ButexDocumentEditor2
|
|
420
|
+
ref={editorRef}
|
|
421
|
+
resolveImageUrl={({ assetId, value }) =>
|
|
422
|
+
assetId ? `https://cdn.example/${assetId}` : value
|
|
423
|
+
}
|
|
424
|
+
onDocumentJsonChange={(json) => {
|
|
425
|
+
/* persist json */
|
|
426
|
+
}}
|
|
427
|
+
/>
|
|
428
|
+
);
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
`insertImageBlock` matches the toolbar figure button (focus-aware insert + undo snapshot). Use `updateImageBlockValue(blockId, value)` to change a path on an existing image block, and `getDocumentJson()` to read the canonical wire JSON without host-side AST mutation.
|
|
433
|
+
|
|
396
434
|
Host apps still register BuTeX with MathJax before preview rendering. `uiLocale` selects Arabic (`"ar"`, the default) or English (`"en"`) document-editor chrome and is passed to the embedded equation editor. `documentDirection` independently controls prose inputs and preview flow without creating a second document tree. `equationSide` independently controls whether structured equations open, render, and save from the `"english"` or `"arabic"` side. Set `editableEquations={false}` to show math islands without equation insertion, deletion, or editor access. Set `previewOnly={true}` to render only the read-only document preview with no toolbar, editor panel, or equation drawer. Optional `\includegraphics` `asset_id` is preserved on import; pass `resolveImageUrl={({ assetId, value }) => …})` so preview can load S3/CDN/local assets while plain `value` URLs keep working without a resolver. Document JSON may include root `meta` (`title`, `authors`, structured Hijri `date` `{ day, month, year }` with Arabic month names such as `"محرم"`, `abstract`) plus a `references` catalog (`key`, `authors`, `title`, `year`, `url`, `venue`) and `\cite{key1,key2}` spans in text values. Pass `documentMeta` to seed missing meta fields from the host; JSON keys win when present. The editor always centers a fixed basmala line before the title block and a closing ḥamdala after the body (preview + LaTeX). Hijri date uses day/month/year dropdowns (no calendar conversion; default year 1448). The editor shows numeric cite chips and a bibliography block. RTL preview/chips render reversed labels such as `[٣،٢،١]` (Arabic comma); LTR stays `[1, 2, 3]`. Pass `digitForm` (`western` / `arabicIndic` / `persianIndic`, defaulting from `documentDirection`) or use the toolbar digit control. LaTeX export keeps logical `\cite{…}` key order for XeLaTeX; digit shaping and bidi display in PDF belong in the host preamble (`bidi`/polyglossia + font `Mapping`, see `references/commands.py`). Range compression (`[3–7]`) is not implemented yet. Raw-only equations keep their original source because the browser does not parse raw LaTeX into equation ASTs. Document editor v2 defaults to **`tex-svg.js`**; use `tex-chtml.js` only if you pass `mathOutput="chtml"`.
|
|
397
435
|
|
|
398
436
|
### Styling/theming contract
|
package/dist/document.js
CHANGED
|
@@ -1379,6 +1379,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1379
1379
|
category: "operators1",
|
|
1380
1380
|
Tex: "\\neq",
|
|
1381
1381
|
mirror: true,
|
|
1382
|
+
compileMirror: true,
|
|
1382
1383
|
Label: "\u2260",
|
|
1383
1384
|
title: "\u0644\u0627 \u064A\u0633\u0627\u0648\u064A",
|
|
1384
1385
|
svg_path: null
|
|
@@ -1418,6 +1419,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1418
1419
|
Tex: "\\leq",
|
|
1419
1420
|
mirror: true,
|
|
1420
1421
|
displayMirror: false,
|
|
1422
|
+
compileMirror: true,
|
|
1421
1423
|
Label: "\u2264",
|
|
1422
1424
|
title: "\u0623\u0635\u063A\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A",
|
|
1423
1425
|
svg_path: null
|
|
@@ -1428,6 +1430,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1428
1430
|
Tex: "\\geq",
|
|
1429
1431
|
mirror: true,
|
|
1430
1432
|
displayMirror: false,
|
|
1433
|
+
compileMirror: true,
|
|
1431
1434
|
Label: "\u2265",
|
|
1432
1435
|
title: "\u0623\u0643\u0628\u0631 \u0645\u0646 \u0623\u0648 \u064A\u0633\u0627\u0648\u064A",
|
|
1433
1436
|
svg_path: null
|
|
@@ -1438,6 +1441,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1438
1441
|
Tex: "\\coloneqq",
|
|
1439
1442
|
mirror: true,
|
|
1440
1443
|
displayMirror: false,
|
|
1444
|
+
compileMirror: true,
|
|
1441
1445
|
Label: "\u2254",
|
|
1442
1446
|
title: "\u064A\u0639\u0631\u0641 \u0628\u0623\u0646\u0647 \u064A\u0633\u0627\u0648\u064A",
|
|
1443
1447
|
svg_path: null
|
|
@@ -1448,6 +1452,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1448
1452
|
Tex: "\\eqqcolon",
|
|
1449
1453
|
mirror: true,
|
|
1450
1454
|
displayMirror: false,
|
|
1455
|
+
compileMirror: true,
|
|
1451
1456
|
Label: "\u2255",
|
|
1452
1457
|
title: "\u064A\u0633\u0627\u0648\u064A \u0628\u0627\u0644\u062A\u0639\u0631\u064A\u0641",
|
|
1453
1458
|
svg_path: null
|
|
@@ -1459,6 +1464,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1459
1464
|
Tex: "\\propto",
|
|
1460
1465
|
mirror: true,
|
|
1461
1466
|
displayMirror: false,
|
|
1467
|
+
compileMirror: true,
|
|
1462
1468
|
Label: "\u221D",
|
|
1463
1469
|
title: "\u064A\u062A\u0646\u0627\u0633\u0628 \u0645\u0639",
|
|
1464
1470
|
svg_path: null
|
|
@@ -1469,6 +1475,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1469
1475
|
Tex: "\\in",
|
|
1470
1476
|
mirror: true,
|
|
1471
1477
|
displayMirror: false,
|
|
1478
|
+
compileMirror: true,
|
|
1472
1479
|
Label: "\u2208",
|
|
1473
1480
|
title: "\u064A\u0646\u062A\u0645\u064A \u0625\u0644\u0649",
|
|
1474
1481
|
svg_path: null
|
|
@@ -1489,6 +1496,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1489
1496
|
Tex: "\\subset",
|
|
1490
1497
|
mirror: true,
|
|
1491
1498
|
displayMirror: false,
|
|
1499
|
+
compileMirror: true,
|
|
1492
1500
|
Label: "\u2282",
|
|
1493
1501
|
title: "\u0645\u062C\u0645\u0648\u0639\u0629 \u062C\u0632\u0626\u064A\u0629 \u0645\u0646",
|
|
1494
1502
|
svg_path: null
|
|
@@ -1499,6 +1507,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1499
1507
|
Tex: "\\supset",
|
|
1500
1508
|
mirror: true,
|
|
1501
1509
|
displayMirror: false,
|
|
1510
|
+
compileMirror: true,
|
|
1502
1511
|
Label: "\u2283",
|
|
1503
1512
|
title: "\u0645\u062C\u0645\u0648\u0639\u0629 \u0634\u0627\u0645\u0644\u0629 \u0644\u0640",
|
|
1504
1513
|
svg_path: null
|
|
@@ -1509,6 +1518,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1509
1518
|
Tex: "\\subseteq",
|
|
1510
1519
|
mirror: true,
|
|
1511
1520
|
displayMirror: false,
|
|
1521
|
+
compileMirror: true,
|
|
1512
1522
|
Label: "\u2286",
|
|
1513
1523
|
title: "\u0645\u062C\u0645\u0648\u0639\u0629 \u062C\u0632\u0626\u064A\u0629 \u0623\u0648 \u062A\u0633\u0627\u0648\u064A",
|
|
1514
1524
|
svg_path: null
|
|
@@ -1519,6 +1529,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1519
1529
|
Tex: "\\supseteq",
|
|
1520
1530
|
mirror: true,
|
|
1521
1531
|
displayMirror: false,
|
|
1532
|
+
compileMirror: true,
|
|
1522
1533
|
Label: "\u2287",
|
|
1523
1534
|
title: "\u0645\u062C\u0645\u0648\u0639\u0629 \u0634\u0627\u0645\u0644\u0629 \u0623\u0648 \u062A\u0633\u0627\u0648\u064A",
|
|
1524
1535
|
svg_path: null
|
|
@@ -1559,6 +1570,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1559
1570
|
Tex: "\\nsubseteq",
|
|
1560
1571
|
mirror: true,
|
|
1561
1572
|
displayMirror: false,
|
|
1573
|
+
compileMirror: true,
|
|
1562
1574
|
Label: "\u2288",
|
|
1563
1575
|
title: "\u0644\u064A\u0633\u062A \u0645\u062C\u0645\u0648\u0639\u0629 \u062C\u0632\u0626\u064A\u0629 \u0623\u0648 \u062A\u0633\u0627\u0648\u064A",
|
|
1564
1576
|
svg_path: null
|
|
@@ -1569,6 +1581,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1569
1581
|
Tex: "\\nsupseteq",
|
|
1570
1582
|
mirror: true,
|
|
1571
1583
|
displayMirror: false,
|
|
1584
|
+
compileMirror: true,
|
|
1572
1585
|
Label: "\u2289",
|
|
1573
1586
|
title: "\u0644\u064A\u0633\u062A \u0645\u062C\u0645\u0648\u0639\u0629 \u0634\u0627\u0645\u0644\u0629 \u0623\u0648 \u062A\u0633\u0627\u0648\u064A",
|
|
1574
1587
|
svg_path: null
|
|
@@ -1616,6 +1629,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1616
1629
|
Tex: "\\ddots",
|
|
1617
1630
|
mirror: true,
|
|
1618
1631
|
displayMirror: false,
|
|
1632
|
+
compileMirror: true,
|
|
1619
1633
|
Label: "\u22F1",
|
|
1620
1634
|
title: "\u0646\u0642\u0627\u0637 \u0642\u0637\u0631\u064A\u0629",
|
|
1621
1635
|
svg_path: null
|
|
@@ -1635,6 +1649,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1635
1649
|
category: "operators3",
|
|
1636
1650
|
Tex: "\\implies",
|
|
1637
1651
|
mirror: true,
|
|
1652
|
+
compileMirror: true,
|
|
1638
1653
|
Label: "\u21D2",
|
|
1639
1654
|
title: "\u064A\u0633\u062A\u0644\u0632\u0645",
|
|
1640
1655
|
svg_path: null
|
|
@@ -1644,6 +1659,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1644
1659
|
category: "operators3",
|
|
1645
1660
|
Tex: "\\impliedby",
|
|
1646
1661
|
mirror: true,
|
|
1662
|
+
compileMirror: true,
|
|
1647
1663
|
Label: "\u21D0",
|
|
1648
1664
|
title: "\u0645\u0633\u062A\u0644\u0632\u0645 \u0645\u0646",
|
|
1649
1665
|
svg_path: null
|
|
@@ -1662,6 +1678,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1662
1678
|
category: "operators3",
|
|
1663
1679
|
Tex: "\\Longrightarrow",
|
|
1664
1680
|
mirror: true,
|
|
1681
|
+
compileMirror: true,
|
|
1665
1682
|
Label: "\u27F9",
|
|
1666
1683
|
title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0637\u0648\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
1667
1684
|
svg_path: null
|
|
@@ -1671,6 +1688,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1671
1688
|
category: "operators3",
|
|
1672
1689
|
Tex: "\\Longleftarrow",
|
|
1673
1690
|
mirror: true,
|
|
1691
|
+
compileMirror: true,
|
|
1674
1692
|
Label: "\u27F8",
|
|
1675
1693
|
title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0637\u0648\u064A\u0644 \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
1676
1694
|
svg_path: null
|
|
@@ -1680,6 +1698,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1680
1698
|
category: "operators3",
|
|
1681
1699
|
Tex: "\\to",
|
|
1682
1700
|
mirror: true,
|
|
1701
|
+
compileMirror: true,
|
|
1683
1702
|
Label: "\u2192",
|
|
1684
1703
|
title: "\u064A\u0624\u0648\u0644 \u0625\u0644\u0649",
|
|
1685
1704
|
svg_path: null
|
|
@@ -1689,6 +1708,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1689
1708
|
category: "operators3",
|
|
1690
1709
|
Tex: "\\rightleftharpoons",
|
|
1691
1710
|
mirror: true,
|
|
1711
|
+
compileMirror: true,
|
|
1692
1712
|
Label: "\u21CC",
|
|
1693
1713
|
title: "\u0627\u062A\u0632\u0627\u0646",
|
|
1694
1714
|
svg_path: null
|
|
@@ -1698,6 +1718,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1698
1718
|
category: "operators3",
|
|
1699
1719
|
Tex: "\\leftarrow",
|
|
1700
1720
|
mirror: true,
|
|
1721
|
+
compileMirror: true,
|
|
1701
1722
|
Label: "\u2190",
|
|
1702
1723
|
title: "\u0633\u0647\u0645 \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
1703
1724
|
svg_path: null
|
|
@@ -1707,6 +1728,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1707
1728
|
category: "operators3",
|
|
1708
1729
|
Tex: "\\rightarrow",
|
|
1709
1730
|
mirror: true,
|
|
1731
|
+
compileMirror: true,
|
|
1710
1732
|
Label: "\u2192",
|
|
1711
1733
|
title: "\u0633\u0647\u0645 \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
1712
1734
|
svg_path: null
|
|
@@ -1716,6 +1738,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1716
1738
|
category: "operators3",
|
|
1717
1739
|
Tex: "\\Leftarrow",
|
|
1718
1740
|
mirror: true,
|
|
1741
|
+
compileMirror: true,
|
|
1719
1742
|
Label: "\u21D0",
|
|
1720
1743
|
title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
1721
1744
|
svg_path: null
|
|
@@ -1725,6 +1748,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1725
1748
|
category: "operators3",
|
|
1726
1749
|
Tex: "\\Rightarrow",
|
|
1727
1750
|
mirror: true,
|
|
1751
|
+
compileMirror: true,
|
|
1728
1752
|
Label: "\u21D2",
|
|
1729
1753
|
title: "\u0633\u0647\u0645 \u0645\u0632\u062F\u0648\u062C \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
1730
1754
|
svg_path: null
|
|
@@ -1734,6 +1758,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1734
1758
|
category: "operators3",
|
|
1735
1759
|
Tex: "\\leftharpoonup",
|
|
1736
1760
|
mirror: true,
|
|
1761
|
+
compileMirror: true,
|
|
1737
1762
|
Label: "\u21BC",
|
|
1738
1763
|
title: "\u0633\u0647\u0645 \u062E\u0637\u0627\u0641\u064A \u0639\u0644\u0648\u064A \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
1739
1764
|
svg_path: null
|
|
@@ -1743,6 +1768,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1743
1768
|
category: "operators3",
|
|
1744
1769
|
Tex: "\\rightharpoonup",
|
|
1745
1770
|
mirror: true,
|
|
1771
|
+
compileMirror: true,
|
|
1746
1772
|
Label: "\u21C0",
|
|
1747
1773
|
title: "\u0633\u0647\u0645 \u062E\u0637\u0627\u0641\u064A \u0639\u0644\u0648\u064A \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
1748
1774
|
svg_path: null
|
|
@@ -1752,6 +1778,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1752
1778
|
category: "operators3",
|
|
1753
1779
|
Tex: "\\leftharpoondown",
|
|
1754
1780
|
mirror: true,
|
|
1781
|
+
compileMirror: true,
|
|
1755
1782
|
Label: "\u21BD",
|
|
1756
1783
|
title: "\u0633\u0647\u0645 \u062E\u0637\u0627\u0641\u064A \u0633\u0641\u0644\u064A \u0625\u0644\u0649 \u0627\u0644\u064A\u0633\u0627\u0631",
|
|
1757
1784
|
svg_path: null
|
|
@@ -1761,6 +1788,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1761
1788
|
category: "operators3",
|
|
1762
1789
|
Tex: "\\rightharpoondown",
|
|
1763
1790
|
mirror: true,
|
|
1791
|
+
compileMirror: true,
|
|
1764
1792
|
Label: "\u21C1",
|
|
1765
1793
|
title: "\u0633\u0647\u0645 \u062E\u0637\u0627\u0641\u064A \u0633\u0641\u0644\u064A \u0625\u0644\u0649 \u0627\u0644\u064A\u0645\u064A\u0646",
|
|
1766
1794
|
svg_path: null
|
|
@@ -1771,6 +1799,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1771
1799
|
category: "integrals",
|
|
1772
1800
|
Tex: "\\int",
|
|
1773
1801
|
mirror: true,
|
|
1802
|
+
compileMirror: true,
|
|
1774
1803
|
Label: "\u222B",
|
|
1775
1804
|
title: "\u062A\u0643\u0627\u0645\u0644",
|
|
1776
1805
|
svg_path: null
|
|
@@ -1781,6 +1810,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1781
1810
|
Tex: "\\iint",
|
|
1782
1811
|
mirror: true,
|
|
1783
1812
|
displayMirror: false,
|
|
1813
|
+
compileMirror: true,
|
|
1784
1814
|
Label: "\u222C",
|
|
1785
1815
|
title: "\u062A\u0643\u0627\u0645\u0644 \u0645\u0632\u062F\u0648\u062C",
|
|
1786
1816
|
svg_path: null
|
|
@@ -1791,6 +1821,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1791
1821
|
Tex: "\\iiint",
|
|
1792
1822
|
mirror: true,
|
|
1793
1823
|
displayMirror: false,
|
|
1824
|
+
compileMirror: true,
|
|
1794
1825
|
Label: "\u222D",
|
|
1795
1826
|
title: "\u062A\u0643\u0627\u0645\u0644 \u062B\u0644\u0627\u062B\u064A",
|
|
1796
1827
|
svg_path: null
|
|
@@ -1801,6 +1832,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1801
1832
|
Tex: "\\iiiint",
|
|
1802
1833
|
mirror: true,
|
|
1803
1834
|
displayMirror: false,
|
|
1835
|
+
compileMirror: true,
|
|
1804
1836
|
Label: "\u2A0C",
|
|
1805
1837
|
title: "\u062A\u0643\u0627\u0645\u0644 \u0631\u0628\u0627\u0639\u064A",
|
|
1806
1838
|
svg_path: null
|
|
@@ -1811,6 +1843,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1811
1843
|
Tex: "\\oint",
|
|
1812
1844
|
mirror: true,
|
|
1813
1845
|
displayMirror: false,
|
|
1846
|
+
compileMirror: true,
|
|
1814
1847
|
Label: "\u222E",
|
|
1815
1848
|
title: "\u062A\u0643\u0627\u0645\u0644 \u0645\u063A\u0644\u0642",
|
|
1816
1849
|
svg_path: null
|
|
@@ -1821,6 +1854,7 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1821
1854
|
Tex: "\\oiint",
|
|
1822
1855
|
mirror: true,
|
|
1823
1856
|
displayMirror: false,
|
|
1857
|
+
compileMirror: true,
|
|
1824
1858
|
Label: "\u222F",
|
|
1825
1859
|
title: "\u062A\u0643\u0627\u0645\u0644 \u0633\u0637\u062D\u064A \u0645\u063A\u0644\u0642",
|
|
1826
1860
|
svg_path: null
|
|
@@ -1831,12 +1865,14 @@ var ATOMIC_OPERATOR_COMMANDS = {
|
|
|
1831
1865
|
Tex: "\\oiiint",
|
|
1832
1866
|
mirror: true,
|
|
1833
1867
|
displayMirror: false,
|
|
1868
|
+
compileMirror: true,
|
|
1834
1869
|
Label: "\u2230",
|
|
1835
1870
|
title: "\u062A\u0643\u0627\u0645\u0644 \u062D\u062C\u0645\u064A \u0645\u063A\u0644\u0642",
|
|
1836
1871
|
svg_path: null
|
|
1837
1872
|
}
|
|
1838
1873
|
};
|
|
1839
1874
|
var MIRRORED_OPERATOR_TEX = Object.values(ATOMIC_OPERATOR_COMMANDS).filter((command) => command.mirror).map((command) => command.Tex).sort((a, b) => b.length - a.length);
|
|
1875
|
+
var COMPILE_MIRRORED_OPERATOR_TEX = Object.values(ATOMIC_OPERATOR_COMMANDS).filter((command) => "compileMirror" in command && command.compileMirror).map((command) => command.Tex).sort((a, b) => b.length - a.length);
|
|
1840
1876
|
function atomicOperatorCommandSpec(id) {
|
|
1841
1877
|
return Object.prototype.hasOwnProperty.call(ATOMIC_OPERATOR_COMMANDS, id) ? ATOMIC_OPERATOR_COMMANDS[id] : null;
|
|
1842
1878
|
}
|