KaTeX icon indicating copy to clipboard operation
KaTeX copied to clipboard

Support xcolor-style RGB \color and \textcolor

Open pbsds opened this issue 4 years ago • 1 comments

I'm using pandoc to generate both HTML+KaTeX and LaTeX form the same source. This is a problem since KaTeX treats colors differently.

This is magenta in LaTeX + xcolor:

\color[RGB]{255,0,255}
\textcolor[RGB]{255,0,255}

This is magenta in KaTeX:

\color{#FF00FF}
\textcolor{#FF00FF}

Is it possible to add support for the shown LaTeX syntax in KaTeX? This may sidestep the need for #750

pbsds avatar Nov 04 '21 10:11 pbsds

I have the same needs and would love to have the features mentioned above supported. In contrast, MathJex supports such a feature.

Jansen-Bob avatar Jul 30 '24 06:07 Jansen-Bob