@drghaliasri/butex 7.2.2 → 7.3.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.
@@ -2216,8 +2216,9 @@ function characterFontSpec(fontId) {
2216
2216
  // src/editor/divideOperator.ts
2217
2217
  var DIVIDE_OPERATOR_EN = "/";
2218
2218
  var DIVIDE_OPERATOR_AR = "\\";
2219
+ var DIVIDE_OPERATOR_AR_LATEX = "\\backslash";
2219
2220
  function isDivideOperatorExpr(expr) {
2220
- return expr === DIVIDE_OPERATOR_EN || expr === DIVIDE_OPERATOR_AR;
2221
+ return expr === DIVIDE_OPERATOR_EN || expr === DIVIDE_OPERATOR_AR || expr === DIVIDE_OPERATOR_AR_LATEX;
2221
2222
  }
2222
2223
  function divideOperatorSurfaceExpr(expr, side) {
2223
2224
  if (!isDivideOperatorExpr(expr)) {
@@ -5159,6 +5160,10 @@ function buildBaseNodeBody(node, digitForm = "western", side = "english") {
5159
5160
  if (node.wrapperCommand === "\\boldarabic" || node.wrapperCommand === "\\mathbf") {
5160
5161
  value.classList.add("node-value--bold");
5161
5162
  }
5163
+ if (node.wrapperCommand === "\\unit") {
5164
+ value.classList.add("node-value--unit");
5165
+ value.title = "\u0648\u062D\u062F\u0629 (unit)";
5166
+ }
5162
5167
  }
5163
5168
  const surfaceExpr = node.kind === "operator" ? divideOperatorSurfaceExpr(node.expr, side) : node.expr;
5164
5169
  value.textContent = surfaceExpr === "" ? "\u25A1" : formatDigits(surfaceExpr, digitForm);
@@ -6084,6 +6089,13 @@ ${CHARACTER_FONT_CSS}
6084
6089
  font-weight: 700;
6085
6090
  }
6086
6091
 
6092
+ .node-value--unit {
6093
+ font-style: normal;
6094
+ text-decoration-line: underline;
6095
+ text-decoration-style: dotted;
6096
+ text-underline-offset: 0.2em;
6097
+ }
6098
+
6087
6099
  .chain {
6088
6100
  display: inline-flex;
6089
6101
  align-items: center;