@drghaliasri/butex 8.0.0 → 8.0.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-cli.js +103 -62
- package/dist/document-cli.js.map +1 -1
- package/dist/document.js +103 -62
- package/dist/document.js.map +1 -1
- package/dist/document.mjs +103 -62
- package/dist/document.mjs.map +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.global.js +14 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react-document-preview.js +28 -8
- package/dist/react-document-preview.js.map +1 -1
- package/dist/react-document-preview.mjs +28 -8
- package/dist/react-document-preview.mjs.map +1 -1
- package/dist/react-document.js +29 -8
- package/dist/react-document.js.map +1 -1
- package/dist/react-document.mjs +29 -8
- package/dist/react-document.mjs.map +1 -1
- package/dist/react.d.mts +12 -0
- package/dist/react.d.ts +12 -0
- package/dist/react.js +29 -8
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +29 -8
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -694,6 +694,15 @@ var ATOMIC_COMMANDS = {
|
|
|
694
694
|
title: "\u0641\u0631\u0627\u063A \u0633\u0627\u0644\u0628 \u0631\u0641\u064A\u0639",
|
|
695
695
|
spacing: { direction: "negative", level: 1 }
|
|
696
696
|
},
|
|
697
|
+
thinSpace: {
|
|
698
|
+
id: "thinSpace",
|
|
699
|
+
category: "spacing",
|
|
700
|
+
englishTex: "\\,",
|
|
701
|
+
arabicTex: "\\,",
|
|
702
|
+
arabicLabel: "",
|
|
703
|
+
title: "\u0641\u0631\u0627\u063A \u0631\u0641\u064A\u0639",
|
|
704
|
+
spacing: { direction: "positive", level: 1 }
|
|
705
|
+
},
|
|
697
706
|
mediumSpace: {
|
|
698
707
|
id: "mediumSpace",
|
|
699
708
|
category: "spacing",
|
|
@@ -1714,6 +1723,10 @@ function renderNodeEnglish(node, options) {
|
|
|
1714
1723
|
}
|
|
1715
1724
|
if (node.kind === "char") {
|
|
1716
1725
|
if (node.sourceLatex) {
|
|
1726
|
+
if (node.wrapperCommand === "\\boldarabic" || node.wrapperCommand === "\\mathbf") {
|
|
1727
|
+
const boldSource = node.sourceLatex.startsWith("\\mathbf{") ? node.sourceLatex : `\\mathbf{${node.sourceLatex}}`;
|
|
1728
|
+
return `${boldSource}${latinScripts(node, options)}`;
|
|
1729
|
+
}
|
|
1717
1730
|
return `${node.sourceLatex}${latinScripts(node, options)}`;
|
|
1718
1731
|
}
|
|
1719
1732
|
if (node.wrapperCommand) {
|
|
@@ -2655,6 +2668,7 @@ var ENGLISH_COMMAND_TITLES = {
|
|
|
2655
2668
|
C: "Complex numbers",
|
|
2656
2669
|
H: "Quaternions",
|
|
2657
2670
|
negThinSpace: "Negative thin space",
|
|
2671
|
+
thinSpace: "Thin space",
|
|
2658
2672
|
mediumSpace: "Medium space",
|
|
2659
2673
|
thickSpace: "Thick space",
|
|
2660
2674
|
quadSpace: "Large space",
|
|
@@ -9076,20 +9090,27 @@ function editableWrapperCommand(node) {
|
|
|
9076
9090
|
return null;
|
|
9077
9091
|
}
|
|
9078
9092
|
const child = singleCommandChar(node);
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9093
|
+
let editorNode;
|
|
9094
|
+
if (child) {
|
|
9095
|
+
const normalized = normalizeCharImportExpr(child.expr);
|
|
9096
|
+
editorNode = createEditorNode("char", normalized.expr);
|
|
9097
|
+
if (normalized.characterFont !== "default") {
|
|
9098
|
+
editorNode.characterFont = normalized.characterFont;
|
|
9099
|
+
}
|
|
9100
|
+
} else {
|
|
9101
|
+
if (node.optionalArgs.length || node.mandatoryArgs.length !== 1) return null;
|
|
9102
|
+
const nodes = node.mandatoryArgs[0]?.chain;
|
|
9103
|
+
if (!nodes || nodes.length !== 1 || !(nodes[0] instanceof CommandNode)) return null;
|
|
9104
|
+
const nested = charFromTextLikeCommand(nodes[0]);
|
|
9105
|
+
if (!nested?.editable) return null;
|
|
9106
|
+
editorNode = nested.node;
|
|
9086
9107
|
}
|
|
9087
9108
|
editorNode.wrapperCommand = node.name === "\\mathtt" ? "\\mathtt" : node.name === "\\mathbf" ? "\\mathbf" : node.name === "\\boldarabic" ? "\\boldarabic" : "\\unit";
|
|
9088
9109
|
const scripts = attachScripts(node, editorNode);
|
|
9089
9110
|
if (scripts) {
|
|
9090
9111
|
return scripts;
|
|
9091
9112
|
}
|
|
9092
|
-
if (!editorNode.sourceLatex && node.name === "\\mathsf") {
|
|
9113
|
+
if (!editorNode.sourceLatex && node.name === "\\mathsf" && child) {
|
|
9093
9114
|
editorNode.sourceLatex = `\\mathsf{${child.expr}}`;
|
|
9094
9115
|
}
|
|
9095
9116
|
return { editable: true, node: editorNode };
|