texlive[71774] Master/texmf-dist: overarrows (11jul24)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 11 21:57:18 CEST 2024


Revision: 71774
          https://tug.org/svn/texlive?view=revision&revision=71774
Author:   karl
Date:     2024-07-11 21:57:18 +0200 (Thu, 11 Jul 2024)
Log Message:
-----------
overarrows (11jul24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/overarrows/README.md
    trunk/Master/texmf-dist/doc/latex/overarrows/overarrows-doc.sty
    trunk/Master/texmf-dist/doc/latex/overarrows/overarrows.pdf
    trunk/Master/texmf-dist/source/latex/overarrows/overarrows.dtx
    trunk/Master/texmf-dist/tex/latex/overarrows/overarrows.sty

Modified: trunk/Master/texmf-dist/doc/latex/overarrows/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overarrows/README.md	2024-07-11 19:57:07 UTC (rev 71773)
+++ trunk/Master/texmf-dist/doc/latex/overarrows/README.md	2024-07-11 19:57:18 UTC (rev 71774)
@@ -13,11 +13,11 @@
 
 ## Repository
 
-https://gricad-gitlab.univ-grenoble-alpes.fr/labbeju/latex-packages/-/tree/main/overarrows
+https://github.com/julienlabbe/latex-packages/tree/main/overarrows
 
 ## Licence
 
-Copyright (C) 2023 by Julien Labbé
+Copyright (C) 2023-2024 by Julien Labbé
 
 This file may be distributed and/or modified under the conditions of the LaTeX
 Project Public License (LPPL), either version 1.3c of this license or (at your

Modified: trunk/Master/texmf-dist/doc/latex/overarrows/overarrows-doc.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/overarrows/overarrows-doc.sty	2024-07-11 19:57:07 UTC (rev 71773)
+++ trunk/Master/texmf-dist/doc/latex/overarrows/overarrows-doc.sty	2024-07-11 19:57:18 UTC (rev 71774)
@@ -32,6 +32,7 @@
 \lstdefinestyle{lstovardoc}{%
   language = [LaTeX]TeX,
   columns         = flexible,
+  keepspaces      = true,
   keywordstyle    = {\bfseries\color{ovar_darkblue}},
   texcsstyle      = *{\bfseries\color{ovar_darkblue}},
   commentstyle    = {\color{gray}},
@@ -126,7 +127,7 @@
     name=macrocode,
     firstnumber=auto,
     style       = lstovarcode,
-    showlines=false,
+    showlines   = false,
     texcs       = [2]{% commands
       DeclareOverArrowCommand, ProvideOverArrowCommand,%
       NewOverArrowCommand, RenewOverArrowCommand,%
@@ -147,8 +148,9 @@
     indexstyle  = [3]\indexlength,%
     texcs       = [4]{% internal macros
       ovar at rightarrow, ovar at leftarrow, ifovar at option@oldarrows@,
-      ifovar at option@esvect@, ifovar at option@tikz@, ifovar at option@pstarrows@,
-      ifovar at detectsubscripts@, ifovar at option@debug@,
+      ifovar at option@esvect@, ifovar at option@tikz@, ifovar at option@pstricks@,
+      ifovar at option@pstarrows@, ifovar at detectsubscripts@,
+      ifovar at option@subother@, ifovar at option@subactive@, ifovar at option@debug@,
       ifovar at option@overrightarrow@, ifovar at option@underrightarrow@,
       ifovar at option@overleftarrow@, ifovar at option@underleftarrow@,
       ifovar at option@overleftrightarrow@, ifovar at option@underleftrightarrow@,
@@ -156,26 +158,29 @@
       ifovar at option@overrightharpoondown@, ifovar at option@underrightharpoondown@,
       ifovar at option@overleftharpoonup@, ifovar at option@underleftharpoonup@,
       ifovar at option@overleftharpoondown@, ifovar at option@underleftharpoondown@,
-      ifovar at option@overbar@, ifovar at option@underbar@, ovar at set, ovar at length@min,
+      ifovar at option@overbar@, ifovar at option@underbar@, ovar at auto@middle,
+      ovar at auto@trim at middle, ovar at subcmd, ovar at set, ovar at length@min,
       ovar at before@arrow, ovar at after@arrow, ovar at macro@stack, ovar at macro@arrow,
-      ovar at set@, ovar at shift@left, ovar at shift@right, ovar at stack@fill,
-      ovar at stackunder@fill, ovar at stack@lens, ovar at stackunder@lens,
-      ovar at macro@arrowfill, ovar at arrow@fill, ovar at arrow@start, ovar at trim@start,
-      ovar at trim@middle, ovar at arrow@middle, ovar at trim@end, ovar at arrow@end,
-      ovar at tikz@command, ovar at tikz@pathoptions, ovar at tikz@path,
-      ovar at tikz@options, ovar at picture@geometry, ovar at picture@linethickness,
-      ovar at picture@command, ovar at extralength, ovar at tempdim, ovar at set@arrowlength,
-      ovar at set@arrowthickness, ovar at stackover@@, ovar at stackunder@@,
-      ovar at stackover@, ovar at stackunder@, ovar at stackover@fill,
-      ovar at stackover@lens, ovar at set@common, ovar at starversion,
-      ovar at testmathstyles, ovar at row@teststyle,%
-      ifovar at option@subother@,ifovar at option@subactive@,ovar at subcmd,ovar at testkerning,%
+      ovar at shift@left, ovar at shift@right, ovar at stack@fill, ovar at stackunder@fill,
+      ovar at stack@lens, ovar at stackunder@lens, ovar at macro@arrowfill,
+      ovar at arrow@fill, ovar at arrow@start, ovar at trim@start, ovar at trim@middle,
+      ovar at arrow@middle, ovar at trim@end, ovar at arrow@end, ovar at tikz@command,
+      ovar at tikz@pathoptions, ovar at tikz@path, ovar at tikz@options,
+      ovar at pstricks@geometry, ovar at pstricks@linethickness, ovar at pstricks@psset,
+      ovar at pstricks@command, ovar at picture@geometry, ovar at picture@linethickness,
+      ovar at picture@command, ovar at tempdim, ovar at set@arrowlength,
+      ovar at set@arrowthickness, ovar at set@arrowthickness at UM@lua,
+      ovar at rulethickness@fontdimen, ovar at rulethickness@family, ovar at stackover@@,
+      ovar at stackunder@@, ovar at stackover@, ovar at stackunder@, ovar at stackover@fill,
+      ovar at stackover@lens, ovar at cmdname@processor, ovar at set@common,
+      ovar at starversion, ovar at tempbox, ovar at testmathstyles, ovar at row@teststyle,
+      ovar at testkerning%
     },
     index       = [4][texcs4],%
     indexstyle  = [4]\indexmacrointernal,%
     moretexcs   = [5]{% other macros
-      Relbar, relbareda, relbaredd, rightarrow, Rightarrow, varleftarrow,
-      varrightarrow, twoheadrightarrow,%
+      relbar, Relbar, relbareda, relbaredd, harrowextender, rightarrow,
+      Rightarrow, varleftarrow, varrightarrow, twoheadrightarrow,%
     },
   }
   \csname\@lst @SetFirstNumber\endcsname

Modified: trunk/Master/texmf-dist/doc/latex/overarrows/overarrows.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/overarrows/overarrows.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/overarrows/overarrows.dtx	2024-07-11 19:57:07 UTC (rev 71773)
+++ trunk/Master/texmf-dist/source/latex/overarrows/overarrows.dtx	2024-07-11 19:57:18 UTC (rev 71774)
@@ -16,14 +16,17 @@
 %<package>\NeedsTeXFormat{LaTeX2e}
 %<package>\ProvidesPackage{overarrows}
 %<*package>
-[2023/02/15 v1.1 Custom extensible arrows over math expressions]
+[2024/07/11 v1.2 Custom extensible arrows over math expressions]
 %</package>
 %
 %<*driver>
 \documentclass[nohyperref]{ltxdoc}
+\usepackage{metalogo}
+\usepackage{enumitem}
+\usepackage{array}
 
 \usepackage{overarrows-doc} %^^A defined at end of this file, with guard <docstyle>
-\usepackage[old-arrows, esvect, tikz, pstarrows, allcommands]{overarrows}
+\usepackage[old-arrows, esvect, tikz, pstricks, pstarrows, allcommands]{overarrows}
 
 \EnableCrossrefs
 \PageIndex
@@ -36,8 +39,8 @@
 
 %% Arrows used in doc
 \usepackage{amssymb}% for \twoheadrightarrow
-\NewOverArrowCommand{amsoverrightarrow}{amsmath=strict, end={\rightarrow}}
-\NewOverArrowCommand{overrightnewarrow}{%
+\NewOverArrowCommand{\amsoverrightarrow}{amsmath=strict, end={\rightarrow}}
+\NewOverArrowCommand{\overrightnewarrow}{%
     amsmath, middle config=relbar,  end=\rightarrow,
     right arrow,
   }
@@ -49,22 +52,22 @@
 \DeclareMathSymbol{\fldrf}{\mathrel}{esvector}{'026}
 \DeclareMathSymbol{\fldrg}{\mathrel}{esvector}{'027}
 \DeclareMathSymbol{\fldrh}{\mathrel}{esvector}{'030}
-\NewOverArrowCommand{esveca}{esvect=strict, end={\fldra}}
-\NewOverArrowCommand{esvecb}{esvect=strict, end={\fldrb}}
-\NewOverArrowCommand{esvecc}{esvect=strict, end={\fldrc}}
-\NewOverArrowCommand{esvecd}{esvect=strict, end={\fldrd}}
-\NewOverArrowCommand{esvece}{esvect=strict, end={\fldre}}
-\NewOverArrowCommand{esvecg}{esvect=strict, end={\fldrg}}
-\NewOverArrowCommand{esvech}{esvect=strict, end={\fldrh}}
-\NewOverArrowCommand{vva}{esvect, middle config=auto, end=\fldra}
-\NewOverArrowCommand{esvecf}{esvect=strict, end={\fldrf}}
-\NewOverArrowCommand{vvb}{esvect, middle config=auto, end=\fldrb}
-\NewOverArrowCommand{vvc}{esvect, middle config=auto, end=\fldrc}
-\NewOverArrowCommand{vvd}{esvect, middle config=auto, end=\fldrd}
-\NewOverArrowCommand{vve}{esvect, middle config=auto, end=\fldre}
-\NewOverArrowCommand{vvf}{esvect, middle config=auto, end=\fldrf}
-\NewOverArrowCommand{vvg}{esvect, middle config=auto, end=\fldrg}
-\NewOverArrowCommand{vvh}{esvect, middle config=auto, end=\fldrh}
+\NewOverArrowCommand{\esveca}{esvect=strict, end={\fldra}}
+\NewOverArrowCommand{\esvecb}{esvect=strict, end={\fldrb}}
+\NewOverArrowCommand{\esvecc}{esvect=strict, end={\fldrc}}
+\NewOverArrowCommand{\esvecd}{esvect=strict, end={\fldrd}}
+\NewOverArrowCommand{\esvece}{esvect=strict, end={\fldre}}
+\NewOverArrowCommand{\esvecg}{esvect=strict, end={\fldrg}}
+\NewOverArrowCommand{\esvech}{esvect=strict, end={\fldrh}}
+\NewOverArrowCommand{\vva}{esvect, middle config=auto, end=\fldra}
+\NewOverArrowCommand{\esvecf}{esvect=strict, end={\fldrf}}
+\NewOverArrowCommand{\vvb}{esvect, middle config=auto, end=\fldrb}
+\NewOverArrowCommand{\vvc}{esvect, middle config=auto, end=\fldrc}
+\NewOverArrowCommand{\vvd}{esvect, middle config=auto, end=\fldrd}
+\NewOverArrowCommand{\vve}{esvect, middle config=auto, end=\fldre}
+\NewOverArrowCommand{\vvf}{esvect, middle config=auto, end=\fldrf}
+\NewOverArrowCommand{\vvg}{esvect, middle config=auto, end=\fldrg}
+\NewOverArrowCommand{\vvh}{esvect, middle config=auto, end=\fldrh}
 
 \makeatletter
 \newcommand{\unsetoldarrows}{
@@ -94,7 +97,7 @@
 %
 % \title{The \pkg{overarrows} package\thanks{This document
 % corresponds to \pkg{overarrows}~\fileversion, dated \filedate.}}
-% \author{Julien Labb\'e \\ \texttt{Julien.Labbe at univ-grenoble-alpes.fr}}
+% \author{Julien Labb\'e \\ {\small \url{https://github.com/julienlabbe/latex-packages}}}
 %
 % \maketitle
 %
@@ -111,7 +114,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{overrightharpoon}{%
+\NewOverArrowCommand{\overrightharpoon}{%
   end=\rightharpoonup
 }
 
@@ -188,9 +191,9 @@
 %
 % The \pkg{overarrows} package was primitively written for vectors, but in
 % a highly customisable way. It can be used to define a large variety of arrows,
-% using math symbols, or PGF/TikZ commands. It's also possible to create
-% commands that draw the arrows under. Some predefined commands are provided,
-% giving\footnotemark{}, for arrow over:
+% using math symbols, or drawing commands from PGF/TikZ or PSTricks. It's also
+% possible to create commands that draw the arrows under. Some predefined
+% commands are provided, giving\footnotemark{}, for arrow over:
 % \footnotetext{Displayed here with the \refOpt{old-arrows} option.}
 % \begin{align*}
 %   \overrightarrow{\alpha+\beta}
@@ -222,34 +225,42 @@
 % above\footnotemark{}. For this second convention, \TeX/\LaTeX provides the
 % command \cs{vec}, which accents its content (using the \cs{mathaccent}
 % command) with the character~\symb{\mathchar "017E\relax}
-% (\cs{mathchar}|"017E| in Computer Modern font).
-% But \symb{\mathchar "017E\relax} isn't extensible, and gives: $\vec{v}$,
-% $\vec{AB}$ or $\vec{\text{grad}}$ (there's no command \cs{widevec} analogous
-% to \cs{widehat}).
+% (\cs{mathchar}|"017E| in Computer Modern font). But \symb{\mathchar
+% "017E\relax} isn't extensible\footnotemark{}, and gives: $\vec{v}$, $\vec{AB}$
+% or $\vec{\text{grad}}$ (there's no command \cs{widevec} analogous to
+% \cs{widehat}).
 %
+% \addtocounter{footnote}{-2}%^^A two footnotemarks
+%
+% \stepcounter{footnote}
 % \footnotetext{See, for example: International Organization for
 % Standardization. (2019). \emph{Quantities and units -- Part 2: Mathematics}
 % (ISO Standard No. 80000-2:2019).
 % \url{https://www.iso.org/standard/64973.html}.}
 %
+% \stepcounter{footnote}
+% \footnotetext{In fact, with the unicode engines \LuaTeX{} and \XeTeX{}, the
+% command \cs{Umathaccent} can now define extensible accents. This is used by
+% the \pkg{unicode-math} package, which also set the arrows displayed by \cs{vec}
+% and \cs{overrightarrow} in a coherent manner.}
+%
 % An extensible alternative is given by the command \cs{overrightarrow},
 % available in \TeX/\LaTeX, and which is redefined by the commonly used
 % \pkg{amsmath} package. But its arrow, built with the \cs{rightarrow} symbol
-% \symb{\rightarrow}, is too large with the default \emph{Computer Modern} font:
-% $\amsoverrightarrow{AB}$. Another alternative is the \pkg{esvect} package,
-% which provides the \cs{vv} command and a set of custom arrows: $\esveca{AB}$,
-% $\esvecb{AB}$, $\esvecc{AB}$, $\esvecd{AB}$, $\esvece{AB}$, $\esvecf{AB}$,
-% $\esvecg{AB}$, $\esvech{AB}$.
+% \symb{\rightarrow}, is too large, using the default \emph{Computer Modern}
+% font: $\amsoverrightarrow{AB}$. Another alternative is the \pkg{esvect}
+% package, which provides the \cs{vv} command and a set of custom arrows:
+% $\esveca{AB}$, $\esvecb{AB}$, $\esvecc{AB}$, $\esvecd{AB}$, $\esvece{AB}$,
+% $\esvecf{AB}$, $\esvecg{AB}$, $\esvech{AB}$.
 %
 % \subsection{Stack and arrow macros}
 %
 % It's worth looking at the definition of \pkg{amsmath} \cs{overrightarrow}
-% command:
-% \iffalse
+% command: \iffalse
 %<*example>
 % \fi
 \begin{dispListing}
-  \long macro:->\mathpalette {\overarrow@ \rightarrowfill@ }
+\long macro:->\mathpalette {\overarrow@ \rightarrowfill@ }
 \end{dispListing}
 % \iffalse
 %</example>
@@ -314,7 +325,7 @@
 % The \pkg{overarrows} package also provides an alternative mechanism.
 % When used, the length \cs{overarrowlength} is set, according to the arrow
 % command content, and can be employed, for example, to draw arrows using
-% PGF/TikZ or the \LaTeX{} picture environment.
+% PGF/TikZ, PSTricks or the \LaTeX{} picture environment.
 %
 % \section{Quick start}
 %
@@ -382,14 +393,13 @@
 % \subsection{Commands creation}
 %
 % Commands are created with \refCom{NewOverArrowCommand}. This macro take two
-% mandatory arguments : the name of the command (without backslash), and the
-% arrow configuration as comma-separated list of key-values. By default, a right
-% arrow is set:
+% mandatory arguments : the name of the command and the arrow configuration as
+% comma-separated list of key-values. By default, a right arrow is set:
 % \iffalse
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{myovercmd}{}
+\NewOverArrowCommand{\myovercmd}{}
 $\myovercmd{test}$
 \end{dispExample}
 % \iffalse
@@ -417,7 +427,7 @@
 %<*example>
 % \fi
 \begin{dispListing}
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
   start=\lhook, end=\twoheadrightarrow,
 }
 \end{dispListing}
@@ -436,12 +446,12 @@
 % \iffalse
 %</example>
 % \fi
-% With the previous definition, the result of the command
+% But with the previous definition, the result of the command
 % \cs{overhooktwoheadrightarrow} is faulty:
 % \iffalse
 %<*example>
 % \fi
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
   start=\lhook, end=\twoheadrightarrow,
 }
 \begin{dispExample}
@@ -459,7 +469,7 @@
 % \fi
 \csundef{overhooktwoheadrightarrow}
 \begin{dispExample}
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
   start=\lhook, end=\twoheadrightarrow,
   trim start=1.5, trim end=2,
 }
@@ -474,16 +484,18 @@
 % If the math font differs from the default \emph{Computer Modern}, the central
 % part of the arrow may have inappropriate position or line width. This is
 % because the default symbol used for the arrow line is \cs{relbareda}
-% \symb{\relbareda} from the \pkg{esvect} package. If needed, try to set the
-% \refKey{middle} key with the symbol \cs{relbar} \symb{\relbar}. The trimming
-% should also be adapted:
+% \symb{\relbareda} from the \pkg{esvect} package\footnote{Except if the
+% \pkg{unicode-math} package is used with a math font that provides the
+% \cs{harrowextender} symbol (see the \refKey*{middle config}|=auto| key).}.
+% If needed, try to set the \refKey{middle} key with the symbol \cs{relbar}
+% \symb{\relbar}. The trimming should also be adapted:
 % \iffalse
 %<*example>
 % \fi
 \csundef{overhooktwoheadrightarrow}
 \begin{dispExample}
-\NewOverArrowCommand{overhooktwoheadrightarrow}{%
-  start=\lhook, end=\twoheadrightarrow, middle=\relbar, %
+\NewOverArrowCommand{\overhooktwoheadrightarrow}{%
+  start=\lhook, end=\twoheadrightarrow, middle=\relbar,
   trim start=0, trim end=3, trim middle=5,
 }
 $ \overhooktwoheadrightarrow{v} \qquad \overhooktwoheadrightarrow{AB} $
@@ -500,7 +512,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\TestOverArrow{overhooktwoheadrightarrow}
+\TestOverArrow{\overhooktwoheadrightarrow}
 \end{dispExample}
 % \iffalse
 %</example>
@@ -514,7 +526,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{OverRightarrow}{%
+\NewOverArrowCommand{\OverRightarrow}{%
   start=\Relbar,
   middle=\Relbar,
   end=\Rightarrow,
@@ -535,7 +547,7 @@
 % \fi
 \csundef{OverRightarrow}
 \begin{dispExample}
-\NewOverArrowCommand{OverRightarrow}{%
+\NewOverArrowCommand{\OverRightarrow}{%
   start={\smallermathstyle\Relbar},
   middle={\smallermathstyle\Relbar},
   end=\Rightarrow,
@@ -557,7 +569,7 @@
 % \fi
 \csundef{OverRightarrow}
 \begin{dispExample}
-\NewOverArrowCommand{OverRightarrow}{%
+\NewOverArrowCommand{\OverRightarrow}{%
   start={\smallermathstyle\Relbar},
   middle={\smallermathstyle\Relbar},
   end=\Rightarrow,
@@ -579,7 +591,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{OverLeftarrow}{%
+\NewOverArrowCommand{\OverLeftarrow}{%
   start={\smallermathstyle\Leftarrow},
   middle={\smallermathstyle\Relbar},
   end=\Relbar,
@@ -601,7 +613,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{OverLeftRightarrow}{%
+\NewOverArrowCommand{\UnderLeftRightarrow}{%
   start={\smallermathstyle\Leftarrow},
   middle={\smallermathstyle\Relbar},
   end=\Rightarrow,
@@ -610,7 +622,7 @@
   space before arrow=0.5ex,
   shift left=0, shift right=0,
 }
-$ \OverLeftRightarrow{v} \qquad \OverLeftRightarrow{AB} $
+$ \UnderLeftRightarrow{v} \qquad \UnderLeftRightarrow{AB} $
 \end{dispExample}
 % \iffalse
 %</example>
@@ -650,7 +662,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{overtttailrightarrow}{%
+\NewOverArrowCommand{\overtttailrightarrow}{%
   start={\tttail},
   end={\rightarrow},
   trim start=12,
@@ -683,7 +695,7 @@
 % \fi
 \csundef{overtttailrightarrow}
 \begin{dispExample}
-\NewOverArrowCommand{overtttailrightarrow}{%
+\NewOverArrowCommand{\overtttailrightarrow}{%
   start={\vcenter{\hbox{$\smallermathstyle\tttail$}}},
   end={\rightarrow},
   trim start=12,
@@ -710,7 +722,7 @@
 \begin{dispExample}
 \newcommand*{\leftarrowhead}{\usefont{U}{lasy}{m}{n}\symbol{40}}
 \newcommand*{\righttarrowhead}{\usefont{U}{lasy}{m}{n}\symbol{41}}
-\NewOverArrowCommand{overrightleftarrow}{%
+\NewOverArrowCommand{\overrightleftarrow}{%
   start=\text{\righttarrowhead},
   end=\text{\leftarrowhead},
   trim start=0.7,  trim end=0.7,
@@ -751,7 +763,7 @@
 % \medskip
 %
 % To use PGF/TikZ language, the optional argument |tikz| must be passed to
-% \refCom{NewOverArrowCommand} . TikZ picture are not extensible. That's why the
+% \refCom{NewOverArrowCommand}. TikZ pictures are not extensible. That's why the
 % \pkg{overarrows} package provides three lengths that can be used in TikZ
 % commands:
 % \begin{itemize}
@@ -767,7 +779,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand[tikz]{overtikzarrow}{}
+\NewOverArrowCommand[tikz]{\overtikzarrow}{}
 $ \overtikzarrow{v} \qquad \overtikzarrow{AB} $
 \end{dispExample}
 % \iffalse
@@ -791,7 +803,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand[tikz]{overarchedleftrightarrow}{%
+\NewOverArrowCommand[tikz]{\overarchedleftrightarrow}{%
   add tikz options={y=\overarrowlength},
   add tikz options={line width={\overarrowsmallerthickness}},
   path options={arrows={<[scale=0.5]->[scale=0.5]}},
@@ -807,20 +819,72 @@
 %</example>
 % \fi
 %
+% \subsection{Drawing the arrow with PSTricks}
+%
+% In addition to PGF/TikZ, the arrow can be drawn with PSTricks macros.
+% For this, the optional argument |pstricks| must be passed to
+% \refCom{NewOverArrowCommand}. Like with
+% |tikz|, the three lengths \refCom{overarrowlength}, \refCom{overarrowthickness}
+% and \refCom{overarrowsmallerthickness} can be used in PSTricks commands.
+% By default, a right arrow is drawn:
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\NewOverArrowCommand[pstricks]{\overpstarrow}{}
+$ \overpstarrow{v} \qquad \overpstarrow{AB} $
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+% \noindent The \pkg{pstricks} package has to be loaded (for example, using the
+% \refOpt{pstricks} option of the \pkg{overarrows} package)
+%
+% Keys to use PSTricks commands are described in section~\ref{sec:pstricks-keys},
+% page~\pageref{sec:pstricks-keys}. The main keys are \refKey{pstricks command},
+% \refKey{psset}, \refDoc{key:pstricks}{arrow}, \refDoc{key:pstricks}{geometry}
+% an \refDoc{key:pstricks}{line thickness}. Examples:
+% \iffalse
+%<*example>
+% \fi
+\begin{dispExample}
+\NewOverArrowCommand[pstricks]{\overreddisks}{%
+  psset={linecolor=red}, arrow=*-*, center arrow,
+}
+$ \overreddisks{v} \qquad \overreddisks{AB} $
+\end{dispExample}
+\begin{dispExample}
+\NewOverArrowCommand[pstricks]{\ellipticarrow}{%
+  pstricks command={%
+    \psellipticarcn{->}%^^A avoid space before coordinates
+    (0.5\overarrowlength,0.2\overarrowlength)%^^A avoid space before coordinates
+    (0.5\overarrowlength,0.2\overarrowlength)
+    {170}{10}
+  },
+  geometry={(0,0.2\overarrowlength)(\overarrowlength,0.4\overarrowlength)},
+  line thickness={\overarrowsmallerthickness},
+  center arrow,
+}
+$ \ellipticarrow{v} \qquad \ellipticarrow{AB} $
+\end{dispExample}
+% \iffalse
+%</example>
+% \fi
+%
 % \subsection{Drawing the arrow with \LaTeX{} picture environment}
 %
-% As well as TikZ, the \LaTeX{} |picture| environment can be used to draw the
-% arrow. For this, the optional argument |picture| must be passed to
-% \refCom{NewOverArrowCommand}. Like for TikZ, the three lengths
-% \refCom{overarrowlength}, \refCom{overarrowthickness} and
-% \refCom{overarrowsmallerthickness} can be used in |picture| commands.
-% By default, a right vector is drawn:
+% Without any other package, arrows can also be drawn with the \LaTeX{}
+% |picture| environment. In this case, the optional argument |picture| must be
+% passed to \refCom{NewOverArrowCommand}. As with |tikz| or |pstricks|, the
+% three lengths \refCom{overarrowlength}, \refCom{overarrowthickness} and
+% \refCom{overarrowsmallerthickness} are available and can be used in
+% |picture| drawing commands. By default, a right vector is drawn:
 % \iffalse
 %<*example>
 % \fi
 \ltxarrows%^^A classic arrows
 \begin{dispExample}
-\NewOverArrowCommand[picture]{overpictarrow}{}
+\NewOverArrowCommand[picture]{\overpictarrow}{}
 $ \overpictarrow{v} \qquad \overpictarrow{AB} $
 \end{dispExample}
 % \iffalse
@@ -835,7 +899,7 @@
 \pstarrows%^^A pst arrows
 \csundef{overpictarrow}
 \begin{dispExample}
-\NewOverArrowCommand[picture]{overpictarrow}{}
+\NewOverArrowCommand[picture]{\overpictarrow}{}
 $ \overpictarrow{v} \qquad \overpictarrow{AB} $
 \end{dispExample}
 % \iffalse
@@ -844,13 +908,13 @@
 %
 % Keys to use \LaTeX{} |picture| environment are described in
 % section~\ref{sec:picture-keys}, page~\pageref{sec:picture-keys}. The main keys
-% are \refKey{picture command}, \refKey{geometry} an \refDoc{key:picture}{line
-% thickness}. Here is an example:
+% are \refKey{picture command}, \refDoc{key:picture}{geometry} an
+% \refDoc{key:picture}{line thickness}. Here is an example:
 % \iffalse
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand[picture]{overbandedarrow}{
+\NewOverArrowCommand[picture]{\overbandedarrow}{
   picture command={%
     \qbezier
     (0.0\overarrowlength,0)
@@ -875,7 +939,6 @@
 % \subsection{Package options}
 % \label{sec:package-options}
 %
-%
 % The \pkg{overarrows} package accepts many options, given as a comma-separated
 % list \meta{options} at package loading:
 % \cs{usepackage}|[|\meta{options}|]{overarrows}|.
@@ -889,7 +952,8 @@
 % \begin{docOption}{esvect}
 %   Loads the \pkg{esvect} package and redefines its vector commands \refCom{vv}
 %   through the \pkg{overarrows} mechanism. Original \pkg{esvect} \cs{vv} macro
-%   is still available with \refCom{esvectvv}.
+%   is still available with \refCom{esvectvv}. The \pkg{esvect} font description
+%   is fixed to allow any font sizes.
 %
 %   The \pkg{esvect} package provides the symbol \cs{relbareda} \symb{\relbareda}
 %   which is smaller and often more flexible than the classic one \cs{relbar}
@@ -1098,6 +1162,16 @@
 %   library are loaded independently.
 % \end{docOption}
 %
+% \begin{docOption}{pstricks}
+%   Loads the package \pkg{pstricks-add}.
+%
+%   Note that, as it, this will compile with \LaTeX{}, \LuaLaTeX{} and
+%   \XeLaTeX{}, but not with \makebox{pdf\LaTeX} (see the PSTricks
+%   documentation). PSTricks arrows, drawn with the |pstricks| method, are
+%   always available, even if this option is not set, provided the
+%   \pkg{pstricks} package is loaded independently.
+% \end{docOption}
+%
 % \begin{docOption}{pstarrows}
 %   Loads the \pkg{pict2e} package, with its option |pstarrows|. Vectors using
 %   \LaTeX{} |picture| environment gives then \pstarrows$\overpictarrow{AB}$
@@ -1117,6 +1191,7 @@
 % \end{docOption}
 %
 % \begin{docOption}{subother}
+%   \tcbdocmarginnote{\tcbdocnew{v1.1 2023/02/15}}
 %   Sets to 12 (\emph{other} catcode category) the catcode of the ``|_|" symbol
 %   used for subscript detection, when this is enabled by the key \refKey{detect
 %   subscripts} (see the section~\ref{sec:non-standard-subscripts},
@@ -1124,6 +1199,7 @@
 % \end{docOption}
 %
 % \begin{docOption}{subactive}
+%   \tcbdocmarginnote{\tcbdocnew{v1.1 2023/02/15}}
 %   Sets to 13 (\emph{active} catcode category) the catcode of the ``|_|" symbol
 %   used for subscript detection, when this is enabled by the key \refKey{detect
 %   subscripts} (see the section~\ref{sec:non-standard-subscripts},
@@ -1142,39 +1218,43 @@
 % \begin{docCommands}{%
 %   {
 %     doc name=NewOverArrowCommand,
-%     doc parameter=\oarg{method}\marg{name}\marg{keys},
+%     doc parameter=\oarg{method}\marg{command}\marg{keys},
 %   },
 %   {
 %     doc name=RenewOverArrowCommand,
-%     doc parameter=\oarg{method}\marg{name}\marg{keys},
+%     doc parameter=\oarg{method}\marg{command}\marg{keys},
 %   },
 %   {
 %     doc name=ProvideOverArrowCommand,
-%     doc parameter=\oarg{method}\marg{name}\marg{keys},
+%     doc parameter=\oarg{method}\marg{command}\marg{keys},
 %   },
 %   {
 %     doc name=DeclareOverArrowCommand,
-%     doc parameter=\oarg{method}\marg{name}\marg{keys},
+%     doc parameter=\oarg{method}\marg{command}\marg{keys},
 %   },
 % }
-%   Creates the command \cs{\meta{name}} and its starred variant
-%   \cs{\meta{name}*}. The starred variant \cs{\meta{name}*} removes the extra
+%   Creates the command \meta{command} and its starred variant
+%   \meta{command}|*|. The starred variant \meta{command}|*| removes the extra
 %   end space generated by the arrow, which is suitable, as example, when
 %   a subscript follows.
 %
+%   \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+%   \meta{command} can be given with or without backslash (prior to the version
+%   1.2, only the name, without backslash, was accepted).
+%
 % \begin{description}
-%   \item[\cs{NewOverArrowCommand}] raises an error if \cs{\meta{name}} is
-%   already defined.
+%   \item[\cs{NewOverArrowCommand}] raises an error if \meta{command} is
+%     already defined.
 %
-%   \item[\cs{RenewOverArrowCommand}] raises an error if \cs{\meta{name}} is undefined.
+%   \item[\cs{RenewOverArrowCommand}] raises an error if \meta{command}
+%     is undefined.
 %
-%   \item[\cs{ProvideOverArrowCommand}] sets \cs{\meta{name}} if the command is
-%   undefined and does nothing if it is already defined, without raising
-%   any error.
+%   \item[\cs{ProvideOverArrowCommand}] sets \meta{command} if the command is
+%     undefined and does nothing if it is already defined, without raising
+%     any error.
 %
-%   \item[\cs{DeclareOverArrowCommand}] sets \cs{\meta{name}}, whether the
-%   command is already defined
-%   or not, without raising any error.
+%   \item[\cs{DeclareOverArrowCommand}] sets \meta{command}, whether the command
+%     is already defined or not, without raising any error.
 %   \end{description}
 %
 %   The \meta{method} used to draw the arrow must be:
@@ -1181,6 +1261,8 @@
 %   \begin{description}
 %    \item[|symb|] to draw the arrow by symbols assemblage (default);
 %    \item[|tikz|] to draw the arrow with PGF/TikZ;
+%    \item[|pstricks|] to draw the arrow with PSTricks;
+%     \tcbdocmarginnote{\tcbdocnew{v1.2 2024/07/11}}
 %    \item[|picture|] to draw the arrow with the \LaTeX{}
 %     |picture| environment.
 %   \end{description}
@@ -1196,7 +1278,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand[tikz]{myoverarrow}{arrows={Bar-Bar}, center arrow}
+\NewOverArrowCommand[tikz]{\myoverarrow}{arrows={Bar-Bar}, center arrow}
 $ \myoverarrow{v} \qquad \myoverarrow{ABCD} $
 \end{dispExample}
 % \iffalse
@@ -1207,20 +1289,24 @@
 % \begin{docCommands}{%
 %   {
 %     doc name=TestOverArrow,
-%     doc parameter=\oarg{pattern}\marg{name},
+%     doc parameter=\oarg{pattern}\marg{command},
 %   },
 %   {
 %     doc name=TestOverArrow*,
-%     doc parameter=\oarg{pattern}\marg{name},
+%     doc parameter=\oarg{pattern}\marg{command},
 %   },
 % }
-%   Displays the result of the command \meta{name} for patterns of various
+%   Displays the result of the command \meta{command} for patterns of various
 %   lengths and for the four math styles. A custom \meta{pattern} can be added
 %   to the predefined ones.
 %
 %   The starred variant \cs{TestOverArrow*} displays a full report, including
-%   kerning tests of the commands \cs{\meta{name}} and \cs{\meta{name}*} .
+%   kerning tests of the commands \meta{command} and \meta{command}|*|.
 %
+%   \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+%   \meta{command} can be given with or without backslash (prior to the version
+%   1.2, only the name, without backslash, was accepted).
+%
 % \iffalse
 %<*example>
 % \fi
@@ -1261,9 +1347,9 @@
 % \begin{docCommand}{smallermathstyle}{}
 %   Applies the next math style, smaller than the current. That is:
 % \begin{itemize}
-%     \item sets \cs{scriptstyle} if the current math style is \cs{displaystyle}
+%     \item uses \cs{scriptstyle} if the current math style is \cs{displaystyle}
 %           or \cs{textstyle};
-%     \item sets \cs{scriptscriptstyle} if the current math style is
+%     \item uses \cs{scriptscriptstyle} if the current math style is
 %           \cs{scriptstyle};
 %     \item does nothing if the current math style is \cs{scriptscriptstyle}.
 % \end{itemize}
@@ -1283,19 +1369,20 @@
 %
 % \end{docCommand}
 %
-% \subsubsection{Useful lengths for TikZ or \texttt{picture} environment}
+% \subsubsection{Useful lengths for TikZ, PSTricks or \texttt{picture} environment}
 %
-% Arrows drawn with graphic languages, like PGF/TikZ or the \LaTeX{} |picture|
-% environment, are not extensible. The three lengths \refLen*{overarrowlength},
-% \refLen*{overarrowthickness} and \refLen*{overarrowsmallerthickness} are
-% computed at each utilisation of a command set with the |tikz| or |picture|
-% method, so they can be used in drawing commands.
+% Arrows drawn with graphic languages, like PGF/TikZ, PSTricks or the \LaTeX{}
+% |picture| environment, are not extensible. The three lengths
+% \refLen*{overarrowlength}, \refLen*{overarrowthickness} and
+% \refLen*{overarrowsmallerthickness} are computed at each utilisation of
+% a command set with the |tikz|, |pstricks| or |picture| method, so they can be
+% used in drawing commands.
 %
 % \iffalse
 %<*example>
 % \fi
 \begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand[tikz]{overparabola}{%
+\NewOverArrowCommand[tikz]{\overparabola}{%
   path options={x=\overarrowlength, line width=\overarrowsmallerthickness},
   path={(0,0) parabola[parabola height=0.2\overarrowlength] (1,0)},
   arrows={-}, center arrow, min length=30,
@@ -1320,8 +1407,13 @@
 %    \item |\fontdimen 8 \scriptscriptfont 3| in
 %     \cs{scriptscriptstyle}.
 %   \end{itemize}
+%
+%   \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+%   Theses settings are adapted when the package \pkg{unicode-math} is loaded
+%   (using \cs{Umathoverbarrule} with \LuaLaTeX{} or |\fontdimen 54|, family~2
+%   with \XeLaTeX{} --- see the manual of \pkg{unicode-math}).
 % \end{docLength}
-%   
+%
 %  \begin{docLength}{overarrowsmallerthickness}
 %    Is set to the default rule thickness of the next smaller math style.
 %    That is:
@@ -1330,6 +1422,11 @@
 %     \item |\fontdimen 8 \scriptscriptfont 3| in \cs{scriptstyle} or
 %      \cs{scriptscriptstyle}.
 %    \end{itemize}
+%
+%   \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+%   Theses settings are adapted when the package \pkg{unicode-math} is loaded
+%   (using \cs{Umathoverbarrule} with \LuaLaTeX{} or |\fontdimen 54|, family~2
+%   with \XeLaTeX{} --- see the manual of \pkg{unicode-math}).
 %  \end{docLength}
 %
 % \subsubsection{Vectors macros}
@@ -1507,8 +1604,9 @@
 % page~\pageref{sec:macro-for-commands-creation} for the documentation of
 % commands creation):
 % \begin{itemize}
-%  \item \meta{number}| = 0 | for the |symb| method (default);
+%  \item \meta{number}| = 0 | for the |symb| method (method by default);
 %  \item \meta{number}| = 12| for the |tikz| method;
+%  \item \meta{number}| = 12| for the |pstricks| method;
 %  \item \meta{number}| = 18| for the |picture| method.
 % \end{itemize}
 %
@@ -1516,7 +1614,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{overlongarrow}{min length=50}
+\NewOverArrowCommand{\overlongarrow}{min length=50}
 $ \overlongarrow{v} \qquad \overlongarrow{ABCDEF} $
 \end{dispExample}
 % \iffalse
@@ -1550,7 +1648,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{underhooks}{%
+\NewOverArrowCommand{\underhooks}{%
   start={\lhook}, end={\rhook},  trim=1,
   arrow under, shift leftright=-4,
 }
@@ -1580,8 +1678,8 @@
 % page~\pageref{sec:macro-for-commands-creation} for the documentation of
 % commands creation):
 % \begin{itemize}
-%  \item \meta{number}| = 0 | for the |symb| method  (default);
-%  \item \meta{number}| = -2| for the |tikz| and |picture| methods.
+%  \item \meta{number}| = 0 | for the |symb| method (method by default);
+%  \item \meta{number}| = -2| for the |tikz|, |pstricks| and |picture| methods.
 % \end{itemize}
 %
 %\end{docKey}
@@ -1590,7 +1688,7 @@
 %<*example>
 % \fi
 \begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand{lookback}{%
+\NewOverArrowCommand{\lookback}{%
   start={\leftarrow}, end={\rightharpoondown},
   shift left=-50, shift right=-10,
 }
@@ -1658,7 +1756,7 @@
 %<*example>
 % \fi
 \begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand{overharpoonsdown}{%
+\NewOverArrowCommand{\overharpoonsdown}{%
   start=\leftharpoondown, end=\rightharpoondown, center arrow,
   space before arrow=-0.2ex, space after arrow=0.3ex,
 }
@@ -1693,7 +1791,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{autosub}{detect subscripts}
+\NewOverArrowCommand{\autosub}{detect subscripts}
 $ \imath_0 \qquad \autosub{\imath}_0 \qquad
  {\autosub{\imath}}_0 \qquad {\autosub*{\imath}}_0 $
 \end{dispExample}
@@ -1745,7 +1843,7 @@
 %<*example>
 % \fi
 \begin{dispExample}
-\NewOverArrowCommand{smalleroverrightarrow}{%
+\NewOverArrowCommand{\smalleroverrightarrow}{%
   start={\smallermathstyle\relbar},
   middle={\smallermathstyle\relbareda},
   end={\rightarrow},
@@ -1784,16 +1882,26 @@
 %   Clears \refKey{trim start}, \refKey{trim middle} and \refKey{trim end}.
 % \end{docKey}
 %
-%\begin{docKey}{middle config}{=auto\textbar relbar\textbar relbareda}{no default}
-%  Sets a suitable configuration for the keys \refKey{middle} and \refKey{trim middle}:
+%\begin{docKey}{middle config}{=auto\textbar relbar\textbar relbareda\textbar harrowextender}{no default}
+%  Sets a suitable configuration for the keys \refKey{middle} and \refKey{trim
+%  middle}:
 %  \begin{description}
-%   \item[For \refKey*{middle config}| = relbar|,] \refKey{middle} is set to
-%    \cs{relbar} \symb{\relbar} and \refKey{trim middle} to |2.5|.
-%   \item[For \refKey*{middle config}| = relbareda|,] \refKey{middle} is set to
-%    \cs{relbareda} \symb{\relbareda} and \refKey{trim middle} to |1|.
-%   \item[For \refKey*{middle config}| = auto|,] \refKey{middle} is set with
-%   \refKey*{middle config}| = relabareda| if the option \refOpt{esvect} is set
-%   (which is the default) and \refKey*{middle config}| = relabar| if not.
+%    \item[For \refKey*{middle config}| = relbar|,] \refKey{middle} is set to
+%      \cs{relbar} \symb{\relbar} and \refKey{trim middle} to |2.5|.
+%    \item[For \refKey*{middle config}| = relbareda|,] \refKey{middle} is set to
+%      \cs{relbareda} \symb{\relbareda} and \refKey{trim middle} to |1|.
+%    \item[For \refKey*{middle config}| = harrowextender|,]
+%     \tcbdocmarginnote{\tcbdocnew{v1.2 2024/07/11}}
+%     \refKey{middle} is set to \cs{harrowextender} and \refKey{trim middle} to
+%      |0|.
+%    \item[For \refKey*{middle config}| = auto|,]
+%      \tcbdocmarginnote{\tcbdocupdated{v1.2 2024/07/11}}
+%      if \cs{harrowextender} is provided by the math font\footnote{See the
+%      documentation of the package \pkg{unicode-math}.}, \refKey{middle} is set
+%      with \refKey*{middle config}| = harrowextender|. If \cs{harrowextender}
+%      isn't availlable, \refKey{middle} is set with \refKey*{middle config}%
+%      | = relbareda| if the option \refOpt{esvect} is set (which is the
+%      default) and \refKey*{middle config}| = relabar| if not.
 %   \end{description}
 %\end{docKey}
 %
@@ -1880,14 +1988,14 @@
 % commands creation), the |tikz| method is chosen, then the arrow is drawn by
 % the command:
 % \begin{center}
-%   \cs{tikz}|[|\refKey*{tikz options}|]{|\refKey*{tikz command}|}|
+%   \cs{tikz}|[<|\refKey*{tikz options}|>]{<|\refKey*{tikz command}|>}|
 % \end{center}
 % \noindent where \refKey{tikz options} and \refKey{tikz command} are two keys
 % described below. When \refKey*{tikz command} is let unset, the drawing command
 % turns into:
 % \begin{center}
-%   \cs{tikz}|[|\refKey*{tikz options}|]{|\cs{draw}|[|\refKey*{path options}|]|
-%   \refKey*{path}|;}|
+%   \cs{tikz}|[<|\refKey*{tikz options}|>]{|\cs{draw}|[<|\refKey*{path options}|>]|
+%   |<|\refKey*{path}|>;}|
 % \end{center}
 %
 % The best way to customise |tikz| arrows is then to set the keys \refKey{tikz
@@ -1899,7 +2007,7 @@
 %<*example>
 % \fi
 \begin{dispExample*}{grow to left by=-2em}
-\NewOverArrowCommand[tikz]{overdotteddoublearrow}{%
+\NewOverArrowCommand[tikz]{\overdotteddoublearrow}{%
   add tikz options={blue}, add path options={densely dotted},
   arrows={->[scale=0.5]>[scale=0.5]}, thinner,
   min length=20, space after arrow={0.3ex},
@@ -1910,9 +2018,11 @@
 %</example>
 % \fi
 %
+% \bigskip
+%
 % The following keys are available when the |tikz| method is chosen.
 %
-% \begin{docKey}[][before lower=\medskip\par]
+% \begin{docKey}[][before lower=\bigskip\par]
 % {tikz options}{=\marg{TikZ options}}
 % {no default, initially |x=|\cs{overarrowlength}|, line
 % width=|\cs{overarrowthickness}}
@@ -1919,7 +2029,7 @@
 %   Sets TikZ options to \meta{TikZ options}.
 %\end{docKey}
 %
-% \begin{docKey}[][before lower=\medskip\par]
+% \begin{docKey}[][before lower=\bigskip\par]
 % {path options}{=\marg{path options}}
 % {no default, initially |arrows={-Classical TikZ Rightarrow}, cap=round|}
 %   Sets TikZ path options to \meta{path options}.
@@ -1957,6 +2067,87 @@
 %   value \cs{draw}|[|\refKey*{path options}|] |\refKey*{path}|;| is used.
 %\end{docKey}
 %
+% \subsubsection{PSTricks settings}
+% \label{sec:pstricks-keys}
+%
+% \tcbdocmarginnote{\tcbdocnew{v1.2 2024/07/11}}
+% If, at command creation (see section~\ref{sec:macro-for-commands-creation},
+% page~\pageref{sec:macro-for-commands-creation} for the documentation of
+% commands creation), the |pstricks| method is chosen, then the arrow is drawn
+% by:
+% \begin{flushleft}\leftskip=3cm
+%   \cs{begin}|{pspicture}<|\refDoc{key:pstricks}*{geometry}|>%|\\
+%    \quad\cs{psset}|{linewidth=<|\refDoc{key:pstricks}*{line thickness}|>}%|\\
+%    \quad\cs{psset}|{<|\refKey*{psset}|>}%|\\
+%    \quad|<|\refKey*{pstricks command}|>%|\par
+%   \cs{end}|{pspicture}%|
+% \end{flushleft}
+% \noindent where \refDoc{key:pstricks}{geometry}, \refDoc{key:pstricks}{line
+% thickness} \refKey*{psset} and \refKey*{pstricks command} are four keys
+% described below.
+%
+%\iffalse
+%<*example>
+% \fi
+\begin{dispExample*}{grow to left by=-2em}
+\NewOverArrowCommand[pstricks]{\overloopandarrow}{
+  pstricks command={%
+    \pscurve{->}(0,0)
+    (0.6\overarrowlength,0.05\overarrowlength)
+    (0.5\overarrowlength,0.1\overarrowlength)
+    (0.4\overarrowlength,0.05\overarrowlength)
+    (\overarrowlength,0)
+  },
+  geometry={(0,0)(\overarrowlength,0.2\overarrowlength)},
+  space after arrow=2pt, min length=20,
+  geometry={(0,0)(\overarrowlength,0.2\overarrowlength)},
+}
+$ \overloopandarrow{v} \qquad \overloopandarrow{AB} $
+\end{dispExample*}
+% \iffalse
+%</example>
+% \fi
+%
+% \bigskip
+%
+% The following keys are available when the |pstricks| method is chosen.
+%
+% \begin{docKey}[][before lower=\bigskip\par]
+% {pstricks command}{=\marg{pstricks command}}
+% {no default, initially \cs{psline}|\{->\}(0,0)(|\refCom*{overarrowlength}|,0)|}
+%  Sets the |pspicture| command to \meta{pstricks command}.
+% \end{docKey}
+%
+% \begin{docKey}[][doc label={pstricks:arrow}]%^^A same name as for TikZ
+% {arrow}{=\marg{arrow}}
+% {no default, initially |->|}
+% Sets \refKey{pstricks command} with
+% |\psline{|\meta{arrow}|}(0,0)(|\refCom*{overarrowlength}|,0)|.
+% \end{docKey}
+%
+% \begin{docKey}[][]
+% {psset}{=\marg{pstricks setting}}
+% {no default, initially empty}
+%  Sets \meta{pstricks setting} with \cs{psset}.
+% \end{docKey}
+%
+% \begin{docKey}[][before lower=\bigskip\par, doc label={pstricks:geometry}]%^^A same name as for picture
+% {geometry}{=\marg{pstricks geometry specification}}
+% {no default, initially |(0,-0.5ex)(|\refCom*{overarrowlength}|,1ex)|}
+%   Sets the |pspicture| geometry to \meta{pstricks geometry specification}.
+% \end{docKey}
+%
+% \begin{docKey}[][doc label={pstricks:line thickness}]%^^A same name as for TikZ
+% {line thickness}{=\marg{length}}{no default}
+% Sets the line thickness to \meta{length}.
+% \end{docKey}
+%
+% \begin{docKey}[][doc label={pstricks:thinner}]%^^A same name as for TikZ
+% {thinner}{}{}
+% Sets the keys \refDoc{key:pstricks}{line thickness} with
+% \cs{overarrowsmallerthickness}.
+% \end{docKey}
+%
 % \subsubsection{Picture environment settings}
 % \label{sec:picture-keys}
 %
@@ -1963,15 +2154,15 @@
 % If, at command creation (see section~\ref{sec:macro-for-commands-creation},
 % page~\pageref{sec:macro-for-commands-creation} for the documentation of
 % commands creation), the |picture| method is chosen, then the arrow is drawn
-% with by:
+% by:
 % \begin{flushleft}\leftskip=3cm
-%   \cs{begin}|{picture}|\refKey*{geometry}|%|\\
-%    \quad\cs{linethickness}|{|\refDoc{key:picture}*{line thickness}|}%|\\
-%    \quad\refKey*{picture command}|%|\par
+%   \cs{begin}|{picture}<|\refDoc{key:picture}*{geometry}|>%|\\
+%    \quad\cs{linethickness}|{<|\refDoc{key:picture}*{line thickness}|>}%|\\
+%    \quad|<|\refKey*{picture command}|>%|\par
 %   \cs{end}|{picture}%|
 % \end{flushleft}
-% \noindent where \refKey{geometry}, \refDoc{key:picture}{line thickness} and
-% \refKey*{picture command} are three keys described below.
+% \noindent where \refDoc{key:picture}{geometry}, \refDoc{key:picture}{line
+% thickness} and \refKey*{picture command} are three keys described below.
 %
 %\iffalse
 %<*example>
@@ -1979,7 +2170,7 @@
 \begin{dispExample*}{grow to left by=-2em}
   % ^^A \arc and \roundcap commands are from the pict2e package
   % ^^A this example needs \usepackage{pict2e} in the preamble
-  \NewOverArrowCommand[picture]{overarc}{%
+  \NewOverArrowCommand[picture]{\overarc}{%
     picture command={%
       \roundcap
       \put(0.5\overarrowlength,0){\arc[180,0]{0.6\overarrowlength}}
@@ -1994,15 +2185,18 @@
 % \iffalse
 %</example>
 % \fi
-% The following keys are available when the |picture| method is chosen.
 %
-% \begin{docKey}[][before lower=\medskip\par]
+% \bigskip
+% 
+%The following keys are available when the |picture| method is chosen.
+%
+% \begin{docKey}[][before lower=\bigskip\par]
 % {picture command}{=\marg{picture command}}
 % {no default, initially \cs{put}|(0,0)\{|\cs{vector}|(1,0)\{|\refCom*{overarrowlength}|\}\}|}
 %   Sets picture command to \meta{picture command}.
 % \end{docKey}
 %
-% \begin{docKey}[][before lower=\medskip\par]
+% \begin{docKey}[][before lower=\bigskip\par, doc label={picture:geometry}]%^^A same name as for pstricks
 % {geometry}{=\marg{picture geometry specification}}
 % {no default, initially |(|\refCom*{overarrowlength}|,1ex)(0,-0.5ex)|}
 %   Sets picture geometry to \meta{picture geometry specification}.
@@ -2029,6 +2223,7 @@
 % \subsubsection{Advanced commands}
 %
 % \begin{docCommand}{SetOverArrowsSubscriptCommand}{\marg{command}}
+%   \tcbdocmarginnote{\tcbdocnew{v1.1 2023/02/15}}
 %   Sets to \meta{command} the command used for subscript detection, when this
 %   is enabled by the key \refKey{detect subscripts} (see the
 %   section~\ref{sec:non-standard-subscripts},
@@ -2131,6 +2326,12 @@
 % \symb{\relbareda} from the \pkg{esvect} package. This can be fixed with the
 % \refOpt{noesvect} option.
 %
+% Depending of the math font, predefined commands may be faulty. For example, at
+% the time of writing, hooks vertical position is incorrect with \emph{Asana
+% Math} or \cs{harrowextender} is badly positioned with \emph{Stix two Math}
+% (for the smallest math styles), \emph{Libertinus Math} and
+% \emph{GFSNeohellenicMath}.
+%
 % \subsubsection{Detection of non standard subscripts}
 % \label{sec:non-standard-subscripts}
 %
@@ -2225,11 +2426,25 @@
 %
 % \subsection{Changelog}
 %
-% \begin{description}
-%  \item[v1.1] Support for non-standard subscripts
-%  \item[v1.0.1] Bug fix for under* options.
-%  \item[v1.0] Initial version.
-% \end{description}
+% \begingroup
+% \renewcommand{\arraystretch}{2}
+% \begin{tabular*}{\linewidth}
+% {@{} l @{\extracolsep{\fill}} p{0.9\linewidth} @{}}
+% v1.2   & \noindent\par\vspace{-\baselineskip}
+%   \begin{itemize}[left=0pt, topsep=0pt, partopsep=0pt]
+%   \item Fix compatibility issues with \pkg{unicode-math}.
+%   \item Allow to draw the arrow with PSTricks.
+%   \item Make \pkg{esvect} handle all font sizes.
+%   \item Rewrite starred variant for better performances.
+%   \end{itemize}
+% \\
+%   v1.1 & Support for non-standard subscripts.
+% \\
+% v1.0.1 & Bug fix for under* options.
+% \\
+% v1.0   & Initial version.
+% \end{tabular*}
+% \endgroup
 %
 % \StopEventually{}
 %
@@ -2250,6 +2465,7 @@
 \newif\ifovar at option@oldarrows@
 \newif\ifovar at option@esvect@ \ovar at option@esvect at true \PassOptionsToPackage{f}{esvect}
 \newif\ifovar at option@tikz@
+\newif\ifovar at option@pstricks@
 \newif\ifovar at option@pstarrows@
 \newif\ifovar at detectsubscripts@
 \newif\ifovar at option@subother@
@@ -2280,6 +2496,8 @@
 %
 % \subsubsection*{Declaration of options}
 %
+% \changes{v1.2}{2024/07/11}{Add option pstricks}
+%
 %    \begin{macrocode}
 \DeclareOption{esvect}{\ovar at option@esvect at true}
 \DeclareOption{noesvect}{\ovar at option@esvect at false}
@@ -2293,6 +2511,7 @@
 \DeclareOption{esvecth}{\ovar at option@esvect at true\PassOptionsToPackage{h}{esvect}}
 \DeclareOption{old-arrows}{\ovar at option@oldarrows at true}
 \DeclareOption{tikz}{\ovar at option@tikz at true}
+\DeclareOption{pstricks}{\ovar at option@pstricks at true}
 \DeclareOption{pstarrows}{\ovar at option@pstarrows at true}
 \DeclareOption{subscripts}{\ovar at detectsubscripts@true}
 \DeclareOption{subother}{\ovar at option@subother at true}
@@ -2381,23 +2600,42 @@
 \RequirePackage{amsmath}
 \RequirePackage{etoolbox}
 %    \end{macrocode}
+%
 % Option \refOpt{old-arrows}. Configuration of arrows used for
 % predefined commands.
+% \changes{v1.2}{2024/07/11}{Use \cs{def} instead of \cs{let} for
+% \cs{ovar at rightarrow} and \cs{ovar at leftarrow}}
 %    \begin{macrocode}
-\let\ovar at rightarrow\rightarrow
-\let\ovar at leftarrow\leftarrow
+\def\ovar at rightarrow{\rightarrow}
+\def\ovar at leftarrow{\leftarrow}
 \ifovar at option@oldarrows@
   \RequirePackage[old]{old-arrows}
-  \let\ovar at rightarrow\varrightarrow
-  \let\ovar at leftarrow\varleftarrow
+  \def\ovar at rightarrow{\varrightarrow}
+  \def\ovar at leftarrow{\varleftarrow}
 \fi
 %    \end{macrocode}
+%
 % Option \refOpt{esvect}.
 %    \begin{macrocode}
 \ifovar at option@esvect@
   \RequirePackage{esvect}
+%    \end{macrocode}
+% \changes{v1.2}{2024/07/11}{Fix esvect font sizes}
+% Fix font description in |uesvect.fd| to allow any sizes (taken from Enrico
+% Gregorio, \url{https://tex.stackexchange.com/a/689863/})
+%    \begin{macrocode}
+  \DeclareFontFamily{U}{esvect}{}
+  \DeclareFontShape{U}{esvect}{m}{n}{
+    <-5.5> vect5
+    <5.5-6.5> vect6
+    <6.5-7.5> vect7
+    <7.5-8.5> vect8
+    <8.5-9.5> vect9
+    <9.5-> vect10
+  }{}
 \fi
 %    \end{macrocode}
+%
 % Option \refOpt{tikz}.
 %    \begin{macrocode}
 \ifovar at option@tikz@
@@ -2405,6 +2643,14 @@
   \usetikzlibrary{arrows.meta}
 \fi
 %    \end{macrocode}
+%
+% Option \refOpt{pstricks}.
+%    \begin{macrocode}
+\ifovar at option@pstricks@
+  \RequirePackage{pstricks-add}
+\fi
+%    \end{macrocode}
+%
 % Option \refOpt{pstarrows}.
 %    \begin{macrocode}
 \ifovar at option@pstarrows@
@@ -2412,6 +2658,43 @@
 \fi
 %    \end{macrocode}
 %
+% Add hook rules to apply settings after \pkg{unicode-math}.
+%    \begin{macrocode}
+\DeclareHookRule{begindocument}{overarrows}{after}{unicode-math-luatex}
+\DeclareHookRule{begindocument}{overarrows}{after}{unicode-math-xetex}
+%    \end{macrocode}
+%
+% \changes{v1.2}{2024/07/11}{Use \cs{harrowextender}, if availlable.}
+% Set \cs{ovar at auto@middle} and \cs{ovar at auto@trim at middle}, used by
+% configurations made with \refKey*{middle config}|=auto|.
+%    \begin{macrocode}
+\AddToHook{begindocument}[overarrows]
+  {%
+    \ifdef{\relbareda}
+      {%
+        \gdef\ovar at auto@middle{\relbareda}
+        \gdef\ovar at auto@trim at middle{1}
+      }
+      {%
+        \gdef\ovar at auto@middle{\relbar}
+        \gdef\ovar at auto@trim at middle{2.5}
+      }%
+    \@ifpackageloaded{unicode-math}
+      {%
+%    \end{macrocode}
+% Test of \cs{harrowextender} availability taken from Enrico Gregorio,
+% (\url{https://tex.stackexchange.com/a/218407/}).
+%    \begin{macrocode}
+        \check at mathfonts
+        \iffontchar\textfont\tw@\string"23AF
+          \gdef\ovar at auto@middle{\mathrel\harrowextender}
+          \gdef\ovar at auto@trim at middle{0}
+        \fi
+      }
+      {}%
+  }
+%    \end{macrocode}
+%
 % \subsection*{Configuration of subscripts detection}
 %
 % \changes{v1.1}{2023/02/15}{Support for non-standard subscripts}
@@ -2424,6 +2707,7 @@
 % \end{macro}
 %
 % Initial configuration.
+% \changes{v1.2}{2024/07/11}{Remove useless \cs{AtBeginDocument}}
 %    \begin{macrocode}
 \SetOverArrowsSubscriptCommand{_}
 %    \end{macrocode}
@@ -2432,7 +2716,7 @@
 \ifovar at option@subother@
   \begingroup
     \catcode `_=12
-    \AddToHook{begindocument/end}{\SetOverArrowsSubscriptCommand{_}}
+    \SetOverArrowsSubscriptCommand{_}%
   \endgroup
 \fi
 %    \end{macrocode}
@@ -2441,7 +2725,7 @@
 \ifovar at option@subactive@
   \begingroup
     \catcode `_=13
-    \AddToHook{begindocument/end}{\SetOverArrowsSubscriptCommand{_}}
+    \SetOverArrowsSubscriptCommand{_}%
   \endgroup
 \fi
 %    \end{macrocode}
@@ -2662,12 +2946,25 @@
       }
     }
   },
+%    \end{macrocode}
+% \changes{v1.2}{2024/07/11}{Add config \refKey*{middle config}|=harrowextender|}
+%    \begin{macrocode}
+  middle config/harrowextender/.code={%
+    \pgfkeysalso{%
+      middle={\harrowextender},
+      trim middle={0},
+    }
+  },
+%    \end{macrocode}
+% Set \refKey*{middle config} with (hopefully) a good configuration. It would be
+% better to reuse the previous \refKey*{middle config} settings, but we have to
+% wait for the |begindocument| hook to know which one to use.
+%    \begin{macrocode}
   middle config/auto/.code={%
-    \ifovar at option@esvect@
-    \pgfkeysalso{middle config=relbareda}
-    \else
-    \pgfkeysalso{middle config=relbar}
-    \fi
+    \pgfkeysalso{%
+      middle={\ovar at auto@middle},
+      trim middle={\ovar at auto@trim at middle},
+    }
   },
 %    \end{macrocode}
 % \refKey{amsmath}.
@@ -2775,6 +3072,59 @@
 }
 %    \end{macrocode}
 %
+% \subsubsection*{Keys for the \texttt{pstricks} method}
+%
+% \changes{v1.2}{2024/07/11}{Add the method pstricks}
+%
+%    \begin{macrocode}
+\SetOverArrowsMethod[lens]{pstricks}{%
+%    \end{macrocode}
+% Arrow macro.
+%    \begin{macrocode}
+  no arrow macro hook/.code={%
+    \ovar at set{%
+      arrow macro/.expanded={%
+        $\noexpand\mkern \expandonce{\ovar at shift@left} mu\noexpand\relax$%
+        \noexpand\begin{pspicture}\expandonce{\ovar at pstricks@geometry}%
+          \noexpand\psset{linewidth=\expandonce{\ovar at pstricks@linethickness}}%
+          \noexpand\psset{\expandonce{\ovar at pstricks@psset}}%
+          \expandonce{\ovar at pstricks@command}%
+        \noexpand\end{pspicture}%
+        $\noexpand\mkern \expandonce{\ovar at shift@right} mu\noexpand\relax$%
+      }
+    }
+  },
+%    \end{macrocode}
+% Pstricks parts: \refKey{pstricks command}, \refKey{psset},
+% \refDoc{key:pstricks}{geometry}, \refDoc{key:pstricks}{line thickness}.
+%    \begin{macrocode}
+  pstricks command/.store in=\ovar at pstricks@command,
+  psset/.store in=\ovar at pstricks@psset,
+  geometry/.store in=\ovar at pstricks@geometry,
+  line thickness/.store in=\ovar at pstricks@linethickness,
+  pstricks command/.value required,
+  psset/.value required,
+  geometry/.value required,
+  line thickness/.value required,
+%    \end{macrocode}
+% Pstricks handy key: \refDoc{key:pstricks}{arrow}, \refDoc{key:pstricks}{thinner}.
+%    \begin{macrocode}
+  arrow/.style={pstricks command={\psline{##1}(0,0)(\overarrowlength,0)}},%
+  arrow/.value required,%
+  thinner/.style={line thickness={\overarrowsmallerthickness}},%
+  thinner/.value forbidden,%
+%    \end{macrocode}
+% Initial configuration.
+%    \begin{macrocode}
+  shift right=-2,
+  min length=12,
+  geometry={(0,-0.5ex)(\overarrowlength,0.5ex)},%
+  line thickness={\overarrowthickness},%
+  arrow={->},%
+  psset={},%
+}
+%    \end{macrocode}
+%
 % \subsubsection*{Keys for the \texttt{picture} method}
 %
 %    \begin{macrocode}
@@ -2795,7 +3145,7 @@
     }
   },
 %    \end{macrocode}
-% Picture parts: \refKey{picture command}, \refKey{geometry},
+% Picture parts: \refKey{picture command}, \refDoc{key:picture}{geometry},
 % \refDoc{key:picture}{line thickness}.
 %    \begin{macrocode}
   picture command/.store in=\ovar at picture@command,
@@ -2831,9 +3181,9 @@
     Previous definition will be overridden}
 }{}
 %    \end{macrocode}
-%  Use a default value of |3.5 mu|, as recommended by egreg (see
+% Use a default value of |3.5 mu|, as recommended by Enrico Gregorio (see
 %  \url{https://tex.stackexchange.com/a/471736}). \cs{joinrel}
-%  uses a value of 3 mu.
+% uses a value of 3 mu.
 %    \begin{macrocode}
 \DeclareRobustCommand{\xjoinrel}[1][3.5]{\mathrel{\mkern-#1mu}}
 %    \end{macrocode}
@@ -2872,7 +3222,6 @@
 \newlength{\overarrowlength}
 \newlength{\overarrowthickness}
 \newlength{\overarrowsmallerthickness}
-\newlength{\ovar at extralength}
 \newlength{\ovar at tempdim}
 %    \end{macrocode}
 %
@@ -2891,27 +3240,76 @@
 % \end{macro}
 %
 % \begin{macro}{\ovar at set@arrowthickness}
+% \begin{macro}{\ovar at set@arrowthickness at UM@lua}
 % Sets \refLen{overarrowthickness} and \refLen{overarrowsmallerthickness}.\\
-% |#1|: arrow length\\
-% |#2|: math style
+% |#1|: math style
+%
+% Set to the default rule thickness of the current math style, normaly given by
+% \cs{fontdimen} 8 family 3. With \pkg{unicode-math}, use instead:
+% \begin{itemize}
+%  \item \cs{fontdimen} 54 family 2 with XeTeX,
+%  \item \cs{Umathoverbarrule} with LuaTex.
+% \end{itemize}
+% \changes{v1.2}{2024/07/11}{Get the correct rule thickness with unicode-math}
 %    \begin{macrocode}
-\def\ovar at set@arrowthickness#1{% use rule thickness=\fontdimen 8 font family 3
+\def\ovar at rulethickness@fontdimen{8}
+\def\ovar at rulethickness@family{3}
+\def\ovar at set@arrowthickness#1{%
   \ifx#1\displaystyle%
-    \overarrowthickness =        \fontdimen 8 \textfont 3%
-    \overarrowsmallerthickness = \fontdimen 8 \scriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen  \textfont \ovar at rulethickness@family%
+    \overarrowsmallerthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptfont \ovar at rulethickness@family%
   \else\ifx#1\textstyle%
-    \overarrowthickness =        \fontdimen 8 \textfont 3%
-    \overarrowsmallerthickness = \fontdimen 8 \scriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \textfont \ovar at rulethickness@family%
+    \overarrowsmallerthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptfont \ovar at rulethickness@family%
   \else\ifx#1\scriptstyle%
-    \overarrowthickness =        \fontdimen 8 \scriptfont 3%
-    \overarrowsmallerthickness = \fontdimen 8 \scriptscriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptfont \ovar at rulethickness@family%
+    \overarrowsmallerthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptscriptfont \ovar at rulethickness@family%
   \else%
-    \overarrowthickness =        \fontdimen 8 \scriptscriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptscriptfont \ovar at rulethickness@family%
     \overarrowsmallerthickness = \overarrowthickness%
   \fi\fi\fi%
 }
 %    \end{macrocode}
+%  \pkg{unicode-math} with LuaTeX version.
+%    \begin{macrocode}
+\def\ovar at set@arrowthickness at UM@lua#1{%
+  \overarrowthickness = \Umathoverbarrule #1
+  \ifx#1\displaystyle%
+    \overarrowsmallerthickness = \Umathoverbarrule \textstyle%
+  \else\ifx#1\textstyle%
+    \overarrowsmallerthickness = \Umathoverbarrule \scriptstyle%
+  \else%
+    \overarrowsmallerthickness = \Umathoverbarrule \scriptscriptstyle%
+  \fi\fi%
+}
+%    \end{macrocode}
+% Test which version to use.
+%    \begin{macrocode}
+\AddToHook{begindocument}[overarrows]
+  {%
+    \@ifpackageloaded{unicode-math-luatex}
+      {%
+        \global\let\ovar at set@arrowthickness\ovar at set@arrowthickness at UM@lua
+      }
+      {%
+        \@ifpackageloaded{unicode-math-xetex}
+          {%
+            \gdef\ovar at rulethickness@fontdimen{54}
+            \gdef\ovar at rulethickness@family{2}
+          }
+          {}
+      }
+  }
+%    \end{macrocode}
 % \end{macro}
+% \end{macro}
 %
 % \subsubsection*{Stack macros}
 %
@@ -3017,9 +3415,30 @@
 %
 % \subsubsection*{Macro for commands creation}
 %
+% \changes{v1.2}{2024/07/11}{Allow backslash in command name}
+% In the initial version, the commands names must be given as csname (without
+% backslash). To harmonize the syntax with standard \cs{NewDocumentCommand},
+% define an argument processor so that both
+% \cs{NewOverArrowCommand}|{\myarrow}| and
+% \cs{NewOverArrowCommand}|{myarrow}| are accepted.
+%
+%    \begin{macrocode}
+\ExplSyntaxOn
+\cs_new_protected:Npn \__overarrows_processor_strip_escape_char:n #1
+  {
+     \regex_match:nnTF { ^\cC. } { #1 }
+     { \tl_set:Nx \ProcessedArgument { \cs_to_str:N #1 } }
+     { \tl_set:Nx \ProcessedArgument { #1 } }
+  }
+\cs_new_eq:NN \ovar at cmdname@processor \__overarrows_processor_strip_escape_char:n
+\ExplSyntaxOff
+%    \end{macrocode}
+%
 % \begin{macro}{\DeclareOverArrowCommand}
 %    \begin{macrocode}
-\NewDocumentCommand{\DeclareOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\DeclareOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \begingroup
   \ovar at set@common
   \ifcsdef{ovar at set@#1}{%
@@ -3026,9 +3445,9 @@
     \csuse{ovar at set@#1}
   }{%
     \PackageError{overarrows}{Unknown method #1}
-    {Try with 'symb', 'tikz' or 'picture'}
+    {Try with 'symb', 'tikz', 'pstriks' or 'picture'}
   }
-  \ovar at set{#3 }
+  \ovar at set{#3}
   \ifdef{\ovar at macro@arrow}{}{%
     \ovar at set{no arrow macro hook}
   }
@@ -3050,7 +3469,7 @@
   \ifovar at detectsubscripts@%
   \csgdef{ovar@#2 at auto}##1{%
 %    \end{macrocode}
-% \vspace{-2\smallskipamount}%^^A remove space between code blocs
+% \vspace{-2\smallskipamount}%^^A remove space between code blocks
 % \changes{v1.1}{2023/02/15}{Support for non-standard subscripts}
 %    \begin{macrocode}
     \@ifnextchar \ovar at subcmd {%
@@ -3080,7 +3499,9 @@
 %
 % \begin{macro}{\ProvideOverArrowCommand}
 %    \begin{macrocode}
-\NewDocumentCommand{\ProvideOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\ProvideOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \ifcsdef{#2}{}{
     \DeclareOverArrowCommand[#1]{#2}{#3}
   }
@@ -3090,7 +3511,9 @@
 %
 % \begin{macro}{\NewOverArrowCommand}
 %    \begin{macrocode}
-\NewDocumentCommand{\NewOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\NewOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \ifcsdef{#2}{%
     \PackageError{overarrows}{Command \csname #2\endcsname already defined}%
     {You have used \protect\NewOverArrowCommand\space with a command that
@@ -3105,7 +3528,9 @@
 %
 % \begin{macro}{\RenewOverArrowCommand}
 %    \begin{macrocode}
-\NewDocumentCommand{\RenewOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\RenewOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \ifcsundef{#2}{%
     \PackageError{overarrows}{Command  \csname #2\endcsname undefined}%
     {You have used \protect\RenewOverArrowCommand\space with a command that was
@@ -3120,17 +3545,21 @@
 %
 % \subsubsection*{Starred variant}
 %
+% \changes{v1.2}{2024/07/11}{Use boxes in starred variant for better performances}
 % \begin{macro}{\ovar at starversion}
 % |#1|: definition (stack macro + arrow macro)\\
 % |#2|: math style\\
 % |#3|: content
 %    \begin{macrocode}
+\newsavebox\ovar at tempbox
 \def\ovar at starversion#1#2#3{%
-  #1#2{#3}%
-  \settowidth{\ovar at extralength}{$\m at th#1#2{#3}$}
-  \settowidth{\ovar at tempdim}{$\m at th#2{#3}$}
-  \deflength{\ovar at extralength}{0.5\ovar at extralength-0.5\ovar at tempdim}%
-  \kern-\ovar at extralength%
+  \sbox{\ovar at tempbox}{$\m at th #1#2{#3}$}%
+  \usebox{\ovar at tempbox}%
+%    \end{macrocode}
+%   Remove the extra space added by the arrow.
+%    \begin{macrocode}
+  \settowidth{\ovar at tempdim}{$\m at th #2{#3}$}%
+  \kern\dimeval{0.5\ovar at tempdim - 0.5\wd\ovar at tempbox}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -3144,7 +3573,11 @@
 \ifovar at option@esvect@
   \let\esvectvv\vv
   \undef\vv
-  \NewOverArrowCommand{vv}{esvect, middle config=auto}
+%    \end{macrocode}
+% \changes{v1.2}{2024/07/11}{Use \refKey{middle config}|=relbareda| instead of
+% \refKey{middle config}|=auto|}
+%    \begin{macrocode}
+  \NewOverArrowCommand{\vv}{esvect, middle config = relbareda}
 \fi
 %    \end{macrocode}
 % \end{macro}
@@ -3152,216 +3585,231 @@
 %
 % \subsubsection*{Predefined commands}
 %
+% \changes{v1.2}{2024/07/11}{Declare predefined commands after \pkg{unicode-math} settings}
+% Declare predefined commands after \pkg{unicode-math} settings.
+%
+%    \begin{macrocode}
+\AddToHook{begindocument}[overarrows]
+  {
+%    \end{macrocode}
+%
 % \begin{macro}{\overrightarrow}
 %    \begin{macrocode}
-\ifovar at option@overrightarrow@
-  \DeclareOverArrowCommand{overrightarrow}{%
-    amsmath, middle config=relbar,
-    end=\ovar at rightarrow,
-    right arrow,
-  }
-\fi
+    \ifovar at option@overrightarrow@
+      \DeclareOverArrowCommand{\overrightarrow}{%
+        amsmath, middle config=relbar,
+        end=\ovar at rightarrow,
+        right arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underrightarrow}
 %    \begin{macrocode}
-\ifovar at option@underrightarrow@
-  \DeclareOverArrowCommand{underrightarrow}{%
-    amsmath, middle config=relbar,
-    end=\ovar at rightarrow,
-    right arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underrightarrow@
+      \DeclareOverArrowCommand{\underrightarrow}{%
+        amsmath, middle config=relbar,
+        end=\ovar at rightarrow,
+        right arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overleftarrow}
 %    \begin{macrocode}
-\ifovar at option@overleftarrow@
-  \DeclareOverArrowCommand{overleftarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\relbar,
-    left arrow,
-  }
-\fi
+    \ifovar at option@overleftarrow@
+      \DeclareOverArrowCommand{\overleftarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\relbar,
+        left arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underleftarrow}
 %    \begin{macrocode}
-\ifovar at option@underleftarrow@
-  \DeclareOverArrowCommand{underleftarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\relbar,
-    left arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underleftarrow@
+      \DeclareOverArrowCommand{\underleftarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\relbar,
+        left arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overleftrightarrow}
 %    \begin{macrocode}
-\ifovar at option@overleftrightarrow@
-  \DeclareOverArrowCommand{overleftrightarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\ovar at rightarrow,
-    center arrow,
-  }
-\fi
+    \ifovar at option@overleftrightarrow@
+      \DeclareOverArrowCommand{\overleftrightarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\ovar at rightarrow,
+        center arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underleftrightarrow}
 %    \begin{macrocode}
-\ifovar at option@underleftrightarrow@
-  \DeclareOverArrowCommand{underleftrightarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\ovar at rightarrow,
-    center arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underleftrightarrow@
+      \DeclareOverArrowCommand{\underleftrightarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\ovar at rightarrow,
+        center arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overrightharpoonup}
 %    \begin{macrocode}
-\ifovar at option@overrightharpoonup@
-  \DeclareOverArrowCommand{overrightharpoonup}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoonup,
-    right arrow,
-  }
-\fi
+    \ifovar at option@overrightharpoonup@
+      \DeclareOverArrowCommand{\overrightharpoonup}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoonup,
+        right arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underrightharpoonup}
 %    \begin{macrocode}
-\ifovar at option@underrightharpoonup@
-  \DeclareOverArrowCommand{underrightharpoonup}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoonup,
-    right arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underrightharpoonup@
+      \DeclareOverArrowCommand{\underrightharpoonup}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoonup,
+        right arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overrightharpoondown}
 %    \begin{macrocode}
-\ifovar at option@overrightharpoondown@
-  \DeclareOverArrowCommand{overrightharpoondown}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoondown,
-    right arrow,
-  }
-\fi
+    \ifovar at option@overrightharpoondown@
+      \DeclareOverArrowCommand{\overrightharpoondown}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoondown,
+        right arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underrightharpoondown}
 %    \begin{macrocode}
-\ifovar at option@underrightharpoondown@
-  \DeclareOverArrowCommand{underrightharpoondown}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoondown,
-    right arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underrightharpoondown@
+      \DeclareOverArrowCommand{\underrightharpoondown}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoondown,
+        right arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overleftharpoonup}
 %    \begin{macrocode}
-\ifovar at option@overleftharpoonup@
-  \DeclareOverArrowCommand{overleftharpoonup}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoonup,
-    end=\relbar,
-    left arrow,
-  }
-\fi
+    \ifovar at option@overleftharpoonup@
+      \DeclareOverArrowCommand{\overleftharpoonup}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoonup,
+        end=\relbar,
+        left arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underleftharpoonup}
 %    \begin{macrocode}
-\ifovar at option@underleftharpoonup@
-  \DeclareOverArrowCommand{underleftharpoonup}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoonup,
-    end=\relbar,
-    left arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underleftharpoonup@
+      \DeclareOverArrowCommand{\underleftharpoonup}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoonup,
+        end=\relbar,
+        left arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overleftharpoondown}
 %    \begin{macrocode}
-\ifovar at option@overleftharpoondown@
-  \DeclareOverArrowCommand{overleftharpoondown}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoondown,
-    end=\relbar,
-    left arrow,
-  }
-\fi
+    \ifovar at option@overleftharpoondown@
+      \DeclareOverArrowCommand{\overleftharpoondown}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoondown,
+        end=\relbar,
+        left arrow,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\underleftharpoondown}
 %    \begin{macrocode}
-\ifovar at option@underleftharpoondown@
-  \DeclareOverArrowCommand{underleftharpoondown}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoondown,
-    end=\relbar,
-    left arrow,
-    arrow under,
-  }
-\fi
+    \ifovar at option@underleftharpoondown@
+      \DeclareOverArrowCommand{\underleftharpoondown}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoondown,
+        end=\relbar,
+        left arrow,
+        arrow under,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
 % \begin{macro}{\overbar}
 %    \begin{macrocode}
-\ifovar at option@overbar@
-  \DeclareOverArrowCommand{overbar}{%
-    amsmath, middle config=relbar,
-    start={\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
-    shift leftright=0,
-    space after arrow=-0.3ex,
-  }
-\fi
+    \ifovar at option@overbar@
+      \DeclareOverArrowCommand{\overbar}{%
+        amsmath, middle config=relbar,
+        start={\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
+        shift leftright=0,
+        space after arrow=-0.3ex,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
+% With \pkg{unicode-math}, add |\vphantom{+}| to get the correct position.
 % \begin{macro}{\underbar}
 %    \begin{macrocode}
-\ifovar at option@underbar@
-  \DeclareOverArrowCommand{underbar}{%
-    amsmath, middle config=relbar,
-    start={\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
-    shift leftright=0,
-    arrow under,
-    space before arrow=-0.3ex,
-  }
-\fi
+    \ifovar at option@underbar@
+      \DeclareOverArrowCommand{\underbar}{%
+        amsmath, middle config=relbar,
+        start={\vphantom{+}\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
+        shift leftright=0,
+        arrow under,
+        space before arrow=-0.3ex,
+      }
+    \fi
 %    \end{macrocode}
 % \end{macro}
 %
+% End of |\AddToHook{begindocument}| hook.
+%    \begin{macrocode}
+  }
+%    \end{macrocode}
+%
+%
 % \subsubsection*{Test macros}
 %
 % \begin{macro}{\ovar at testmathstyles}
@@ -3422,7 +3870,9 @@
 %
 % \begin{macro}{\TestOverArrow}
 %    \begin{macrocode}
-\NewDocumentCommand{\TestOverArrow}{ s o m }{
+\NewDocumentCommand{\TestOverArrow}{
+  s o >{\ovar at cmdname@processor} m
+}{%
   \ifcsdef{#3}{}{%
     \PackageWarning{overarrows}{Unknown name '#3' passed to
       \protect\TestOverArrow}
@@ -3494,6 +3944,7 @@
 \lstdefinestyle{lstovardoc}{%
   language = [LaTeX]TeX,
   columns         = flexible,
+  keepspaces      = true,
   keywordstyle    = {\bfseries\color{ovar_darkblue}},
   texcsstyle      = *{\bfseries\color{ovar_darkblue}},
   commentstyle    = {\color{gray}},
@@ -3618,7 +4069,7 @@
     name=macrocode,
     firstnumber=auto,
     style       = lstovarcode,
-    showlines=false,
+    showlines   = false,
 %    \end{macrocode}
 % Commands and lengths identification and indexing
 %
@@ -3648,8 +4099,9 @@
 %    \begin{macrocode}
     texcs       = [4]{% internal macros
       ovar at rightarrow, ovar at leftarrow, ifovar at option@oldarrows@,
-      ifovar at option@esvect@, ifovar at option@tikz@, ifovar at option@pstarrows@,
-      ifovar at detectsubscripts@, ifovar at option@debug@,
+      ifovar at option@esvect@, ifovar at option@tikz@, ifovar at option@pstricks@,
+      ifovar at option@pstarrows@, ifovar at detectsubscripts@,
+      ifovar at option@subother@, ifovar at option@subactive@, ifovar at option@debug@,
       ifovar at option@overrightarrow@, ifovar at option@underrightarrow@,
       ifovar at option@overleftarrow@, ifovar at option@underleftarrow@,
       ifovar at option@overleftrightarrow@, ifovar at option@underleftrightarrow@,
@@ -3657,20 +4109,23 @@
       ifovar at option@overrightharpoondown@, ifovar at option@underrightharpoondown@,
       ifovar at option@overleftharpoonup@, ifovar at option@underleftharpoonup@,
       ifovar at option@overleftharpoondown@, ifovar at option@underleftharpoondown@,
-      ifovar at option@overbar@, ifovar at option@underbar@, ovar at set, ovar at length@min,
+      ifovar at option@overbar@, ifovar at option@underbar@, ovar at auto@middle,
+      ovar at auto@trim at middle, ovar at subcmd, ovar at set, ovar at length@min,
       ovar at before@arrow, ovar at after@arrow, ovar at macro@stack, ovar at macro@arrow,
-      ovar at set@, ovar at shift@left, ovar at shift@right, ovar at stack@fill,
-      ovar at stackunder@fill, ovar at stack@lens, ovar at stackunder@lens,
-      ovar at macro@arrowfill, ovar at arrow@fill, ovar at arrow@start, ovar at trim@start,
-      ovar at trim@middle, ovar at arrow@middle, ovar at trim@end, ovar at arrow@end,
-      ovar at tikz@command, ovar at tikz@pathoptions, ovar at tikz@path,
-      ovar at tikz@options, ovar at picture@geometry, ovar at picture@linethickness,
-      ovar at picture@command, ovar at extralength, ovar at tempdim, ovar at set@arrowlength,
-      ovar at set@arrowthickness, ovar at stackover@@, ovar at stackunder@@,
-      ovar at stackover@, ovar at stackunder@, ovar at stackover@fill,
-      ovar at stackover@lens, ovar at set@common, ovar at starversion,
-      ovar at testmathstyles, ovar at row@teststyle,%
-      ifovar at option@subother@,ifovar at option@subactive@,ovar at subcmd,ovar at testkerning,%
+      ovar at shift@left, ovar at shift@right, ovar at stack@fill, ovar at stackunder@fill,
+      ovar at stack@lens, ovar at stackunder@lens, ovar at macro@arrowfill,
+      ovar at arrow@fill, ovar at arrow@start, ovar at trim@start, ovar at trim@middle,
+      ovar at arrow@middle, ovar at trim@end, ovar at arrow@end, ovar at tikz@command,
+      ovar at tikz@pathoptions, ovar at tikz@path, ovar at tikz@options,
+      ovar at pstricks@geometry, ovar at pstricks@linethickness, ovar at pstricks@psset,
+      ovar at pstricks@command, ovar at picture@geometry, ovar at picture@linethickness,
+      ovar at picture@command, ovar at tempdim, ovar at set@arrowlength,
+      ovar at set@arrowthickness, ovar at set@arrowthickness at UM@lua,
+      ovar at rulethickness@fontdimen, ovar at rulethickness@family, ovar at stackover@@,
+      ovar at stackunder@@, ovar at stackover@, ovar at stackunder@, ovar at stackover@fill,
+      ovar at stackover@lens, ovar at cmdname@processor, ovar at set@common,
+      ovar at starversion, ovar at tempbox, ovar at testmathstyles, ovar at row@teststyle,
+      ovar at testkerning%
     },
     index       = [4][texcs4],%
     indexstyle  = [4]\indexmacrointernal,%
@@ -3678,20 +4133,25 @@
 % Other macros identification
 %    \begin{macrocode}
     moretexcs   = [5]{% other macros
-      Relbar, relbareda, relbaredd, rightarrow, Rightarrow, varleftarrow,
-      varrightarrow, twoheadrightarrow,%
+      relbar, Relbar, relbareda, relbaredd, harrowextender, rightarrow,
+      Rightarrow, varleftarrow, varrightarrow, twoheadrightarrow,%
     },
 %    \end{macrocode}
-% Il would be nice to also index keys, but spaces are badly handled by listings.
+% Il would be nice to also index keys, but spaces are badly handled by
+% \pkg{listings}.
 %    \begin{macrocode}
 %^^A    morekeywords = [2]{%
-%^^A      no stack macro hook, stack macro, arrow macro, no arrow macro hook, min
-%^^A      length, before arrow, after arrow, space before arrow, space after arrow,
-%^^A      shift left, shift right, shift leftright, center arrow, left arrow, right
-%^^A      arrow, arrow under, fill macro, start, middle, end, trim start, trim
-%^^A      middle, trim end, trim, no trimming, middle config, amsmath, esvect, tikz
-%^^A      command, tikz options, path options, path, add path options, add tikz
-%^^A      options, arrows, line thickness, thinner, picture command, geometry, detect subscripts,
+%^^A      overarrows, no stack macro hook, stack macro, detect subscripts, arrow
+%^^A      macro, no arrow macro hook, min length, before arrow, after arrow, space
+%^^A      before arrow, space after arrow, shift left, shift right, shift leftright,
+%^^A      center arrow, left arrow, right arrow, arrow under, arrow under/noconfig,
+%^^A      arrow under/autoconfig, fill macro, start, middle, end, trim start, trim
+%^^A      middle, trim end, trim, no trimming, middle config, middle config/relbar,
+%^^A      middle config/relbareda, middle config/harrowextender, middle config/auto,
+%^^A      amsmath, amsmath/mimic, amsmath/strict, esvect, esvect/mimic,
+%^^A      esvect/strict, tikz command, tikz options, path options, path, add path
+%^^A      options, add tikz options, arrows, line thickness, thinner, pstricks
+%^^A      command, psset, geometry, arrow, picture command,%
 %^^A    },
 %^^A    index       = [3][keywords2],%
 %^^A    indexstyle  = [3]\lstindexmacro,%

Modified: trunk/Master/texmf-dist/tex/latex/overarrows/overarrows.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/overarrows/overarrows.sty	2024-07-11 19:57:07 UTC (rev 71773)
+++ trunk/Master/texmf-dist/tex/latex/overarrows/overarrows.sty	2024-07-11 19:57:18 UTC (rev 71774)
@@ -17,10 +17,11 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage{overarrows}
-[2023/02/15 v1.1 Custom extensible arrows over math expressions]
+[2024/07/11 v1.2 Custom extensible arrows over math expressions]
 \newif\ifovar at option@oldarrows@
 \newif\ifovar at option@esvect@ \ovar at option@esvect at true \PassOptionsToPackage{f}{esvect}
 \newif\ifovar at option@tikz@
+\newif\ifovar at option@pstricks@
 \newif\ifovar at option@pstarrows@
 \newif\ifovar at detectsubscripts@
 \newif\ifovar at option@subother@
@@ -54,6 +55,7 @@
 \DeclareOption{esvecth}{\ovar at option@esvect at true\PassOptionsToPackage{h}{esvect}}
 \DeclareOption{old-arrows}{\ovar at option@oldarrows at true}
 \DeclareOption{tikz}{\ovar at option@tikz at true}
+\DeclareOption{pstricks}{\ovar at option@pstricks at true}
 \DeclareOption{pstarrows}{\ovar at option@pstarrows at true}
 \DeclareOption{subscripts}{\ovar at detectsubscripts@true}
 \DeclareOption{subother}{\ovar at option@subother at true}
@@ -117,35 +119,70 @@
 \ProcessOptions\relax
 \RequirePackage{amsmath}
 \RequirePackage{etoolbox}
-\let\ovar at rightarrow\rightarrow
-\let\ovar at leftarrow\leftarrow
+\def\ovar at rightarrow{\rightarrow}
+\def\ovar at leftarrow{\leftarrow}
 \ifovar at option@oldarrows@
   \RequirePackage[old]{old-arrows}
-  \let\ovar at rightarrow\varrightarrow
-  \let\ovar at leftarrow\varleftarrow
+  \def\ovar at rightarrow{\varrightarrow}
+  \def\ovar at leftarrow{\varleftarrow}
 \fi
 \ifovar at option@esvect@
   \RequirePackage{esvect}
+  \DeclareFontFamily{U}{esvect}{}
+  \DeclareFontShape{U}{esvect}{m}{n}{
+    <-5.5> vect5
+    <5.5-6.5> vect6
+    <6.5-7.5> vect7
+    <7.5-8.5> vect8
+    <8.5-9.5> vect9
+    <9.5-> vect10
+  }{}
 \fi
 \ifovar at option@tikz@
   \RequirePackage{tikz}
   \usetikzlibrary{arrows.meta}
 \fi
+\ifovar at option@pstricks@
+  \RequirePackage{pstricks-add}
+\fi
 \ifovar at option@pstarrows@
   \RequirePackage[pstarrows]{pict2e}
 \fi
+\DeclareHookRule{begindocument}{overarrows}{after}{unicode-math-luatex}
+\DeclareHookRule{begindocument}{overarrows}{after}{unicode-math-xetex}
+\AddToHook{begindocument}[overarrows]
+  {%
+    \ifdef{\relbareda}
+      {%
+        \gdef\ovar at auto@middle{\relbareda}
+        \gdef\ovar at auto@trim at middle{1}
+      }
+      {%
+        \gdef\ovar at auto@middle{\relbar}
+        \gdef\ovar at auto@trim at middle{2.5}
+      }%
+    \@ifpackageloaded{unicode-math}
+      {%
+        \check at mathfonts
+        \iffontchar\textfont\tw@\string"23AF
+          \gdef\ovar at auto@middle{\mathrel\harrowextender}
+          \gdef\ovar at auto@trim at middle{0}
+        \fi
+      }
+      {}%
+  }
 \newcommand{\SetOverArrowsSubscriptCommand}[1]{\global\let\ovar at subcmd=#1}
 \SetOverArrowsSubscriptCommand{_}
 \ifovar at option@subother@
   \begingroup
     \catcode `_=12
-    \AddToHook{begindocument/end}{\SetOverArrowsSubscriptCommand{_}}
+    \SetOverArrowsSubscriptCommand{_}%
   \endgroup
 \fi
 \ifovar at option@subactive@
   \begingroup
     \catcode `_=13
-    \AddToHook{begindocument/end}{\SetOverArrowsSubscriptCommand{_}}
+    \SetOverArrowsSubscriptCommand{_}%
   \endgroup
 \fi
 \RequirePackage{pgfkeys}
@@ -286,12 +323,17 @@
       }
     }
   },
+  middle config/harrowextender/.code={%
+    \pgfkeysalso{%
+      middle={\harrowextender},
+      trim middle={0},
+    }
+  },
   middle config/auto/.code={%
-    \ifovar at option@esvect@
-    \pgfkeysalso{middle config=relbareda}
-    \else
-    \pgfkeysalso{middle config=relbar}
-    \fi
+    \pgfkeysalso{%
+      middle={\ovar at auto@middle},
+      trim middle={\ovar at auto@trim at middle},
+    }
   },
   amsmath/.is choice,%
   amsmath/mimic/.code=\pgfkeysalso{%
@@ -369,6 +411,39 @@
   shift right=-2,
   min length=12,
 }
+\SetOverArrowsMethod[lens]{pstricks}{%
+  no arrow macro hook/.code={%
+    \ovar at set{%
+      arrow macro/.expanded={%
+        $\noexpand\mkern \expandonce{\ovar at shift@left} mu\noexpand\relax$%
+        \noexpand\begin{pspicture}\expandonce{\ovar at pstricks@geometry}%
+          \noexpand\psset{linewidth=\expandonce{\ovar at pstricks@linethickness}}%
+          \noexpand\psset{\expandonce{\ovar at pstricks@psset}}%
+          \expandonce{\ovar at pstricks@command}%
+        \noexpand\end{pspicture}%
+        $\noexpand\mkern \expandonce{\ovar at shift@right} mu\noexpand\relax$%
+      }
+    }
+  },
+  pstricks command/.store in=\ovar at pstricks@command,
+  psset/.store in=\ovar at pstricks@psset,
+  geometry/.store in=\ovar at pstricks@geometry,
+  line thickness/.store in=\ovar at pstricks@linethickness,
+  pstricks command/.value required,
+  psset/.value required,
+  geometry/.value required,
+  line thickness/.value required,
+  arrow/.style={pstricks command={\psline{##1}(0,0)(\overarrowlength,0)}},%
+  arrow/.value required,%
+  thinner/.style={line thickness={\overarrowsmallerthickness}},%
+  thinner/.value forbidden,%
+  shift right=-2,
+  min length=12,
+  geometry={(0,-0.5ex)(\overarrowlength,0.5ex)},%
+  line thickness={\overarrowthickness},%
+  arrow={->},%
+  psset={},%
+}
 \SetOverArrowsMethod[lens]{picture}{%
   no arrow macro hook/.code={%
     \ovar at set{%
@@ -413,7 +488,6 @@
 \newlength{\overarrowlength}
 \newlength{\overarrowthickness}
 \newlength{\overarrowsmallerthickness}
-\newlength{\ovar at extralength}
 \newlength{\ovar at tempdim}
 \def\ovar at set@arrowlength#1#2#3{%
   \settowidth{\ovar at tempdim}{$\m at th#2\mskip #1 mu\relax$}%
@@ -420,21 +494,55 @@
   \settowidth{\overarrowlength}{$\m at th#2#3$}%
   \ifdim \overarrowlength < \ovar at tempdim \overarrowlength=\ovar at tempdim\fi%
 }
-\def\ovar at set@arrowthickness#1{% use rule thickness=\fontdimen 8 font family 3
+\def\ovar at rulethickness@fontdimen{8}
+\def\ovar at rulethickness@family{3}
+\def\ovar at set@arrowthickness#1{%
   \ifx#1\displaystyle%
-    \overarrowthickness =        \fontdimen 8 \textfont 3%
-    \overarrowsmallerthickness = \fontdimen 8 \scriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen  \textfont \ovar at rulethickness@family%
+    \overarrowsmallerthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptfont \ovar at rulethickness@family%
   \else\ifx#1\textstyle%
-    \overarrowthickness =        \fontdimen 8 \textfont 3%
-    \overarrowsmallerthickness = \fontdimen 8 \scriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \textfont \ovar at rulethickness@family%
+    \overarrowsmallerthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptfont \ovar at rulethickness@family%
   \else\ifx#1\scriptstyle%
-    \overarrowthickness =        \fontdimen 8 \scriptfont 3%
-    \overarrowsmallerthickness = \fontdimen 8 \scriptscriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptfont \ovar at rulethickness@family%
+    \overarrowsmallerthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptscriptfont \ovar at rulethickness@family%
   \else%
-    \overarrowthickness =        \fontdimen 8 \scriptscriptfont 3%
+    \overarrowthickness =
+      \fontdimen \ovar at rulethickness@fontdimen \scriptscriptfont \ovar at rulethickness@family%
     \overarrowsmallerthickness = \overarrowthickness%
   \fi\fi\fi%
 }
+\def\ovar at set@arrowthickness at UM@lua#1{%
+  \overarrowthickness = \Umathoverbarrule #1
+  \ifx#1\displaystyle%
+    \overarrowsmallerthickness = \Umathoverbarrule \textstyle%
+  \else\ifx#1\textstyle%
+    \overarrowsmallerthickness = \Umathoverbarrule \scriptstyle%
+  \else%
+    \overarrowsmallerthickness = \Umathoverbarrule \scriptscriptstyle%
+  \fi\fi%
+}
+\AddToHook{begindocument}[overarrows]
+  {%
+    \@ifpackageloaded{unicode-math-luatex}
+      {%
+        \global\let\ovar at set@arrowthickness\ovar at set@arrowthickness at UM@lua
+      }
+      {%
+        \@ifpackageloaded{unicode-math-xetex}
+          {%
+            \gdef\ovar at rulethickness@fontdimen{54}
+            \gdef\ovar at rulethickness@family{2}
+          }
+          {}
+      }
+  }
 \def\ovar at stackover@@#1#2#3#4#5#6{\vbox{\ialign{##\crcr%
       $#5\mskip #1 mu\relax$\crcr%
       \noalign{#2\nointerlineskip}#4\crcr%
@@ -467,7 +575,18 @@
   \ovar at stackunder@{#2}{#3}{#4}{#5}{#6}%
 }
 \def\ovar at stack@lens{\ovar at stackover@lens}
-\NewDocumentCommand{\DeclareOverArrowCommand}{ O{symb} m m }{%
+\ExplSyntaxOn
+\cs_new_protected:Npn \__overarrows_processor_strip_escape_char:n #1
+  {
+     \regex_match:nnTF { ^\cC. } { #1 }
+     { \tl_set:Nx \ProcessedArgument { \cs_to_str:N #1 } }
+     { \tl_set:Nx \ProcessedArgument { #1 } }
+  }
+\cs_new_eq:NN \ovar at cmdname@processor \__overarrows_processor_strip_escape_char:n
+\ExplSyntaxOff
+\NewDocumentCommand{\DeclareOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \begingroup
   \ovar at set@common
   \ifcsdef{ovar at set@#1}{%
@@ -474,9 +593,9 @@
     \csuse{ovar at set@#1}
   }{%
     \PackageError{overarrows}{Unknown method #1}
-    {Try with 'symb', 'tikz' or 'picture'}
+    {Try with 'symb', 'tikz', 'pstriks' or 'picture'}
   }
-  \ovar at set{#3 }
+  \ovar at set{#3}
   \ifdef{\ovar at macro@arrow}{}{%
     \ovar at set{no arrow macro hook}
   }
@@ -519,12 +638,16 @@
   \fi
   \endgroup
 }
-\NewDocumentCommand{\ProvideOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\ProvideOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \ifcsdef{#2}{}{
     \DeclareOverArrowCommand[#1]{#2}{#3}
   }
 }
-\NewDocumentCommand{\NewOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\NewOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \ifcsdef{#2}{%
     \PackageError{overarrows}{Command \csname #2\endcsname already defined}%
     {You have used \protect\NewOverArrowCommand\space with a command that
@@ -534,7 +657,9 @@
     \DeclareOverArrowCommand[#1]{#2}{#3}
   }
 }
-\NewDocumentCommand{\RenewOverArrowCommand}{ O{symb} m m }{%
+\NewDocumentCommand{\RenewOverArrowCommand}{
+ O{symb} >{\ovar at cmdname@processor} m m
+}{%
   \ifcsundef{#2}{%
     \PackageError{overarrows}{Command  \csname #2\endcsname undefined}%
     {You have used \protect\RenewOverArrowCommand\space with a command that was
@@ -544,148 +669,151 @@
     \DeclareOverArrowCommand[#1]{#2}{#3}
   }
 }
+\newsavebox\ovar at tempbox
 \def\ovar at starversion#1#2#3{%
-  #1#2{#3}%
-  \settowidth{\ovar at extralength}{$\m at th#1#2{#3}$}
-  \settowidth{\ovar at tempdim}{$\m at th#2{#3}$}
-  \deflength{\ovar at extralength}{0.5\ovar at extralength-0.5\ovar at tempdim}%
-  \kern-\ovar at extralength%
+  \sbox{\ovar at tempbox}{$\m at th #1#2{#3}$}%
+  \usebox{\ovar at tempbox}%
+  \settowidth{\ovar at tempdim}{$\m at th #2{#3}$}%
+  \kern\dimeval{0.5\ovar at tempdim - 0.5\wd\ovar at tempbox}%
 }
 \ifovar at option@esvect@
   \let\esvectvv\vv
   \undef\vv
-  \NewOverArrowCommand{vv}{esvect, middle config=auto}
+  \NewOverArrowCommand{\vv}{esvect, middle config = relbareda}
 \fi
-\ifovar at option@overrightarrow@
-  \DeclareOverArrowCommand{overrightarrow}{%
-    amsmath, middle config=relbar,
-    end=\ovar at rightarrow,
-    right arrow,
+\AddToHook{begindocument}[overarrows]
+  {
+    \ifovar at option@overrightarrow@
+      \DeclareOverArrowCommand{\overrightarrow}{%
+        amsmath, middle config=relbar,
+        end=\ovar at rightarrow,
+        right arrow,
+      }
+    \fi
+    \ifovar at option@underrightarrow@
+      \DeclareOverArrowCommand{\underrightarrow}{%
+        amsmath, middle config=relbar,
+        end=\ovar at rightarrow,
+        right arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overleftarrow@
+      \DeclareOverArrowCommand{\overleftarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\relbar,
+        left arrow,
+      }
+    \fi
+    \ifovar at option@underleftarrow@
+      \DeclareOverArrowCommand{\underleftarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\relbar,
+        left arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overleftrightarrow@
+      \DeclareOverArrowCommand{\overleftrightarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\ovar at rightarrow,
+        center arrow,
+      }
+    \fi
+    \ifovar at option@underleftrightarrow@
+      \DeclareOverArrowCommand{\underleftrightarrow}{%
+        amsmath, middle config=relbar,
+        start=\ovar at leftarrow,
+        end=\ovar at rightarrow,
+        center arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overrightharpoonup@
+      \DeclareOverArrowCommand{\overrightharpoonup}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoonup,
+        right arrow,
+      }
+    \fi
+    \ifovar at option@underrightharpoonup@
+      \DeclareOverArrowCommand{\underrightharpoonup}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoonup,
+        right arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overrightharpoondown@
+      \DeclareOverArrowCommand{\overrightharpoondown}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoondown,
+        right arrow,
+      }
+    \fi
+    \ifovar at option@underrightharpoondown@
+      \DeclareOverArrowCommand{\underrightharpoondown}{%
+        amsmath, middle config=relbar,
+        end=\rightharpoondown,
+        right arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overleftharpoonup@
+      \DeclareOverArrowCommand{\overleftharpoonup}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoonup,
+        end=\relbar,
+        left arrow,
+      }
+    \fi
+    \ifovar at option@underleftharpoonup@
+      \DeclareOverArrowCommand{\underleftharpoonup}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoonup,
+        end=\relbar,
+        left arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overleftharpoondown@
+      \DeclareOverArrowCommand{\overleftharpoondown}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoondown,
+        end=\relbar,
+        left arrow,
+      }
+    \fi
+    \ifovar at option@underleftharpoondown@
+      \DeclareOverArrowCommand{\underleftharpoondown}{%
+        amsmath, middle config=relbar,
+        start=\leftharpoondown,
+        end=\relbar,
+        left arrow,
+        arrow under,
+      }
+    \fi
+    \ifovar at option@overbar@
+      \DeclareOverArrowCommand{\overbar}{%
+        amsmath, middle config=relbar,
+        start={\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
+        shift leftright=0,
+        space after arrow=-0.3ex,
+      }
+    \fi
+    \ifovar at option@underbar@
+      \DeclareOverArrowCommand{\underbar}{%
+        amsmath, middle config=relbar,
+        start={\vphantom{+}\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
+        shift leftright=0,
+        arrow under,
+        space before arrow=-0.3ex,
+      }
+    \fi
   }
-\fi
-\ifovar at option@underrightarrow@
-  \DeclareOverArrowCommand{underrightarrow}{%
-    amsmath, middle config=relbar,
-    end=\ovar at rightarrow,
-    right arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overleftarrow@
-  \DeclareOverArrowCommand{overleftarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\relbar,
-    left arrow,
-  }
-\fi
-\ifovar at option@underleftarrow@
-  \DeclareOverArrowCommand{underleftarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\relbar,
-    left arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overleftrightarrow@
-  \DeclareOverArrowCommand{overleftrightarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\ovar at rightarrow,
-    center arrow,
-  }
-\fi
-\ifovar at option@underleftrightarrow@
-  \DeclareOverArrowCommand{underleftrightarrow}{%
-    amsmath, middle config=relbar,
-    start=\ovar at leftarrow,
-    end=\ovar at rightarrow,
-    center arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overrightharpoonup@
-  \DeclareOverArrowCommand{overrightharpoonup}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoonup,
-    right arrow,
-  }
-\fi
-\ifovar at option@underrightharpoonup@
-  \DeclareOverArrowCommand{underrightharpoonup}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoonup,
-    right arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overrightharpoondown@
-  \DeclareOverArrowCommand{overrightharpoondown}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoondown,
-    right arrow,
-  }
-\fi
-\ifovar at option@underrightharpoondown@
-  \DeclareOverArrowCommand{underrightharpoondown}{%
-    amsmath, middle config=relbar,
-    end=\rightharpoondown,
-    right arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overleftharpoonup@
-  \DeclareOverArrowCommand{overleftharpoonup}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoonup,
-    end=\relbar,
-    left arrow,
-  }
-\fi
-\ifovar at option@underleftharpoonup@
-  \DeclareOverArrowCommand{underleftharpoonup}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoonup,
-    end=\relbar,
-    left arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overleftharpoondown@
-  \DeclareOverArrowCommand{overleftharpoondown}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoondown,
-    end=\relbar,
-    left arrow,
-  }
-\fi
-\ifovar at option@underleftharpoondown@
-  \DeclareOverArrowCommand{underleftharpoondown}{%
-    amsmath, middle config=relbar,
-    start=\leftharpoondown,
-    end=\relbar,
-    left arrow,
-    arrow under,
-  }
-\fi
-\ifovar at option@overbar@
-  \DeclareOverArrowCommand{overbar}{%
-    amsmath, middle config=relbar,
-    start={\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
-    shift leftright=0,
-    space after arrow=-0.3ex,
-  }
-\fi
-\ifovar at option@underbar@
-  \DeclareOverArrowCommand{underbar}{%
-    amsmath, middle config=relbar,
-    start={\std at minus}, end={\std at minus},% \relbar is defined with \mathsm at sh
-    shift leftright=0,
-    arrow under,
-    space before arrow=-0.3ex,
-  }
-\fi
 \newcommand{\ovar at testmathstyles}[2][]{
   \begingroup
   \newcommand*{\ovar at row@teststyle}[1]{%
@@ -728,7 +856,9 @@
   \end{displaymath}
 }
 \endgroup
-\NewDocumentCommand{\TestOverArrow}{ s o m }{
+\NewDocumentCommand{\TestOverArrow}{
+  s o >{\ovar at cmdname@processor} m
+}{%
   \ifcsdef{#3}{}{%
     \PackageWarning{overarrows}{Unknown name '#3' passed to
       \protect\TestOverArrow}



More information about the tex-live-commits mailing list.