@drghaliasri/butex 5.5.0 → 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) {
@@ -3354,7 +3354,8 @@ ${BUTEX_FONT_FACE_CSS}
3354
3354
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
3355
3355
  }
3356
3356
 
3357
- .surface:focus {
3357
+ .surface:focus,
3358
+ .surface.surface--typing-focus {
3358
3359
  border-color: var(--butex-focus-border, rgba(13, 148, 136, 0.45));
3359
3360
  box-shadow: 0 0 0 3px var(--butex-focus-shadow, rgba(13, 148, 136, 0.12));
3360
3361
  }
@@ -3793,7 +3794,7 @@ function commandToEditorNode(node) {
3793
3794
  }
3794
3795
  return { editable: true, node: frac };
3795
3796
  }
3796
- 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) {
3797
3798
  const sqrt = createSqrtNode();
3798
3799
  const radicand = chainToEditorChain(node.mandatoryArgs[0]);
3799
3800
  if (!radicand.editable) {
@@ -5007,7 +5008,7 @@ function arabicXeLatexPreamblePkg(twocolumn = false) {
5007
5008
  \usepackage{bidi}
5008
5009
  \usepackage{multirow}
5009
5010
  \usepackage{booktabs}
5010
- \usepackage{graphicx} % For \butexreflect
5011
+ \usepackage{graphicx} % For \reflectbox
5011
5012
  \usepackage{xcolor}
5012
5013
  \usepackage{tikz}
5013
5014
  \usepackage{tcolorbox} % For tcolorbox environment
@@ -5076,10 +5077,9 @@ function arabicXeLatexPreambleCmd() {
5076
5077
  \newcommand{\horzbar}{\rule[.5ex]{2.5ex}{0.5pt}}
5077
5078
 
5078
5079
 
5079
- \newcommand{\butexreflect}[1]{\tikz[baseline=(n.base)]{\node[inner sep=0pt,outer sep=0pt,xscale=-1](n){#1};}}
5080
-
5081
- \newcommand{\arabsqrt}[2]{\butexreflect{\(\sqrt[\butexreflect{\(#1\)}]{\butexreflect{\(#2\)}}\)}}
5082
- \newcommand{\arabvec}[1]{\butexreflect{$\vec{\butexreflect{$#1$}}$}}
5080
+ \newcommand{\arsqrt}[2][]{\reflectbox{\(\sqrt[\reflectbox{\(#1\)}]{\reflectbox{\(#2\)}}\)}}
5081
+ \newcommand{\arabsqrt}[2][]{\arsqrt[#1]{#2}}
5082
+ \newcommand{\arabvec}[1]{\reflectbox{$\vec{\reflectbox{$#1$}}$}}
5083
5083
 
5084
5084
  \newcommand{\arabexp}[1]{{}^{#1}\!\raisebox{-4.5pt}{\text{\diwani{ه}}}}
5085
5085
  \newcommand{\arablog}[2]{\left(\text{#2}\right)\!\prescript{}{\text{#1}}{\text{\diwani{لو}}}}
@@ -5127,9 +5127,9 @@ function arabicXeLatexPreambleCmd() {
5127
5127
  \newcommand{\araboddde}[2][-5pt]{\stackrel{\raisebox{#1}{$\vcenter{\hbox{$\cdot\!\cdot\!\cdot$}}$}}{\text{#2}}}
5128
5128
  \newcommand{\arabpde}[1]{\prescript{}{#1\!\!}{\nabla}} % arabic partial differential equation (PDE)
5129
5129
 
5130
- \newcommand{\arabprime}[0]{\butexreflect{$\prime$}\!} % arabic prime notation
5131
- \newcommand{\arabpprime}[0]{\butexreflect{$\prime$}\butexreflect{$\prime$}\!} % arabic prime notation
5132
- \newcommand{\arabppprime}[0]{\butexreflect{$\prime$}\butexreflect{$\prime$}\butexreflect{$\prime$}\!} % arabic prime notation
5130
+ \newcommand{\arabprime}[0]{\reflectbox{$\prime$}\!} % arabic prime notation
5131
+ \newcommand{\arabpprime}[0]{\reflectbox{$\prime$}\reflectbox{$\prime$}\!} % arabic prime notation
5132
+ \newcommand{\arabppprime}[0]{\reflectbox{$\prime$}\reflectbox{$\prime$}\reflectbox{$\prime$}\!} % arabic prime notation
5133
5133
 
5134
5134
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5135
5135
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -5149,7 +5149,6 @@ function arabicXeLatexPreambleCmd() {
5149
5149
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5150
5150
 
5151
5151
 
5152
- \newcommand{\arsqrt}[2][]{\butexreflect{\(\sqrt[\butexreflect{\(#1\)}]{\butexreflect{\(#2\)}}\)}}
5153
5152
  \newcommand{\arexp}[0]{\!\raisebox{-4.5pt}{\text{\diwani{ه}}}}
5154
5153
  \newcommand{\arlog}[0]{\!\!\text{\diwani{لو}}}
5155
5154
  \newcommand{\arln}[0]{\!\!\prescript{}{\text{\diwani{ه}}}{\text{\diwani{لو}}}}