@drghaliasri/butex 7.1.4 → 7.2.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/dist/document.d.mts +1 -2
- package/dist/document.d.ts +1 -2
- package/dist/document.js +56 -0
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +56 -0
- package/dist/document.mjs.map +1 -1
- package/dist/document2-cli.js +298 -4
- package/dist/document2-cli.js.map +1 -1
- package/dist/document2.d.mts +1 -1
- package/dist/document2.d.ts +1 -1
- package/dist/document2.js +67 -0
- package/dist/document2.js.map +1 -1
- package/dist/document2.mjs +67 -0
- package/dist/document2.mjs.map +1 -1
- package/dist/index.d.mts +129 -2
- package/dist/index.d.ts +129 -2
- package/dist/index.global.js +99 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +99 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react-document.js +78 -0
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +78 -0
- package/dist/react-document.mjs.map +1 -1
- package/dist/react-document2-preview.js +62 -0
- package/dist/react-document2-preview.js.map +1 -1
- package/dist/react-document2-preview.mjs +62 -0
- package/dist/react-document2-preview.mjs.map +1 -1
- package/dist/react-document2.d.mts +1 -1
- package/dist/react-document2.d.ts +1 -1
- package/dist/react-document2.js +119 -0
- package/dist/react-document2.js.map +1 -1
- package/dist/react-document2.mjs +119 -0
- package/dist/react-document2.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +78 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +78 -0
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -99,7 +99,7 @@ declare const BUTEX_EDITOR_CSS: string;
|
|
|
99
99
|
declare function injectBuTeXEditorStyles(doc?: Document): void;
|
|
100
100
|
|
|
101
101
|
type EditorSide = 'english' | 'arabic';
|
|
102
|
-
type EditorNodeKind = 'char' | 'number' | 'operator' | 'delimiter' | 'frac' | 'sqrt' | 'overset' | 'underset' | 'accent' | 'env' | 'atomicCommand' | 'atomicOperatorCommand';
|
|
102
|
+
type EditorNodeKind = 'char' | 'number' | 'operator' | 'delimiter' | 'frac' | 'sqrt' | 'overset' | 'underset' | 'accent' | 'env' | 'atomicCommand' | 'atomicOperatorCommand' | 'standardCommand';
|
|
103
103
|
type MatrixEnvStyle = 'matrix' | 'pmatrix' | 'bmatrix' | 'Bmatrix' | 'vmatrix' | 'Vmatrix';
|
|
104
104
|
type GridEnvName = MatrixEnvStyle | 'array' | 'aligned';
|
|
105
105
|
type EnvColumnAlignment = 'l' | 'c' | 'r';
|
|
@@ -1255,6 +1255,124 @@ declare function cloneEditorSession(session: EditorSession): EditorSession;
|
|
|
1255
1255
|
declare function buildInitialSyncMap(englishTree: EditorChain, arabicTree: EditorChain): EditorSession['sync'];
|
|
1256
1256
|
declare function createEditorSession(englishTree: EditorChain, arabicTree: EditorChain, activeSide?: EditorSide): EditorSession;
|
|
1257
1257
|
|
|
1258
|
+
declare const STANDARD_COMMANDS: {
|
|
1259
|
+
readonly '\\alpha': {
|
|
1260
|
+
readonly tex: "\\alpha";
|
|
1261
|
+
readonly label: "α";
|
|
1262
|
+
readonly title: "alpha";
|
|
1263
|
+
};
|
|
1264
|
+
readonly '\\beta': {
|
|
1265
|
+
readonly tex: "\\beta";
|
|
1266
|
+
readonly label: "β";
|
|
1267
|
+
readonly title: "beta";
|
|
1268
|
+
};
|
|
1269
|
+
readonly '\\gamma': {
|
|
1270
|
+
readonly tex: "\\gamma";
|
|
1271
|
+
readonly label: "γ";
|
|
1272
|
+
readonly title: "gamma";
|
|
1273
|
+
};
|
|
1274
|
+
readonly '\\delta': {
|
|
1275
|
+
readonly tex: "\\delta";
|
|
1276
|
+
readonly label: "δ";
|
|
1277
|
+
readonly title: "delta";
|
|
1278
|
+
};
|
|
1279
|
+
readonly '\\epsilon': {
|
|
1280
|
+
readonly tex: "\\epsilon";
|
|
1281
|
+
readonly label: "ε";
|
|
1282
|
+
readonly title: "epsilon";
|
|
1283
|
+
};
|
|
1284
|
+
readonly '\\eta': {
|
|
1285
|
+
readonly tex: "\\eta";
|
|
1286
|
+
readonly label: "η";
|
|
1287
|
+
readonly title: "eta";
|
|
1288
|
+
};
|
|
1289
|
+
readonly '\\theta': {
|
|
1290
|
+
readonly tex: "\\theta";
|
|
1291
|
+
readonly label: "θ";
|
|
1292
|
+
readonly title: "theta";
|
|
1293
|
+
};
|
|
1294
|
+
readonly '\\lambda': {
|
|
1295
|
+
readonly tex: "\\lambda";
|
|
1296
|
+
readonly label: "λ";
|
|
1297
|
+
readonly title: "lambda";
|
|
1298
|
+
};
|
|
1299
|
+
readonly '\\mu': {
|
|
1300
|
+
readonly tex: "\\mu";
|
|
1301
|
+
readonly label: "μ";
|
|
1302
|
+
readonly title: "mu";
|
|
1303
|
+
};
|
|
1304
|
+
readonly '\\rho': {
|
|
1305
|
+
readonly tex: "\\rho";
|
|
1306
|
+
readonly label: "ρ";
|
|
1307
|
+
readonly title: "rho";
|
|
1308
|
+
};
|
|
1309
|
+
readonly '\\sigma': {
|
|
1310
|
+
readonly tex: "\\sigma";
|
|
1311
|
+
readonly label: "σ";
|
|
1312
|
+
readonly title: "sigma";
|
|
1313
|
+
};
|
|
1314
|
+
readonly '\\tau': {
|
|
1315
|
+
readonly tex: "\\tau";
|
|
1316
|
+
readonly label: "τ";
|
|
1317
|
+
readonly title: "tau";
|
|
1318
|
+
};
|
|
1319
|
+
readonly '\\phi': {
|
|
1320
|
+
readonly tex: "\\phi";
|
|
1321
|
+
readonly label: "φ";
|
|
1322
|
+
readonly title: "phi";
|
|
1323
|
+
};
|
|
1324
|
+
readonly '\\chi': {
|
|
1325
|
+
readonly tex: "\\chi";
|
|
1326
|
+
readonly label: "χ";
|
|
1327
|
+
readonly title: "chi";
|
|
1328
|
+
};
|
|
1329
|
+
readonly '\\psi': {
|
|
1330
|
+
readonly tex: "\\psi";
|
|
1331
|
+
readonly label: "ψ";
|
|
1332
|
+
readonly title: "psi";
|
|
1333
|
+
};
|
|
1334
|
+
readonly '\\omega': {
|
|
1335
|
+
readonly tex: "\\omega";
|
|
1336
|
+
readonly label: "ω";
|
|
1337
|
+
readonly title: "omega";
|
|
1338
|
+
};
|
|
1339
|
+
readonly '\\zeta': {
|
|
1340
|
+
readonly tex: "\\zeta";
|
|
1341
|
+
readonly label: "ζ";
|
|
1342
|
+
readonly title: "zeta";
|
|
1343
|
+
};
|
|
1344
|
+
readonly '\\nabla': {
|
|
1345
|
+
readonly tex: "\\nabla";
|
|
1346
|
+
readonly label: "∇";
|
|
1347
|
+
readonly title: "nabla";
|
|
1348
|
+
};
|
|
1349
|
+
readonly '\\Delta': {
|
|
1350
|
+
readonly tex: "\\Delta";
|
|
1351
|
+
readonly label: "Δ";
|
|
1352
|
+
readonly title: "Delta";
|
|
1353
|
+
};
|
|
1354
|
+
readonly '\\partial': {
|
|
1355
|
+
readonly tex: "\\partial";
|
|
1356
|
+
readonly label: "∂";
|
|
1357
|
+
readonly title: "partial derivative";
|
|
1358
|
+
};
|
|
1359
|
+
readonly '\\Longleftrightarrow': {
|
|
1360
|
+
readonly tex: "\\Longleftrightarrow";
|
|
1361
|
+
readonly label: "⟺";
|
|
1362
|
+
readonly title: "long equivalence arrow";
|
|
1363
|
+
};
|
|
1364
|
+
readonly '\\backslash': {
|
|
1365
|
+
readonly tex: "\\backslash";
|
|
1366
|
+
readonly label: "∖";
|
|
1367
|
+
readonly title: "reverse solidus";
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
type StandardCommandTex = keyof typeof STANDARD_COMMANDS;
|
|
1371
|
+
type StandardCommandSpec = (typeof STANDARD_COMMANDS)[StandardCommandTex];
|
|
1372
|
+
declare function standardCommandSpec(tex: string): StandardCommandSpec | null;
|
|
1373
|
+
declare function isStandardCommandTex(tex: string): tex is StandardCommandTex;
|
|
1374
|
+
declare function sessionHasStandardCommands(session: EditorSession): boolean;
|
|
1375
|
+
|
|
1258
1376
|
type RenderOptions = {
|
|
1259
1377
|
digitForm?: DigitFormId;
|
|
1260
1378
|
};
|
|
@@ -1495,6 +1613,8 @@ declare const ATOMIC_COMMAND_CSS: string;
|
|
|
1495
1613
|
|
|
1496
1614
|
declare const ATOMIC_OPERATOR_COMMAND_CSS: string;
|
|
1497
1615
|
|
|
1616
|
+
declare const STANDARD_COMMAND_CSS: string;
|
|
1617
|
+
|
|
1498
1618
|
type BuildChain = (chain: EditorChain) => HTMLElement;
|
|
1499
1619
|
declare function buildNodeBody(node: EditorNode, buildChain: BuildChain, side: EditorSide, digitForm?: DigitFormId, uiLocale?: ButexUiLocale): HTMLElement;
|
|
1500
1620
|
|
|
@@ -1615,8 +1735,12 @@ type index_MatrixEnvStyle = MatrixEnvStyle;
|
|
|
1615
1735
|
declare const index_NON_DEFAULT_CHARACTER_FONT_SPECS: typeof NON_DEFAULT_CHARACTER_FONT_SPECS;
|
|
1616
1736
|
declare const index_OVERSET_CSS: typeof OVERSET_CSS;
|
|
1617
1737
|
declare const index_SQRT_CSS: typeof SQRT_CSS;
|
|
1738
|
+
declare const index_STANDARD_COMMANDS: typeof STANDARD_COMMANDS;
|
|
1739
|
+
declare const index_STANDARD_COMMAND_CSS: typeof STANDARD_COMMAND_CSS;
|
|
1618
1740
|
type index_SpacingCommandSpec = SpacingCommandSpec;
|
|
1619
1741
|
type index_SpacingDirection = SpacingDirection;
|
|
1742
|
+
type index_StandardCommandSpec = StandardCommandSpec;
|
|
1743
|
+
type index_StandardCommandTex = StandardCommandTex;
|
|
1620
1744
|
declare const index_UNDERSET_CSS: typeof UNDERSET_CSS;
|
|
1621
1745
|
type index_UndoRedoStacks = UndoRedoStacks;
|
|
1622
1746
|
declare const index_accentCommandIdFromTex: typeof accentCommandIdFromTex;
|
|
@@ -1693,6 +1817,7 @@ declare const index_insertSqrt: typeof insertSqrt;
|
|
|
1693
1817
|
declare const index_insertUnderset: typeof insertUnderset;
|
|
1694
1818
|
declare const index_isSelectionActive: typeof isSelectionActive;
|
|
1695
1819
|
declare const index_isSpacingCommandSpec: typeof isSpacingCommandSpec;
|
|
1820
|
+
declare const index_isStandardCommandTex: typeof isStandardCommandTex;
|
|
1696
1821
|
declare const index_mirrorBuTeXOperatorsInTex: typeof mirrorBuTeXOperatorsInTex;
|
|
1697
1822
|
declare const index_moveCaret: typeof moveCaret;
|
|
1698
1823
|
declare const index_moveCaretHorizontal: typeof moveCaretHorizontal;
|
|
@@ -1717,6 +1842,7 @@ declare const index_restoreUndo: typeof restoreUndo;
|
|
|
1717
1842
|
declare const index_runtimeStatusText: typeof runtimeStatusText;
|
|
1718
1843
|
declare const index_selectNode: typeof selectNode;
|
|
1719
1844
|
declare const index_serializeSelection: typeof serializeSelection;
|
|
1845
|
+
declare const index_sessionHasStandardCommands: typeof sessionHasStandardCommands;
|
|
1720
1846
|
declare const index_setArabicReverseNumberTyping: typeof setArabicReverseNumberTyping;
|
|
1721
1847
|
declare const index_setArrayColumnAlignment: typeof setArrayColumnAlignment;
|
|
1722
1848
|
declare const index_setCaret: typeof setCaret;
|
|
@@ -1728,6 +1854,7 @@ declare const index_setRenderError: typeof setRenderError;
|
|
|
1728
1854
|
declare const index_setSelectionFromMouse: typeof setSelectionFromMouse;
|
|
1729
1855
|
declare const index_setSplitLeafTyping: typeof setSplitLeafTyping;
|
|
1730
1856
|
declare const index_shouldMirrorOperatorDisplay: typeof shouldMirrorOperatorDisplay;
|
|
1857
|
+
declare const index_standardCommandSpec: typeof standardCommandSpec;
|
|
1731
1858
|
declare const index_switchSide: typeof switchSide;
|
|
1732
1859
|
declare const index_syncSelectionToCaret: typeof syncSelectionToCaret;
|
|
1733
1860
|
declare const index_syncStateSummary: typeof syncStateSummary;
|
|
@@ -1735,7 +1862,7 @@ declare const index_toggleTakweenCharacterFont: typeof toggleTakweenCharacterFon
|
|
|
1735
1862
|
declare const index_undoRedoCanRedo: typeof undoRedoCanRedo;
|
|
1736
1863
|
declare const index_undoRedoCanUndo: typeof undoRedoCanUndo;
|
|
1737
1864
|
declare namespace index {
|
|
1738
|
-
export { index_ACCENT_COMMANDS as ACCENT_COMMANDS, index_ACCENT_CSS as ACCENT_CSS, index_ATOMIC_COMMANDS as ATOMIC_COMMANDS, index_ATOMIC_COMMAND_CSS as ATOMIC_COMMAND_CSS, index_ATOMIC_OPERATOR_COMMANDS as ATOMIC_OPERATOR_COMMANDS, index_ATOMIC_OPERATOR_COMMAND_CSS as ATOMIC_OPERATOR_COMMAND_CSS, type index_AccentCommandId as AccentCommandId, type index_AccentCommandSpec as AccentCommandSpec, type index_AccentPlacement as AccentPlacement, type index_AtomicCommandCategory as AtomicCommandCategory, type index_AtomicCommandId as AtomicCommandId, type index_AtomicCommandSpec as AtomicCommandSpec, type index_AtomicOperatorCommandCategory as AtomicOperatorCommandCategory, type index_AtomicOperatorCommandId as AtomicOperatorCommandId, type index_AtomicOperatorCommandSpec as AtomicOperatorCommandSpec, index_BUTEX_EDITOR_CSS as BUTEX_EDITOR_CSS, index_BUTEX_FRAGMENT_MIME as BUTEX_FRAGMENT_MIME, index_CHARACTER_FONT_OPTIONS as CHARACTER_FONT_OPTIONS, index_CHARACTER_FONT_SPECS as CHARACTER_FONT_SPECS, type index_CharacterFontId as CharacterFontId, type index_CharacterFontSpec as CharacterFontSpec, index_DEFAULT_UNDO_HISTORY_MAX_DEPTH as DEFAULT_UNDO_HISTORY_MAX_DEPTH, index_DELIMITER_CSS as DELIMITER_CSS, type index_DigitFormId as DigitFormId, type index_EditorCaret as EditorCaret, type index_EditorChain as EditorChain, type index_EditorDebugEntry as EditorDebugEntry, type index_EditorFragment as EditorFragment, type index_EditorNode as EditorNode, type index_EditorNodeKind as EditorNodeKind, type index_EditorRuntimeApi as EditorRuntimeApi, type index_EditorRuntimeOptions as EditorRuntimeOptions, type index_EditorSelectionRange as EditorSelectionRange, type index_EditorSession as EditorSession, type index_EditorSide as EditorSide, type index_EditorSyncMap as EditorSyncMap, type index_EditorSyncState as EditorSyncState, type index_EnvColumnAlignment as EnvColumnAlignment, index_FRAC_CSS as FRAC_CSS, type index_GridEnvName as GridEnvName, index_MATRIX_ENV_CSS as MATRIX_ENV_CSS, type index_MatrixEnvStyle as MatrixEnvStyle, index_NON_DEFAULT_CHARACTER_FONT_SPECS as NON_DEFAULT_CHARACTER_FONT_SPECS, index_OVERSET_CSS as OVERSET_CSS, index_SQRT_CSS as SQRT_CSS, type index_SpacingCommandSpec as SpacingCommandSpec, type index_SpacingDirection as SpacingDirection, index_UNDERSET_CSS as UNDERSET_CSS, type index_UndoRedoStacks as UndoRedoStacks, index_accentCommandIdFromTex as accentCommandIdFromTex, index_accentCommandSpec as accentCommandSpec, index_accentCommandsList as accentCommandsList, index_activeSideLabel as activeSideLabel, index_activeTreeKey as activeTreeKey, index_addMatrixColumn as addMatrixColumn, index_addMatrixRow as addMatrixRow, index_addSub as addSub, index_addSup as addSup, index_atomicCommandSpec as atomicCommandSpec, index_atomicCommandsByCategory as atomicCommandsByCategory, index_atomicOperatorCommandSpec as atomicOperatorCommandSpec, index_atomicOperatorCommandsByCategory as atomicOperatorCommandsByCategory, index_breakLeafTyping as breakLeafTyping, index_buildInitialSyncMap as buildInitialSyncMap, index_buildNodeBody as buildNodeBody, index_buildNodeScripts as buildNodeScripts, index_caretStep as caretStep, index_characterFontSpec as characterFontSpec, index_characterFontSpecByMacro as characterFontSpecByMacro, index_clearSelection as clearSelection, index_cloneEditorSession as cloneEditorSession, index_collectCaretPositions as collectCaretPositions, index_copySelection as copySelection, index_coveredNodeIds as coveredNodeIds, index_createAccentNode as createAccentNode, index_createAtomicCommandNode as createAtomicCommandNode, index_createAtomicOperatorCommandNode as createAtomicOperatorCommandNode, index_createDelimiterNode as createDelimiterNode, index_createEditorChain as createEditorChain, index_createEditorNode as createEditorNode, index_createEditorRuntime as createEditorRuntime, index_createEditorSession as createEditorSession, index_createFracNode as createFracNode, index_createGridEnvNode as createGridEnvNode, index_createMatrixEnvNode as createMatrixEnvNode, index_createOversetNode as createOversetNode, index_createSqrtNode as createSqrtNode, index_createStarterSession as createStarterSession, index_createUndersetNode as createUndersetNode, index_createUndoRedoStacks as createUndoRedoStacks, index_cutSelection as cutSelection, index_deleteBackward as deleteBackward, index_deleteForward as deleteForward, index_deleteStructure as deleteStructure, index_deserializeFragment as deserializeFragment, index_extendSelectionByStep as extendSelectionByStep, index_findChainById as findChainById, index_findNodeById as findNodeById, index_formatDigits as formatDigits, index_fragmentToPlainText as fragmentToPlainText, index_horizontalCaretDelta as horizontalCaretDelta, index_injectBuTeXEditorStyles as injectBuTeXEditorStyles, index_insertAccent as insertAccent, index_insertAccentPair as insertAccentPair, index_insertAlignedEnv as insertAlignedEnv, index_insertArrayEnv as insertArrayEnv, index_insertAtomicCommand as insertAtomicCommand, index_insertAtomicOperatorCommand as insertAtomicOperatorCommand, index_insertChar as insertChar, index_insertDelimiterPair as insertDelimiterPair, index_insertDivideOperator as insertDivideOperator, index_insertFirstDerivative as insertFirstDerivative, index_insertFraction as insertFraction, index_insertLimitsSeriesTemplate as insertLimitsSeriesTemplate, index_insertMatrixEnv as insertMatrixEnv, index_insertNumber as insertNumber, index_insertOperator as insertOperator, index_insertOverset as insertOverset, index_insertSecondDerivative as insertSecondDerivative, index_insertSqrt as insertSqrt, index_insertUnderset as insertUnderset, index_isSelectionActive as isSelectionActive, index_isSpacingCommandSpec as isSpacingCommandSpec, index_mirrorBuTeXOperatorsInTex as mirrorBuTeXOperatorsInTex, index_moveCaret as moveCaret, index_moveCaretHorizontal as moveCaretHorizontal, index_moveCaretVertical as moveCaretVertical, index_nodeChildChains as nodeChildChains, index_normalizeSelection as normalizeSelection, index_passiveTreeKey as passiveTreeKey, index_pasteFragment as pasteFragment, index_pasteText as pasteText, index_pushUndoRedoSnapshot as pushUndoRedoSnapshot, index_regenerateFragmentIds as regenerateFragmentIds, index_removeMatrixColumn as removeMatrixColumn, index_removeMatrixRow as removeMatrixRow, index_removeSub as removeSub, index_removeSup as removeSup, index_renderArabicLatexFromSession as renderArabicLatexFromSession, index_renderChainArabic as renderChainArabic, index_renderChainEnglish as renderChainEnglish, index_renderEnglishLatexFromSession as renderEnglishLatexFromSession, index_restoreRedo as restoreRedo, index_restoreUndo as restoreUndo, index_runtimeStatusText as runtimeStatusText, index_selectNode as selectNode, index_serializeSelection as serializeSelection, index_setArabicReverseNumberTyping as setArabicReverseNumberTyping, index_setArrayColumnAlignment as setArrayColumnAlignment, index_setCaret as setCaret, index_setCurrentCharacterFont as setCurrentCharacterFont, index_setCurrentDigitForm as setCurrentDigitForm, index_setExpr as setExpr, index_setMatrixEnvStyle as setMatrixEnvStyle, index_setRenderError as setRenderError, index_setSelectionFromMouse as setSelectionFromMouse, index_setSplitLeafTyping as setSplitLeafTyping, index_shouldMirrorOperatorDisplay as shouldMirrorOperatorDisplay, index_switchSide as switchSide, index_syncSelectionToCaret as syncSelectionToCaret, index_syncStateSummary as syncStateSummary, index_toggleTakweenCharacterFont as toggleTakweenCharacterFont, index_undoRedoCanRedo as undoRedoCanRedo, index_undoRedoCanUndo as undoRedoCanUndo };
|
|
1865
|
+
export { index_ACCENT_COMMANDS as ACCENT_COMMANDS, index_ACCENT_CSS as ACCENT_CSS, index_ATOMIC_COMMANDS as ATOMIC_COMMANDS, index_ATOMIC_COMMAND_CSS as ATOMIC_COMMAND_CSS, index_ATOMIC_OPERATOR_COMMANDS as ATOMIC_OPERATOR_COMMANDS, index_ATOMIC_OPERATOR_COMMAND_CSS as ATOMIC_OPERATOR_COMMAND_CSS, type index_AccentCommandId as AccentCommandId, type index_AccentCommandSpec as AccentCommandSpec, type index_AccentPlacement as AccentPlacement, type index_AtomicCommandCategory as AtomicCommandCategory, type index_AtomicCommandId as AtomicCommandId, type index_AtomicCommandSpec as AtomicCommandSpec, type index_AtomicOperatorCommandCategory as AtomicOperatorCommandCategory, type index_AtomicOperatorCommandId as AtomicOperatorCommandId, type index_AtomicOperatorCommandSpec as AtomicOperatorCommandSpec, index_BUTEX_EDITOR_CSS as BUTEX_EDITOR_CSS, index_BUTEX_FRAGMENT_MIME as BUTEX_FRAGMENT_MIME, index_CHARACTER_FONT_OPTIONS as CHARACTER_FONT_OPTIONS, index_CHARACTER_FONT_SPECS as CHARACTER_FONT_SPECS, type index_CharacterFontId as CharacterFontId, type index_CharacterFontSpec as CharacterFontSpec, index_DEFAULT_UNDO_HISTORY_MAX_DEPTH as DEFAULT_UNDO_HISTORY_MAX_DEPTH, index_DELIMITER_CSS as DELIMITER_CSS, type index_DigitFormId as DigitFormId, type index_EditorCaret as EditorCaret, type index_EditorChain as EditorChain, type index_EditorDebugEntry as EditorDebugEntry, type index_EditorFragment as EditorFragment, type index_EditorNode as EditorNode, type index_EditorNodeKind as EditorNodeKind, type index_EditorRuntimeApi as EditorRuntimeApi, type index_EditorRuntimeOptions as EditorRuntimeOptions, type index_EditorSelectionRange as EditorSelectionRange, type index_EditorSession as EditorSession, type index_EditorSide as EditorSide, type index_EditorSyncMap as EditorSyncMap, type index_EditorSyncState as EditorSyncState, type index_EnvColumnAlignment as EnvColumnAlignment, index_FRAC_CSS as FRAC_CSS, type index_GridEnvName as GridEnvName, index_MATRIX_ENV_CSS as MATRIX_ENV_CSS, type index_MatrixEnvStyle as MatrixEnvStyle, index_NON_DEFAULT_CHARACTER_FONT_SPECS as NON_DEFAULT_CHARACTER_FONT_SPECS, index_OVERSET_CSS as OVERSET_CSS, index_SQRT_CSS as SQRT_CSS, index_STANDARD_COMMANDS as STANDARD_COMMANDS, index_STANDARD_COMMAND_CSS as STANDARD_COMMAND_CSS, type index_SpacingCommandSpec as SpacingCommandSpec, type index_SpacingDirection as SpacingDirection, type index_StandardCommandSpec as StandardCommandSpec, type index_StandardCommandTex as StandardCommandTex, index_UNDERSET_CSS as UNDERSET_CSS, type index_UndoRedoStacks as UndoRedoStacks, index_accentCommandIdFromTex as accentCommandIdFromTex, index_accentCommandSpec as accentCommandSpec, index_accentCommandsList as accentCommandsList, index_activeSideLabel as activeSideLabel, index_activeTreeKey as activeTreeKey, index_addMatrixColumn as addMatrixColumn, index_addMatrixRow as addMatrixRow, index_addSub as addSub, index_addSup as addSup, index_atomicCommandSpec as atomicCommandSpec, index_atomicCommandsByCategory as atomicCommandsByCategory, index_atomicOperatorCommandSpec as atomicOperatorCommandSpec, index_atomicOperatorCommandsByCategory as atomicOperatorCommandsByCategory, index_breakLeafTyping as breakLeafTyping, index_buildInitialSyncMap as buildInitialSyncMap, index_buildNodeBody as buildNodeBody, index_buildNodeScripts as buildNodeScripts, index_caretStep as caretStep, index_characterFontSpec as characterFontSpec, index_characterFontSpecByMacro as characterFontSpecByMacro, index_clearSelection as clearSelection, index_cloneEditorSession as cloneEditorSession, index_collectCaretPositions as collectCaretPositions, index_copySelection as copySelection, index_coveredNodeIds as coveredNodeIds, index_createAccentNode as createAccentNode, index_createAtomicCommandNode as createAtomicCommandNode, index_createAtomicOperatorCommandNode as createAtomicOperatorCommandNode, index_createDelimiterNode as createDelimiterNode, index_createEditorChain as createEditorChain, index_createEditorNode as createEditorNode, index_createEditorRuntime as createEditorRuntime, index_createEditorSession as createEditorSession, index_createFracNode as createFracNode, index_createGridEnvNode as createGridEnvNode, index_createMatrixEnvNode as createMatrixEnvNode, index_createOversetNode as createOversetNode, index_createSqrtNode as createSqrtNode, index_createStarterSession as createStarterSession, index_createUndersetNode as createUndersetNode, index_createUndoRedoStacks as createUndoRedoStacks, index_cutSelection as cutSelection, index_deleteBackward as deleteBackward, index_deleteForward as deleteForward, index_deleteStructure as deleteStructure, index_deserializeFragment as deserializeFragment, index_extendSelectionByStep as extendSelectionByStep, index_findChainById as findChainById, index_findNodeById as findNodeById, index_formatDigits as formatDigits, index_fragmentToPlainText as fragmentToPlainText, index_horizontalCaretDelta as horizontalCaretDelta, index_injectBuTeXEditorStyles as injectBuTeXEditorStyles, index_insertAccent as insertAccent, index_insertAccentPair as insertAccentPair, index_insertAlignedEnv as insertAlignedEnv, index_insertArrayEnv as insertArrayEnv, index_insertAtomicCommand as insertAtomicCommand, index_insertAtomicOperatorCommand as insertAtomicOperatorCommand, index_insertChar as insertChar, index_insertDelimiterPair as insertDelimiterPair, index_insertDivideOperator as insertDivideOperator, index_insertFirstDerivative as insertFirstDerivative, index_insertFraction as insertFraction, index_insertLimitsSeriesTemplate as insertLimitsSeriesTemplate, index_insertMatrixEnv as insertMatrixEnv, index_insertNumber as insertNumber, index_insertOperator as insertOperator, index_insertOverset as insertOverset, index_insertSecondDerivative as insertSecondDerivative, index_insertSqrt as insertSqrt, index_insertUnderset as insertUnderset, index_isSelectionActive as isSelectionActive, index_isSpacingCommandSpec as isSpacingCommandSpec, index_isStandardCommandTex as isStandardCommandTex, index_mirrorBuTeXOperatorsInTex as mirrorBuTeXOperatorsInTex, index_moveCaret as moveCaret, index_moveCaretHorizontal as moveCaretHorizontal, index_moveCaretVertical as moveCaretVertical, index_nodeChildChains as nodeChildChains, index_normalizeSelection as normalizeSelection, index_passiveTreeKey as passiveTreeKey, index_pasteFragment as pasteFragment, index_pasteText as pasteText, index_pushUndoRedoSnapshot as pushUndoRedoSnapshot, index_regenerateFragmentIds as regenerateFragmentIds, index_removeMatrixColumn as removeMatrixColumn, index_removeMatrixRow as removeMatrixRow, index_removeSub as removeSub, index_removeSup as removeSup, index_renderArabicLatexFromSession as renderArabicLatexFromSession, index_renderChainArabic as renderChainArabic, index_renderChainEnglish as renderChainEnglish, index_renderEnglishLatexFromSession as renderEnglishLatexFromSession, index_restoreRedo as restoreRedo, index_restoreUndo as restoreUndo, index_runtimeStatusText as runtimeStatusText, index_selectNode as selectNode, index_serializeSelection as serializeSelection, index_sessionHasStandardCommands as sessionHasStandardCommands, index_setArabicReverseNumberTyping as setArabicReverseNumberTyping, index_setArrayColumnAlignment as setArrayColumnAlignment, index_setCaret as setCaret, index_setCurrentCharacterFont as setCurrentCharacterFont, index_setCurrentDigitForm as setCurrentDigitForm, index_setExpr as setExpr, index_setMatrixEnvStyle as setMatrixEnvStyle, index_setRenderError as setRenderError, index_setSelectionFromMouse as setSelectionFromMouse, index_setSplitLeafTyping as setSplitLeafTyping, index_shouldMirrorOperatorDisplay as shouldMirrorOperatorDisplay, index_standardCommandSpec as standardCommandSpec, index_switchSide as switchSide, index_syncSelectionToCaret as syncSelectionToCaret, index_syncStateSummary as syncStateSummary, index_toggleTakweenCharacterFont as toggleTakweenCharacterFont, index_undoRedoCanRedo as undoRedoCanRedo, index_undoRedoCanUndo as undoRedoCanUndo };
|
|
1739
1866
|
}
|
|
1740
1867
|
|
|
1741
1868
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ declare const BUTEX_EDITOR_CSS: string;
|
|
|
99
99
|
declare function injectBuTeXEditorStyles(doc?: Document): void;
|
|
100
100
|
|
|
101
101
|
type EditorSide = 'english' | 'arabic';
|
|
102
|
-
type EditorNodeKind = 'char' | 'number' | 'operator' | 'delimiter' | 'frac' | 'sqrt' | 'overset' | 'underset' | 'accent' | 'env' | 'atomicCommand' | 'atomicOperatorCommand';
|
|
102
|
+
type EditorNodeKind = 'char' | 'number' | 'operator' | 'delimiter' | 'frac' | 'sqrt' | 'overset' | 'underset' | 'accent' | 'env' | 'atomicCommand' | 'atomicOperatorCommand' | 'standardCommand';
|
|
103
103
|
type MatrixEnvStyle = 'matrix' | 'pmatrix' | 'bmatrix' | 'Bmatrix' | 'vmatrix' | 'Vmatrix';
|
|
104
104
|
type GridEnvName = MatrixEnvStyle | 'array' | 'aligned';
|
|
105
105
|
type EnvColumnAlignment = 'l' | 'c' | 'r';
|
|
@@ -1255,6 +1255,124 @@ declare function cloneEditorSession(session: EditorSession): EditorSession;
|
|
|
1255
1255
|
declare function buildInitialSyncMap(englishTree: EditorChain, arabicTree: EditorChain): EditorSession['sync'];
|
|
1256
1256
|
declare function createEditorSession(englishTree: EditorChain, arabicTree: EditorChain, activeSide?: EditorSide): EditorSession;
|
|
1257
1257
|
|
|
1258
|
+
declare const STANDARD_COMMANDS: {
|
|
1259
|
+
readonly '\\alpha': {
|
|
1260
|
+
readonly tex: "\\alpha";
|
|
1261
|
+
readonly label: "α";
|
|
1262
|
+
readonly title: "alpha";
|
|
1263
|
+
};
|
|
1264
|
+
readonly '\\beta': {
|
|
1265
|
+
readonly tex: "\\beta";
|
|
1266
|
+
readonly label: "β";
|
|
1267
|
+
readonly title: "beta";
|
|
1268
|
+
};
|
|
1269
|
+
readonly '\\gamma': {
|
|
1270
|
+
readonly tex: "\\gamma";
|
|
1271
|
+
readonly label: "γ";
|
|
1272
|
+
readonly title: "gamma";
|
|
1273
|
+
};
|
|
1274
|
+
readonly '\\delta': {
|
|
1275
|
+
readonly tex: "\\delta";
|
|
1276
|
+
readonly label: "δ";
|
|
1277
|
+
readonly title: "delta";
|
|
1278
|
+
};
|
|
1279
|
+
readonly '\\epsilon': {
|
|
1280
|
+
readonly tex: "\\epsilon";
|
|
1281
|
+
readonly label: "ε";
|
|
1282
|
+
readonly title: "epsilon";
|
|
1283
|
+
};
|
|
1284
|
+
readonly '\\eta': {
|
|
1285
|
+
readonly tex: "\\eta";
|
|
1286
|
+
readonly label: "η";
|
|
1287
|
+
readonly title: "eta";
|
|
1288
|
+
};
|
|
1289
|
+
readonly '\\theta': {
|
|
1290
|
+
readonly tex: "\\theta";
|
|
1291
|
+
readonly label: "θ";
|
|
1292
|
+
readonly title: "theta";
|
|
1293
|
+
};
|
|
1294
|
+
readonly '\\lambda': {
|
|
1295
|
+
readonly tex: "\\lambda";
|
|
1296
|
+
readonly label: "λ";
|
|
1297
|
+
readonly title: "lambda";
|
|
1298
|
+
};
|
|
1299
|
+
readonly '\\mu': {
|
|
1300
|
+
readonly tex: "\\mu";
|
|
1301
|
+
readonly label: "μ";
|
|
1302
|
+
readonly title: "mu";
|
|
1303
|
+
};
|
|
1304
|
+
readonly '\\rho': {
|
|
1305
|
+
readonly tex: "\\rho";
|
|
1306
|
+
readonly label: "ρ";
|
|
1307
|
+
readonly title: "rho";
|
|
1308
|
+
};
|
|
1309
|
+
readonly '\\sigma': {
|
|
1310
|
+
readonly tex: "\\sigma";
|
|
1311
|
+
readonly label: "σ";
|
|
1312
|
+
readonly title: "sigma";
|
|
1313
|
+
};
|
|
1314
|
+
readonly '\\tau': {
|
|
1315
|
+
readonly tex: "\\tau";
|
|
1316
|
+
readonly label: "τ";
|
|
1317
|
+
readonly title: "tau";
|
|
1318
|
+
};
|
|
1319
|
+
readonly '\\phi': {
|
|
1320
|
+
readonly tex: "\\phi";
|
|
1321
|
+
readonly label: "φ";
|
|
1322
|
+
readonly title: "phi";
|
|
1323
|
+
};
|
|
1324
|
+
readonly '\\chi': {
|
|
1325
|
+
readonly tex: "\\chi";
|
|
1326
|
+
readonly label: "χ";
|
|
1327
|
+
readonly title: "chi";
|
|
1328
|
+
};
|
|
1329
|
+
readonly '\\psi': {
|
|
1330
|
+
readonly tex: "\\psi";
|
|
1331
|
+
readonly label: "ψ";
|
|
1332
|
+
readonly title: "psi";
|
|
1333
|
+
};
|
|
1334
|
+
readonly '\\omega': {
|
|
1335
|
+
readonly tex: "\\omega";
|
|
1336
|
+
readonly label: "ω";
|
|
1337
|
+
readonly title: "omega";
|
|
1338
|
+
};
|
|
1339
|
+
readonly '\\zeta': {
|
|
1340
|
+
readonly tex: "\\zeta";
|
|
1341
|
+
readonly label: "ζ";
|
|
1342
|
+
readonly title: "zeta";
|
|
1343
|
+
};
|
|
1344
|
+
readonly '\\nabla': {
|
|
1345
|
+
readonly tex: "\\nabla";
|
|
1346
|
+
readonly label: "∇";
|
|
1347
|
+
readonly title: "nabla";
|
|
1348
|
+
};
|
|
1349
|
+
readonly '\\Delta': {
|
|
1350
|
+
readonly tex: "\\Delta";
|
|
1351
|
+
readonly label: "Δ";
|
|
1352
|
+
readonly title: "Delta";
|
|
1353
|
+
};
|
|
1354
|
+
readonly '\\partial': {
|
|
1355
|
+
readonly tex: "\\partial";
|
|
1356
|
+
readonly label: "∂";
|
|
1357
|
+
readonly title: "partial derivative";
|
|
1358
|
+
};
|
|
1359
|
+
readonly '\\Longleftrightarrow': {
|
|
1360
|
+
readonly tex: "\\Longleftrightarrow";
|
|
1361
|
+
readonly label: "⟺";
|
|
1362
|
+
readonly title: "long equivalence arrow";
|
|
1363
|
+
};
|
|
1364
|
+
readonly '\\backslash': {
|
|
1365
|
+
readonly tex: "\\backslash";
|
|
1366
|
+
readonly label: "∖";
|
|
1367
|
+
readonly title: "reverse solidus";
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
type StandardCommandTex = keyof typeof STANDARD_COMMANDS;
|
|
1371
|
+
type StandardCommandSpec = (typeof STANDARD_COMMANDS)[StandardCommandTex];
|
|
1372
|
+
declare function standardCommandSpec(tex: string): StandardCommandSpec | null;
|
|
1373
|
+
declare function isStandardCommandTex(tex: string): tex is StandardCommandTex;
|
|
1374
|
+
declare function sessionHasStandardCommands(session: EditorSession): boolean;
|
|
1375
|
+
|
|
1258
1376
|
type RenderOptions = {
|
|
1259
1377
|
digitForm?: DigitFormId;
|
|
1260
1378
|
};
|
|
@@ -1495,6 +1613,8 @@ declare const ATOMIC_COMMAND_CSS: string;
|
|
|
1495
1613
|
|
|
1496
1614
|
declare const ATOMIC_OPERATOR_COMMAND_CSS: string;
|
|
1497
1615
|
|
|
1616
|
+
declare const STANDARD_COMMAND_CSS: string;
|
|
1617
|
+
|
|
1498
1618
|
type BuildChain = (chain: EditorChain) => HTMLElement;
|
|
1499
1619
|
declare function buildNodeBody(node: EditorNode, buildChain: BuildChain, side: EditorSide, digitForm?: DigitFormId, uiLocale?: ButexUiLocale): HTMLElement;
|
|
1500
1620
|
|
|
@@ -1615,8 +1735,12 @@ type index_MatrixEnvStyle = MatrixEnvStyle;
|
|
|
1615
1735
|
declare const index_NON_DEFAULT_CHARACTER_FONT_SPECS: typeof NON_DEFAULT_CHARACTER_FONT_SPECS;
|
|
1616
1736
|
declare const index_OVERSET_CSS: typeof OVERSET_CSS;
|
|
1617
1737
|
declare const index_SQRT_CSS: typeof SQRT_CSS;
|
|
1738
|
+
declare const index_STANDARD_COMMANDS: typeof STANDARD_COMMANDS;
|
|
1739
|
+
declare const index_STANDARD_COMMAND_CSS: typeof STANDARD_COMMAND_CSS;
|
|
1618
1740
|
type index_SpacingCommandSpec = SpacingCommandSpec;
|
|
1619
1741
|
type index_SpacingDirection = SpacingDirection;
|
|
1742
|
+
type index_StandardCommandSpec = StandardCommandSpec;
|
|
1743
|
+
type index_StandardCommandTex = StandardCommandTex;
|
|
1620
1744
|
declare const index_UNDERSET_CSS: typeof UNDERSET_CSS;
|
|
1621
1745
|
type index_UndoRedoStacks = UndoRedoStacks;
|
|
1622
1746
|
declare const index_accentCommandIdFromTex: typeof accentCommandIdFromTex;
|
|
@@ -1693,6 +1817,7 @@ declare const index_insertSqrt: typeof insertSqrt;
|
|
|
1693
1817
|
declare const index_insertUnderset: typeof insertUnderset;
|
|
1694
1818
|
declare const index_isSelectionActive: typeof isSelectionActive;
|
|
1695
1819
|
declare const index_isSpacingCommandSpec: typeof isSpacingCommandSpec;
|
|
1820
|
+
declare const index_isStandardCommandTex: typeof isStandardCommandTex;
|
|
1696
1821
|
declare const index_mirrorBuTeXOperatorsInTex: typeof mirrorBuTeXOperatorsInTex;
|
|
1697
1822
|
declare const index_moveCaret: typeof moveCaret;
|
|
1698
1823
|
declare const index_moveCaretHorizontal: typeof moveCaretHorizontal;
|
|
@@ -1717,6 +1842,7 @@ declare const index_restoreUndo: typeof restoreUndo;
|
|
|
1717
1842
|
declare const index_runtimeStatusText: typeof runtimeStatusText;
|
|
1718
1843
|
declare const index_selectNode: typeof selectNode;
|
|
1719
1844
|
declare const index_serializeSelection: typeof serializeSelection;
|
|
1845
|
+
declare const index_sessionHasStandardCommands: typeof sessionHasStandardCommands;
|
|
1720
1846
|
declare const index_setArabicReverseNumberTyping: typeof setArabicReverseNumberTyping;
|
|
1721
1847
|
declare const index_setArrayColumnAlignment: typeof setArrayColumnAlignment;
|
|
1722
1848
|
declare const index_setCaret: typeof setCaret;
|
|
@@ -1728,6 +1854,7 @@ declare const index_setRenderError: typeof setRenderError;
|
|
|
1728
1854
|
declare const index_setSelectionFromMouse: typeof setSelectionFromMouse;
|
|
1729
1855
|
declare const index_setSplitLeafTyping: typeof setSplitLeafTyping;
|
|
1730
1856
|
declare const index_shouldMirrorOperatorDisplay: typeof shouldMirrorOperatorDisplay;
|
|
1857
|
+
declare const index_standardCommandSpec: typeof standardCommandSpec;
|
|
1731
1858
|
declare const index_switchSide: typeof switchSide;
|
|
1732
1859
|
declare const index_syncSelectionToCaret: typeof syncSelectionToCaret;
|
|
1733
1860
|
declare const index_syncStateSummary: typeof syncStateSummary;
|
|
@@ -1735,7 +1862,7 @@ declare const index_toggleTakweenCharacterFont: typeof toggleTakweenCharacterFon
|
|
|
1735
1862
|
declare const index_undoRedoCanRedo: typeof undoRedoCanRedo;
|
|
1736
1863
|
declare const index_undoRedoCanUndo: typeof undoRedoCanUndo;
|
|
1737
1864
|
declare namespace index {
|
|
1738
|
-
export { index_ACCENT_COMMANDS as ACCENT_COMMANDS, index_ACCENT_CSS as ACCENT_CSS, index_ATOMIC_COMMANDS as ATOMIC_COMMANDS, index_ATOMIC_COMMAND_CSS as ATOMIC_COMMAND_CSS, index_ATOMIC_OPERATOR_COMMANDS as ATOMIC_OPERATOR_COMMANDS, index_ATOMIC_OPERATOR_COMMAND_CSS as ATOMIC_OPERATOR_COMMAND_CSS, type index_AccentCommandId as AccentCommandId, type index_AccentCommandSpec as AccentCommandSpec, type index_AccentPlacement as AccentPlacement, type index_AtomicCommandCategory as AtomicCommandCategory, type index_AtomicCommandId as AtomicCommandId, type index_AtomicCommandSpec as AtomicCommandSpec, type index_AtomicOperatorCommandCategory as AtomicOperatorCommandCategory, type index_AtomicOperatorCommandId as AtomicOperatorCommandId, type index_AtomicOperatorCommandSpec as AtomicOperatorCommandSpec, index_BUTEX_EDITOR_CSS as BUTEX_EDITOR_CSS, index_BUTEX_FRAGMENT_MIME as BUTEX_FRAGMENT_MIME, index_CHARACTER_FONT_OPTIONS as CHARACTER_FONT_OPTIONS, index_CHARACTER_FONT_SPECS as CHARACTER_FONT_SPECS, type index_CharacterFontId as CharacterFontId, type index_CharacterFontSpec as CharacterFontSpec, index_DEFAULT_UNDO_HISTORY_MAX_DEPTH as DEFAULT_UNDO_HISTORY_MAX_DEPTH, index_DELIMITER_CSS as DELIMITER_CSS, type index_DigitFormId as DigitFormId, type index_EditorCaret as EditorCaret, type index_EditorChain as EditorChain, type index_EditorDebugEntry as EditorDebugEntry, type index_EditorFragment as EditorFragment, type index_EditorNode as EditorNode, type index_EditorNodeKind as EditorNodeKind, type index_EditorRuntimeApi as EditorRuntimeApi, type index_EditorRuntimeOptions as EditorRuntimeOptions, type index_EditorSelectionRange as EditorSelectionRange, type index_EditorSession as EditorSession, type index_EditorSide as EditorSide, type index_EditorSyncMap as EditorSyncMap, type index_EditorSyncState as EditorSyncState, type index_EnvColumnAlignment as EnvColumnAlignment, index_FRAC_CSS as FRAC_CSS, type index_GridEnvName as GridEnvName, index_MATRIX_ENV_CSS as MATRIX_ENV_CSS, type index_MatrixEnvStyle as MatrixEnvStyle, index_NON_DEFAULT_CHARACTER_FONT_SPECS as NON_DEFAULT_CHARACTER_FONT_SPECS, index_OVERSET_CSS as OVERSET_CSS, index_SQRT_CSS as SQRT_CSS, type index_SpacingCommandSpec as SpacingCommandSpec, type index_SpacingDirection as SpacingDirection, index_UNDERSET_CSS as UNDERSET_CSS, type index_UndoRedoStacks as UndoRedoStacks, index_accentCommandIdFromTex as accentCommandIdFromTex, index_accentCommandSpec as accentCommandSpec, index_accentCommandsList as accentCommandsList, index_activeSideLabel as activeSideLabel, index_activeTreeKey as activeTreeKey, index_addMatrixColumn as addMatrixColumn, index_addMatrixRow as addMatrixRow, index_addSub as addSub, index_addSup as addSup, index_atomicCommandSpec as atomicCommandSpec, index_atomicCommandsByCategory as atomicCommandsByCategory, index_atomicOperatorCommandSpec as atomicOperatorCommandSpec, index_atomicOperatorCommandsByCategory as atomicOperatorCommandsByCategory, index_breakLeafTyping as breakLeafTyping, index_buildInitialSyncMap as buildInitialSyncMap, index_buildNodeBody as buildNodeBody, index_buildNodeScripts as buildNodeScripts, index_caretStep as caretStep, index_characterFontSpec as characterFontSpec, index_characterFontSpecByMacro as characterFontSpecByMacro, index_clearSelection as clearSelection, index_cloneEditorSession as cloneEditorSession, index_collectCaretPositions as collectCaretPositions, index_copySelection as copySelection, index_coveredNodeIds as coveredNodeIds, index_createAccentNode as createAccentNode, index_createAtomicCommandNode as createAtomicCommandNode, index_createAtomicOperatorCommandNode as createAtomicOperatorCommandNode, index_createDelimiterNode as createDelimiterNode, index_createEditorChain as createEditorChain, index_createEditorNode as createEditorNode, index_createEditorRuntime as createEditorRuntime, index_createEditorSession as createEditorSession, index_createFracNode as createFracNode, index_createGridEnvNode as createGridEnvNode, index_createMatrixEnvNode as createMatrixEnvNode, index_createOversetNode as createOversetNode, index_createSqrtNode as createSqrtNode, index_createStarterSession as createStarterSession, index_createUndersetNode as createUndersetNode, index_createUndoRedoStacks as createUndoRedoStacks, index_cutSelection as cutSelection, index_deleteBackward as deleteBackward, index_deleteForward as deleteForward, index_deleteStructure as deleteStructure, index_deserializeFragment as deserializeFragment, index_extendSelectionByStep as extendSelectionByStep, index_findChainById as findChainById, index_findNodeById as findNodeById, index_formatDigits as formatDigits, index_fragmentToPlainText as fragmentToPlainText, index_horizontalCaretDelta as horizontalCaretDelta, index_injectBuTeXEditorStyles as injectBuTeXEditorStyles, index_insertAccent as insertAccent, index_insertAccentPair as insertAccentPair, index_insertAlignedEnv as insertAlignedEnv, index_insertArrayEnv as insertArrayEnv, index_insertAtomicCommand as insertAtomicCommand, index_insertAtomicOperatorCommand as insertAtomicOperatorCommand, index_insertChar as insertChar, index_insertDelimiterPair as insertDelimiterPair, index_insertDivideOperator as insertDivideOperator, index_insertFirstDerivative as insertFirstDerivative, index_insertFraction as insertFraction, index_insertLimitsSeriesTemplate as insertLimitsSeriesTemplate, index_insertMatrixEnv as insertMatrixEnv, index_insertNumber as insertNumber, index_insertOperator as insertOperator, index_insertOverset as insertOverset, index_insertSecondDerivative as insertSecondDerivative, index_insertSqrt as insertSqrt, index_insertUnderset as insertUnderset, index_isSelectionActive as isSelectionActive, index_isSpacingCommandSpec as isSpacingCommandSpec, index_mirrorBuTeXOperatorsInTex as mirrorBuTeXOperatorsInTex, index_moveCaret as moveCaret, index_moveCaretHorizontal as moveCaretHorizontal, index_moveCaretVertical as moveCaretVertical, index_nodeChildChains as nodeChildChains, index_normalizeSelection as normalizeSelection, index_passiveTreeKey as passiveTreeKey, index_pasteFragment as pasteFragment, index_pasteText as pasteText, index_pushUndoRedoSnapshot as pushUndoRedoSnapshot, index_regenerateFragmentIds as regenerateFragmentIds, index_removeMatrixColumn as removeMatrixColumn, index_removeMatrixRow as removeMatrixRow, index_removeSub as removeSub, index_removeSup as removeSup, index_renderArabicLatexFromSession as renderArabicLatexFromSession, index_renderChainArabic as renderChainArabic, index_renderChainEnglish as renderChainEnglish, index_renderEnglishLatexFromSession as renderEnglishLatexFromSession, index_restoreRedo as restoreRedo, index_restoreUndo as restoreUndo, index_runtimeStatusText as runtimeStatusText, index_selectNode as selectNode, index_serializeSelection as serializeSelection, index_setArabicReverseNumberTyping as setArabicReverseNumberTyping, index_setArrayColumnAlignment as setArrayColumnAlignment, index_setCaret as setCaret, index_setCurrentCharacterFont as setCurrentCharacterFont, index_setCurrentDigitForm as setCurrentDigitForm, index_setExpr as setExpr, index_setMatrixEnvStyle as setMatrixEnvStyle, index_setRenderError as setRenderError, index_setSelectionFromMouse as setSelectionFromMouse, index_setSplitLeafTyping as setSplitLeafTyping, index_shouldMirrorOperatorDisplay as shouldMirrorOperatorDisplay, index_switchSide as switchSide, index_syncSelectionToCaret as syncSelectionToCaret, index_syncStateSummary as syncStateSummary, index_toggleTakweenCharacterFont as toggleTakweenCharacterFont, index_undoRedoCanRedo as undoRedoCanRedo, index_undoRedoCanUndo as undoRedoCanUndo };
|
|
1865
|
+
export { index_ACCENT_COMMANDS as ACCENT_COMMANDS, index_ACCENT_CSS as ACCENT_CSS, index_ATOMIC_COMMANDS as ATOMIC_COMMANDS, index_ATOMIC_COMMAND_CSS as ATOMIC_COMMAND_CSS, index_ATOMIC_OPERATOR_COMMANDS as ATOMIC_OPERATOR_COMMANDS, index_ATOMIC_OPERATOR_COMMAND_CSS as ATOMIC_OPERATOR_COMMAND_CSS, type index_AccentCommandId as AccentCommandId, type index_AccentCommandSpec as AccentCommandSpec, type index_AccentPlacement as AccentPlacement, type index_AtomicCommandCategory as AtomicCommandCategory, type index_AtomicCommandId as AtomicCommandId, type index_AtomicCommandSpec as AtomicCommandSpec, type index_AtomicOperatorCommandCategory as AtomicOperatorCommandCategory, type index_AtomicOperatorCommandId as AtomicOperatorCommandId, type index_AtomicOperatorCommandSpec as AtomicOperatorCommandSpec, index_BUTEX_EDITOR_CSS as BUTEX_EDITOR_CSS, index_BUTEX_FRAGMENT_MIME as BUTEX_FRAGMENT_MIME, index_CHARACTER_FONT_OPTIONS as CHARACTER_FONT_OPTIONS, index_CHARACTER_FONT_SPECS as CHARACTER_FONT_SPECS, type index_CharacterFontId as CharacterFontId, type index_CharacterFontSpec as CharacterFontSpec, index_DEFAULT_UNDO_HISTORY_MAX_DEPTH as DEFAULT_UNDO_HISTORY_MAX_DEPTH, index_DELIMITER_CSS as DELIMITER_CSS, type index_DigitFormId as DigitFormId, type index_EditorCaret as EditorCaret, type index_EditorChain as EditorChain, type index_EditorDebugEntry as EditorDebugEntry, type index_EditorFragment as EditorFragment, type index_EditorNode as EditorNode, type index_EditorNodeKind as EditorNodeKind, type index_EditorRuntimeApi as EditorRuntimeApi, type index_EditorRuntimeOptions as EditorRuntimeOptions, type index_EditorSelectionRange as EditorSelectionRange, type index_EditorSession as EditorSession, type index_EditorSide as EditorSide, type index_EditorSyncMap as EditorSyncMap, type index_EditorSyncState as EditorSyncState, type index_EnvColumnAlignment as EnvColumnAlignment, index_FRAC_CSS as FRAC_CSS, type index_GridEnvName as GridEnvName, index_MATRIX_ENV_CSS as MATRIX_ENV_CSS, type index_MatrixEnvStyle as MatrixEnvStyle, index_NON_DEFAULT_CHARACTER_FONT_SPECS as NON_DEFAULT_CHARACTER_FONT_SPECS, index_OVERSET_CSS as OVERSET_CSS, index_SQRT_CSS as SQRT_CSS, index_STANDARD_COMMANDS as STANDARD_COMMANDS, index_STANDARD_COMMAND_CSS as STANDARD_COMMAND_CSS, type index_SpacingCommandSpec as SpacingCommandSpec, type index_SpacingDirection as SpacingDirection, type index_StandardCommandSpec as StandardCommandSpec, type index_StandardCommandTex as StandardCommandTex, index_UNDERSET_CSS as UNDERSET_CSS, type index_UndoRedoStacks as UndoRedoStacks, index_accentCommandIdFromTex as accentCommandIdFromTex, index_accentCommandSpec as accentCommandSpec, index_accentCommandsList as accentCommandsList, index_activeSideLabel as activeSideLabel, index_activeTreeKey as activeTreeKey, index_addMatrixColumn as addMatrixColumn, index_addMatrixRow as addMatrixRow, index_addSub as addSub, index_addSup as addSup, index_atomicCommandSpec as atomicCommandSpec, index_atomicCommandsByCategory as atomicCommandsByCategory, index_atomicOperatorCommandSpec as atomicOperatorCommandSpec, index_atomicOperatorCommandsByCategory as atomicOperatorCommandsByCategory, index_breakLeafTyping as breakLeafTyping, index_buildInitialSyncMap as buildInitialSyncMap, index_buildNodeBody as buildNodeBody, index_buildNodeScripts as buildNodeScripts, index_caretStep as caretStep, index_characterFontSpec as characterFontSpec, index_characterFontSpecByMacro as characterFontSpecByMacro, index_clearSelection as clearSelection, index_cloneEditorSession as cloneEditorSession, index_collectCaretPositions as collectCaretPositions, index_copySelection as copySelection, index_coveredNodeIds as coveredNodeIds, index_createAccentNode as createAccentNode, index_createAtomicCommandNode as createAtomicCommandNode, index_createAtomicOperatorCommandNode as createAtomicOperatorCommandNode, index_createDelimiterNode as createDelimiterNode, index_createEditorChain as createEditorChain, index_createEditorNode as createEditorNode, index_createEditorRuntime as createEditorRuntime, index_createEditorSession as createEditorSession, index_createFracNode as createFracNode, index_createGridEnvNode as createGridEnvNode, index_createMatrixEnvNode as createMatrixEnvNode, index_createOversetNode as createOversetNode, index_createSqrtNode as createSqrtNode, index_createStarterSession as createStarterSession, index_createUndersetNode as createUndersetNode, index_createUndoRedoStacks as createUndoRedoStacks, index_cutSelection as cutSelection, index_deleteBackward as deleteBackward, index_deleteForward as deleteForward, index_deleteStructure as deleteStructure, index_deserializeFragment as deserializeFragment, index_extendSelectionByStep as extendSelectionByStep, index_findChainById as findChainById, index_findNodeById as findNodeById, index_formatDigits as formatDigits, index_fragmentToPlainText as fragmentToPlainText, index_horizontalCaretDelta as horizontalCaretDelta, index_injectBuTeXEditorStyles as injectBuTeXEditorStyles, index_insertAccent as insertAccent, index_insertAccentPair as insertAccentPair, index_insertAlignedEnv as insertAlignedEnv, index_insertArrayEnv as insertArrayEnv, index_insertAtomicCommand as insertAtomicCommand, index_insertAtomicOperatorCommand as insertAtomicOperatorCommand, index_insertChar as insertChar, index_insertDelimiterPair as insertDelimiterPair, index_insertDivideOperator as insertDivideOperator, index_insertFirstDerivative as insertFirstDerivative, index_insertFraction as insertFraction, index_insertLimitsSeriesTemplate as insertLimitsSeriesTemplate, index_insertMatrixEnv as insertMatrixEnv, index_insertNumber as insertNumber, index_insertOperator as insertOperator, index_insertOverset as insertOverset, index_insertSecondDerivative as insertSecondDerivative, index_insertSqrt as insertSqrt, index_insertUnderset as insertUnderset, index_isSelectionActive as isSelectionActive, index_isSpacingCommandSpec as isSpacingCommandSpec, index_isStandardCommandTex as isStandardCommandTex, index_mirrorBuTeXOperatorsInTex as mirrorBuTeXOperatorsInTex, index_moveCaret as moveCaret, index_moveCaretHorizontal as moveCaretHorizontal, index_moveCaretVertical as moveCaretVertical, index_nodeChildChains as nodeChildChains, index_normalizeSelection as normalizeSelection, index_passiveTreeKey as passiveTreeKey, index_pasteFragment as pasteFragment, index_pasteText as pasteText, index_pushUndoRedoSnapshot as pushUndoRedoSnapshot, index_regenerateFragmentIds as regenerateFragmentIds, index_removeMatrixColumn as removeMatrixColumn, index_removeMatrixRow as removeMatrixRow, index_removeSub as removeSub, index_removeSup as removeSup, index_renderArabicLatexFromSession as renderArabicLatexFromSession, index_renderChainArabic as renderChainArabic, index_renderChainEnglish as renderChainEnglish, index_renderEnglishLatexFromSession as renderEnglishLatexFromSession, index_restoreRedo as restoreRedo, index_restoreUndo as restoreUndo, index_runtimeStatusText as runtimeStatusText, index_selectNode as selectNode, index_serializeSelection as serializeSelection, index_sessionHasStandardCommands as sessionHasStandardCommands, index_setArabicReverseNumberTyping as setArabicReverseNumberTyping, index_setArrayColumnAlignment as setArrayColumnAlignment, index_setCaret as setCaret, index_setCurrentCharacterFont as setCurrentCharacterFont, index_setCurrentDigitForm as setCurrentDigitForm, index_setExpr as setExpr, index_setMatrixEnvStyle as setMatrixEnvStyle, index_setRenderError as setRenderError, index_setSelectionFromMouse as setSelectionFromMouse, index_setSplitLeafTyping as setSplitLeafTyping, index_shouldMirrorOperatorDisplay as shouldMirrorOperatorDisplay, index_standardCommandSpec as standardCommandSpec, index_switchSide as switchSide, index_syncSelectionToCaret as syncSelectionToCaret, index_syncStateSummary as syncStateSummary, index_toggleTakweenCharacterFont as toggleTakweenCharacterFont, index_undoRedoCanRedo as undoRedoCanRedo, index_undoRedoCanUndo as undoRedoCanUndo };
|
|
1739
1866
|
}
|
|
1740
1867
|
|
|
1741
1868
|
/**
|
package/dist/index.global.js
CHANGED
|
@@ -820,6 +820,7 @@ mjx-container[jax="CHTML"] .butex-preview-mirror {
|
|
|
820
820
|
latexFontCommand: "\\maghribi",
|
|
821
821
|
latexFontFamily: "Almaghribi Warsh Quran",
|
|
822
822
|
browserFontStack: '"Almaghribi Warsh Quran", Amiri, "Segoe UI", Tahoma, sans-serif',
|
|
823
|
+
importAliases: ["\\maghribi"],
|
|
823
824
|
svgLayoutKey: "maghribi"
|
|
824
825
|
}
|
|
825
826
|
];
|
|
@@ -2817,6 +2818,88 @@ mjx-container[jax="CHTML"] .butex-preview-mirror {
|
|
|
2817
2818
|
return value;
|
|
2818
2819
|
}
|
|
2819
2820
|
|
|
2821
|
+
// src/editor/standardCommands.ts
|
|
2822
|
+
var STANDARD_COMMANDS = {
|
|
2823
|
+
"\\alpha": { tex: "\\alpha", label: "\u03B1", title: "alpha" },
|
|
2824
|
+
"\\beta": { tex: "\\beta", label: "\u03B2", title: "beta" },
|
|
2825
|
+
"\\gamma": { tex: "\\gamma", label: "\u03B3", title: "gamma" },
|
|
2826
|
+
"\\delta": { tex: "\\delta", label: "\u03B4", title: "delta" },
|
|
2827
|
+
"\\epsilon": { tex: "\\epsilon", label: "\u03B5", title: "epsilon" },
|
|
2828
|
+
"\\eta": { tex: "\\eta", label: "\u03B7", title: "eta" },
|
|
2829
|
+
"\\theta": { tex: "\\theta", label: "\u03B8", title: "theta" },
|
|
2830
|
+
"\\lambda": { tex: "\\lambda", label: "\u03BB", title: "lambda" },
|
|
2831
|
+
"\\mu": { tex: "\\mu", label: "\u03BC", title: "mu" },
|
|
2832
|
+
"\\rho": { tex: "\\rho", label: "\u03C1", title: "rho" },
|
|
2833
|
+
"\\sigma": { tex: "\\sigma", label: "\u03C3", title: "sigma" },
|
|
2834
|
+
"\\tau": { tex: "\\tau", label: "\u03C4", title: "tau" },
|
|
2835
|
+
"\\phi": { tex: "\\phi", label: "\u03C6", title: "phi" },
|
|
2836
|
+
"\\chi": { tex: "\\chi", label: "\u03C7", title: "chi" },
|
|
2837
|
+
"\\psi": { tex: "\\psi", label: "\u03C8", title: "psi" },
|
|
2838
|
+
"\\omega": { tex: "\\omega", label: "\u03C9", title: "omega" },
|
|
2839
|
+
"\\zeta": { tex: "\\zeta", label: "\u03B6", title: "zeta" },
|
|
2840
|
+
"\\nabla": { tex: "\\nabla", label: "\u2207", title: "nabla" },
|
|
2841
|
+
"\\Delta": { tex: "\\Delta", label: "\u0394", title: "Delta" },
|
|
2842
|
+
"\\partial": { tex: "\\partial", label: "\u2202", title: "partial derivative" },
|
|
2843
|
+
"\\Longleftrightarrow": { tex: "\\Longleftrightarrow", label: "\u27FA", title: "long equivalence arrow" },
|
|
2844
|
+
"\\backslash": { tex: "\\backslash", label: "\u2216", title: "reverse solidus" }
|
|
2845
|
+
};
|
|
2846
|
+
function standardCommandSpec(tex) {
|
|
2847
|
+
return Object.prototype.hasOwnProperty.call(STANDARD_COMMANDS, tex) ? STANDARD_COMMANDS[tex] : null;
|
|
2848
|
+
}
|
|
2849
|
+
function isStandardCommandTex(tex) {
|
|
2850
|
+
return standardCommandSpec(tex) !== null;
|
|
2851
|
+
}
|
|
2852
|
+
function chainHasStandardCommands(chain) {
|
|
2853
|
+
for (const node of chain.nodes) {
|
|
2854
|
+
if (node.kind === "standardCommand") {
|
|
2855
|
+
return true;
|
|
2856
|
+
}
|
|
2857
|
+
const childChains = [
|
|
2858
|
+
node.superscript,
|
|
2859
|
+
node.subscript,
|
|
2860
|
+
node.innerExpr,
|
|
2861
|
+
node.numerator,
|
|
2862
|
+
node.denominator,
|
|
2863
|
+
node.radicand,
|
|
2864
|
+
node.rootIndex,
|
|
2865
|
+
node.overExpr,
|
|
2866
|
+
node.underExpr,
|
|
2867
|
+
node.baseExpr
|
|
2868
|
+
];
|
|
2869
|
+
if (childChains.some((child) => child && chainHasStandardCommands(child))) {
|
|
2870
|
+
return true;
|
|
2871
|
+
}
|
|
2872
|
+
if (node.matrixRows?.some((row) => row.some(chainHasStandardCommands))) {
|
|
2873
|
+
return true;
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
return false;
|
|
2877
|
+
}
|
|
2878
|
+
function sessionHasStandardCommands(session) {
|
|
2879
|
+
return chainHasStandardCommands(session.englishTree) || chainHasStandardCommands(session.arabicTree);
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// src/editor/display/standardCommand.ts
|
|
2883
|
+
var STANDARD_COMMAND_CSS = `
|
|
2884
|
+
.standard-command {
|
|
2885
|
+
display: inline-flex;
|
|
2886
|
+
align-items: center;
|
|
2887
|
+
justify-content: center;
|
|
2888
|
+
min-width: 0.9em;
|
|
2889
|
+
font-family: "Cambria Math", "Times New Roman", serif;
|
|
2890
|
+
font-size: 1.05em;
|
|
2891
|
+
line-height: 1;
|
|
2892
|
+
}
|
|
2893
|
+
`.trim();
|
|
2894
|
+
function buildStandardCommandNodeBody(node) {
|
|
2895
|
+
const spec = standardCommandSpec(node.expr);
|
|
2896
|
+
const value = document.createElement("span");
|
|
2897
|
+
value.className = "standard-command";
|
|
2898
|
+
value.title = spec?.title ?? node.expr;
|
|
2899
|
+
value.textContent = spec?.label ?? node.expr;
|
|
2900
|
+
return value;
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2820
2903
|
// src/editor/styles.ts
|
|
2821
2904
|
var CHARACTER_FONT_CSS = NON_DEFAULT_CHARACTER_FONT_SPECS.filter((font) => font.cssClass && font.browserFontStack).map((font) => `.${font.cssClass} {
|
|
2822
2905
|
font-family: ${font.browserFontStack};
|
|
@@ -3026,6 +3109,8 @@ ${MATRIX_ENV_CSS}
|
|
|
3026
3109
|
${ATOMIC_COMMAND_CSS}
|
|
3027
3110
|
|
|
3028
3111
|
${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
3112
|
+
|
|
3113
|
+
${STANDARD_COMMAND_CSS}
|
|
3029
3114
|
`.trim();
|
|
3030
3115
|
function injectBuTeXEditorStyles(doc) {
|
|
3031
3116
|
const d = doc ?? (typeof document !== "undefined" ? document : void 0);
|
|
@@ -3064,6 +3149,8 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
3064
3149
|
NON_DEFAULT_CHARACTER_FONT_SPECS: () => NON_DEFAULT_CHARACTER_FONT_SPECS,
|
|
3065
3150
|
OVERSET_CSS: () => OVERSET_CSS,
|
|
3066
3151
|
SQRT_CSS: () => SQRT_CSS,
|
|
3152
|
+
STANDARD_COMMANDS: () => STANDARD_COMMANDS,
|
|
3153
|
+
STANDARD_COMMAND_CSS: () => STANDARD_COMMAND_CSS,
|
|
3067
3154
|
UNDERSET_CSS: () => UNDERSET_CSS,
|
|
3068
3155
|
accentCommandIdFromTex: () => accentCommandIdFromTex,
|
|
3069
3156
|
accentCommandSpec: () => accentCommandSpec,
|
|
@@ -3139,6 +3226,7 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
3139
3226
|
insertUnderset: () => insertUnderset,
|
|
3140
3227
|
isSelectionActive: () => isSelectionActive,
|
|
3141
3228
|
isSpacingCommandSpec: () => isSpacingCommandSpec,
|
|
3229
|
+
isStandardCommandTex: () => isStandardCommandTex,
|
|
3142
3230
|
mirrorBuTeXOperatorsInTex: () => mirrorBuTeXOperatorsInTex,
|
|
3143
3231
|
moveCaret: () => moveCaret,
|
|
3144
3232
|
moveCaretHorizontal: () => moveCaretHorizontal,
|
|
@@ -3163,6 +3251,7 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
3163
3251
|
runtimeStatusText: () => runtimeStatusText,
|
|
3164
3252
|
selectNode: () => selectNode,
|
|
3165
3253
|
serializeSelection: () => serializeSelection,
|
|
3254
|
+
sessionHasStandardCommands: () => sessionHasStandardCommands,
|
|
3166
3255
|
setArabicReverseNumberTyping: () => setArabicReverseNumberTyping,
|
|
3167
3256
|
setArrayColumnAlignment: () => setArrayColumnAlignment,
|
|
3168
3257
|
setCaret: () => setCaret,
|
|
@@ -3174,6 +3263,7 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
3174
3263
|
setSelectionFromMouse: () => setSelectionFromMouse,
|
|
3175
3264
|
setSplitLeafTyping: () => setSplitLeafTyping,
|
|
3176
3265
|
shouldMirrorOperatorDisplay: () => shouldMirrorOperatorDisplay,
|
|
3266
|
+
standardCommandSpec: () => standardCommandSpec,
|
|
3177
3267
|
switchSide: () => switchSide,
|
|
3178
3268
|
syncSelectionToCaret: () => syncSelectionToCaret,
|
|
3179
3269
|
syncStateSummary: () => syncStateSummary,
|
|
@@ -3565,6 +3655,9 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
3565
3655
|
const body = atomicOperatorCommandSpec(node.expr)?.Tex ?? node.expr;
|
|
3566
3656
|
return `${body}${latinScripts(node, options)}`;
|
|
3567
3657
|
}
|
|
3658
|
+
if (node.kind === "standardCommand") {
|
|
3659
|
+
return `${node.expr}${latinScripts(node, options)}`;
|
|
3660
|
+
}
|
|
3568
3661
|
if (node.kind === "char") {
|
|
3569
3662
|
return `${renderCharContent(node, options)}${latinScripts(node, options)}`;
|
|
3570
3663
|
}
|
|
@@ -3613,6 +3706,9 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
3613
3706
|
const content = spec?.mirror ? `\\butexmirror{${tex}}` : tex;
|
|
3614
3707
|
return arabicScripts(node, content, options);
|
|
3615
3708
|
}
|
|
3709
|
+
if (node.kind === "standardCommand") {
|
|
3710
|
+
return arabicScripts(node, node.expr, options);
|
|
3711
|
+
}
|
|
3616
3712
|
if (node.kind === "char") {
|
|
3617
3713
|
const expr = formatDigits(node.expr, selectedDigitForm(options));
|
|
3618
3714
|
const content = renderCharContent(node, options);
|
|
@@ -5985,6 +6081,9 @@ ${ATOMIC_OPERATOR_COMMAND_CSS}
|
|
|
5985
6081
|
if (node.kind === "atomicOperatorCommand") {
|
|
5986
6082
|
return buildAtomicOperatorCommandNodeBody(node, side, uiLocale);
|
|
5987
6083
|
}
|
|
6084
|
+
if (node.kind === "standardCommand") {
|
|
6085
|
+
return buildStandardCommandNodeBody(node);
|
|
6086
|
+
}
|
|
5988
6087
|
return buildBaseNodeBody(node, digitForm, side);
|
|
5989
6088
|
}
|
|
5990
6089
|
|