stipub / stixfonts

OpenType Unicode fonts for Scientific, Technical, and Mathematical texts
SIL Open Font License 1.1
706 stars 41 forks source link

Mutual definitions of `\vec` and `\rightarrowaccent` are wrong way round? #142

Open nxg opened 5 years ago

nxg commented 5 years ago

The stix2.sty package defines:

\stix@MathAccent{\vec}                  {\mathalpha}{letters}{"92}
        % not \let because amsmath redefines \vec
        \def\rightarrowaccent{\vec}

I believe this should instead be:

\stix@MathAccent{\rightarrowaccent}                  {\mathalpha}{letters}{"92}
        % not \let because amsmath redefines \vec
        \def\vec{\rightarrowaccent}

Ie, the default implementation of \vec should be to use a right-arrow. At present, the default implementation of \rightarrowaccent is to use whatever \vec ends up defined as. As you note, \vec may be defined differently in different packages.

(I ran into this because I want to use an overline arrow with a distinct meaning from a version of \vec defined to use bold maths).

See eg:

\documentclass{article}
\usepackage{stix2}

% Including amsmath makes no difference.
%\usepackage{amsmath}

\begin{document}

Arrow: $\vec a$ and $\rightarrowaccent a$.

\let\vec\mathbf

Bold: $\vec a$ and $\rightarrowaccent a$.

\end{document}

The first line should have two 'a' with arrows over. The second should, I assert, have one bold 'a' and one with an overline arrow.

nxg commented 5 years ago

Sorry: I'm using

\ProvidesPackage{stix2}
  [2018/04/02 v2.0.0-latex STIX Two fonts support package]

...as provided in TeXLive 2019.

nxg commented 5 years ago

Damn: have I reported this to the wrong repo?

I went to find stix2.dtx to offer a pull request, but... I appear to be in the wrong place. Though stix2.sty does say ‘The Current Maintainer of this work is the STI Pub Companies’ which suggests it's maintained at least nearby the fonts.

If so, where is the right place? I can't find it on CTAN.