@drghaliasri/butex 5.5.1 → 5.5.2

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.
@@ -557,7 +557,7 @@ var CommandNode = class extends BaseAstNode {
557
557
  arabicLatex() {
558
558
  const sup = this.superscript !== null ? this.superscript.arabicLatex() : "";
559
559
  const sub = this.subscript !== null ? this.subscript.arabicLatex() : "";
560
- const arabicName = this.name === "\\sqrt" ? "\\arabsqrt" : this.name;
560
+ const arabicName = this.name === "\\sqrt" || this.name === "\\arabsqrt" ? "\\arsqrt" : this.name;
561
561
  const content = renderCommandCore({
562
562
  name: arabicName,
563
563
  optionalArgs: this.optionalArgs,
@@ -2934,7 +2934,7 @@ function renderNodeArabic(node, options) {
2934
2934
  return arabicScripts(node, content, options);
2935
2935
  }
2936
2936
  if (node.kind === "sqrt" && node.radicand) {
2937
- const content = `\\arabsqrt${optionalRootIndexArabic(node, options)}{${renderChainArabic(node.radicand, options)}}`;
2937
+ const content = `\\arsqrt${optionalRootIndexArabic(node, options)}{${renderChainArabic(node.radicand, options)}}`;
2938
2938
  return arabicScripts(node, content, options);
2939
2939
  }
2940
2940
  if (node.kind === "overset" && node.baseExpr) {
@@ -7757,7 +7757,7 @@ function commandToEditorNode(node) {
7757
7757
  }
7758
7758
  return { editable: true, node: frac };
7759
7759
  }
7760
- if ((node.name === "\\sqrt" || node.name === "\\arabsqrt") && node.mandatoryArgs.length >= 1) {
7760
+ if ((node.name === "\\sqrt" || node.name === "\\arabsqrt" || node.name === "\\arsqrt") && node.mandatoryArgs.length >= 1) {
7761
7761
  const sqrt = createSqrtNode();
7762
7762
  const radicand = chainToEditorChain(node.mandatoryArgs[0]);
7763
7763
  if (!radicand.editable) {
@@ -8962,7 +8962,8 @@ function arabicXeLatexPreambleCmd() {
8962
8962
  \newcommand{\horzbar}{\rule[.5ex]{2.5ex}{0.5pt}}
8963
8963
 
8964
8964
 
8965
- \newcommand{\arabsqrt}[2]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
8965
+ \newcommand{\arsqrt}[2][]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
8966
+ \newcommand{\arabsqrt}[2][]{\arsqrt[#1]{#2}}
8966
8967
  \newcommand{\arabvec}[1]{\reflectbox{$\vec{\reflectbox{$#1$}}$}}
8967
8968
 
8968
8969
  \newcommand{\arabexp}[1]{{}^{#1}\!\raisebox{-4.5pt}{\text{\diwani{ه}}}}
@@ -9033,7 +9034,6 @@ function arabicXeLatexPreambleCmd() {
9033
9034
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9034
9035
 
9035
9036
 
9036
- \newcommand{\arsqrt}[2][]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
9037
9037
  \newcommand{\arexp}[0]{\!\raisebox{-4.5pt}{\text{\diwani{ه}}}}
9038
9038
  \newcommand{\arlog}[0]{\!\!\text{\diwani{لو}}}
9039
9039
  \newcommand{\arln}[0]{\!\!\prescript{}{\text{\diwani{ه}}}{\text{\diwani{لو}}}}