@drghaliasri/butex 7.3.2 → 7.3.3

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.mjs CHANGED
@@ -1945,6 +1945,21 @@ function renderDivideOperatorLatex(side) {
1945
1945
  return side === "arabic" ? "\\backslash" : DIVIDE_OPERATOR_EN;
1946
1946
  }
1947
1947
 
1948
+ // src/editor/rawOperatorPresentation.ts
1949
+ var RTL_DIRECTIONAL_RAW_OPERATOR_SURFACE = {
1950
+ "<": ">",
1951
+ ">": "<"
1952
+ };
1953
+ function renderRawOperatorLatex(expr, side) {
1954
+ if (isDivideOperatorExpr(expr)) {
1955
+ return renderDivideOperatorLatex(side);
1956
+ }
1957
+ if (side === "arabic" && Object.prototype.hasOwnProperty.call(RTL_DIRECTIONAL_RAW_OPERATOR_SURFACE, expr)) {
1958
+ return `\\butexmirror{${expr}}`;
1959
+ }
1960
+ return expr;
1961
+ }
1962
+
1948
1963
  // src/editor/digits.ts
1949
1964
  var WESTERN = "0123456789";
1950
1965
  var ARABIC_INDIC = "\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669";
@@ -2094,8 +2109,8 @@ function renderNodeArabic(node, options) {
2094
2109
  }
2095
2110
  return arabicScripts(node, (node.characterFont ?? "default") === "default" ? `\\text{${escapeText(expr)}}` : content, options);
2096
2111
  }
2097
- if (node.kind === "operator" && isDivideOperatorExpr(node.expr)) {
2098
- return arabicScripts(node, renderDivideOperatorLatex("arabic"), options);
2112
+ if (node.kind === "operator") {
2113
+ return arabicScripts(node, renderRawOperatorLatex(node.expr, "arabic"), options);
2099
2114
  }
2100
2115
  return arabicScripts(node, formatDigits(node.expr, selectedDigitForm(options)), options);
2101
2116
  }