Support » Plugin: KaTeX » \vec{s} not working

• Resolved Steeven

(@steeven)

Hi Katex

No vector arrow shows when using \vec{s}.

I can see that this has been a general Google Chrome issue with Katex in the past:

but was reportedly fixed back in 2017:
https://github.com/KaTeX/KaTeX/pull/670

It is not fixed for the WP plugin it seems though. You can find an example on my website here: https://www.allthatmatters.academy/courses/existence/lessons/vectors/. Scroll down to the first vector occurance (below the image). It is written in [katex] shortcodes as:

\vec{s} =
\left(\begin{matrix}
3 \\
4 \\
\end{matrix}

but in spite of the \vec{s} command it only shows a single s with no overhead arrow. Other commands such as \overrightarrow{s} do work, but this one which is the closest I’ve been able to find, makes a far too wide and large arrow compared to the stylish, small and neat overhead arrow I am used to in LaTex with \vec{s}.

• This topic was modified 6 months ago by Steeven.
• This topic was modified 6 months ago by Steeven.
Viewing 2 replies - 1 through 2 (of 2 total)
• Plugin Author Thomas Churchman

(@beskhue)

Hi Steeven,

The issue is your theme styles the overlay class, which is a class KaTeX also uses. By disabling your theme’s .overlay CSS, the vector symbol displays correctly.

You could rename the overlay class name to something else in your theme, or use a more specific selector.

There’s a tracking issue on KaTeX for isolating their classnames better, but nothing’s happened yet: https://github.com/KaTeX/KaTeX/issues/1456

That’s a shame that Katex has not gotten their classnames made more specific. If you know of other issues apart from the \vec issue that I also should know about, then please let me know.