@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.
@@ -522,7 +522,7 @@ var CommandNode = class extends BaseAstNode {
522
522
  arabicLatex() {
523
523
  const sup = this.superscript !== null ? this.superscript.arabicLatex() : "";
524
524
  const sub = this.subscript !== null ? this.subscript.arabicLatex() : "";
525
- const arabicName = this.name === "\\sqrt" ? "\\arabsqrt" : this.name;
525
+ const arabicName = this.name === "\\sqrt" || this.name === "\\arabsqrt" ? "\\arsqrt" : this.name;
526
526
  const content = renderCommandCore({
527
527
  name: arabicName,
528
528
  optionalArgs: this.optionalArgs,
@@ -2815,7 +2815,7 @@ function renderNodeArabic(node, options) {
2815
2815
  return arabicScripts(node, content, options);
2816
2816
  }
2817
2817
  if (node.kind === "sqrt" && node.radicand) {
2818
- const content = `\\arabsqrt${optionalRootIndexArabic(node, options)}{${renderChainArabic(node.radicand, options)}}`;
2818
+ const content = `\\arsqrt${optionalRootIndexArabic(node, options)}{${renderChainArabic(node.radicand, options)}}`;
2819
2819
  return arabicScripts(node, content, options);
2820
2820
  }
2821
2821
  if (node.kind === "overset" && node.baseExpr) {
@@ -3794,7 +3794,7 @@ function commandToEditorNode(node) {
3794
3794
  }
3795
3795
  return { editable: true, node: frac };
3796
3796
  }
3797
- if ((node.name === "\\sqrt" || node.name === "\\arabsqrt") && node.mandatoryArgs.length >= 1) {
3797
+ if ((node.name === "\\sqrt" || node.name === "\\arabsqrt" || node.name === "\\arsqrt") && node.mandatoryArgs.length >= 1) {
3798
3798
  const sqrt = createSqrtNode();
3799
3799
  const radicand = chainToEditorChain(node.mandatoryArgs[0]);
3800
3800
  if (!radicand.editable) {
@@ -5077,7 +5077,8 @@ function arabicXeLatexPreambleCmd() {
5077
5077
  \newcommand{\horzbar}{\rule[.5ex]{2.5ex}{0.5pt}}
5078
5078
 
5079
5079
 
5080
- \newcommand{\arabsqrt}[2]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
5080
+ \newcommand{\arsqrt}[2][]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
5081
+ \newcommand{\arabsqrt}[2][]{\arsqrt[#1]{#2}}
5081
5082
  \newcommand{\arabvec}[1]{\reflectbox{$\vec{\reflectbox{$#1$}}$}}
5082
5083
 
5083
5084
  \newcommand{\arabexp}[1]{{}^{#1}\!\raisebox{-4.5pt}{\text{\diwani{ه}}}}
@@ -5148,7 +5149,6 @@ function arabicXeLatexPreambleCmd() {
5148
5149
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5149
5150
 
5150
5151
 
5151
- \newcommand{\arsqrt}[2][]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
5152
5152
  \newcommand{\arexp}[0]{\!\raisebox{-4.5pt}{\text{\diwani{ه}}}}
5153
5153
  \newcommand{\arlog}[0]{\!\!\text{\diwani{لو}}}
5154
5154
  \newcommand{\arln}[0]{\!\!\prescript{}{\text{\diwani{ه}}}{\text{\diwani{لو}}}}