如何在katex中获得一颗充满黑色的心?

How to get a heart filled of black color in katex?

到目前为止我 know/I 尝试了什么:

  1. \spadesuit\spades 用填充的黑色渲染黑桃。

  2. 类似地,\clubs\clubsuit 用填充的黑色渲染俱乐部。

  3. 现在\hearts\heartsuit只用白色填充背景渲染心形。

  4. \colorbox 将其视为 box/rectangle,因此明显隐藏了形状。

  5. 我可以得到黑钻\blacklozenge

Please see this in new tab

此外,我知道 club and spade are blackdiamonds and heart are red 在甲板上,但我也想要黑色的心形符号。

我怎样才能得到它?谢谢。

也在 github 上问过:https://github.com/KaTeX/KaTeX/discussions/2546

鸣谢并感谢:Ronkok

KaTeX \hearts and \heartsuit render a heart outline, ♡, U+2661, , so they do not help you. The Unicode character for a filled heart is ♥, U+2665. That glyph is not in the KaTeX fonts, but you can still use it and KaTeX will substitute the glyph from the Times New Roman system font.

KaTeX emulates LaTeX, and this is not a LaTeX function, so KaTeX will write at least one error to the console (two if in strict mode). If you don't mind a console error, then no worries. KaTeX does render the heart. Just copy ♥ and paste it into your work.

在有任何进一步的更新之前,这就是我们必须与大家合作的内容。