markdown-it-texmath icon indicating copy to clipboard operation
markdown-it-texmath copied to clipboard

It doesn't work when '$...$' is nested inside '$$...$$'

Open dreampasssser opened this issue 2 years ago • 4 comments
trafficstars

I find this usage at KaTeX website

屏幕截图 2023-01-18 153459

When I use \colorbox{aqua}{$F=ma$} or \fcolorbox{red}{aqua}{$F=ma$} , it also works in vscode, but it looks bad in browser. like this

屏幕截图 2023-01-18 154801

dreampasssser avatar Jan 18 '23 07:01 dreampasssser

Hmm ... $\fcolorbox{blue}{red}{F=ma}$

works for me in VSCode grafik

and in Browser grafik

... no nesting of $'s supported ...

goessner avatar Jan 18 '23 08:01 goessner

Emm... I know what you mean. But it is different between $ nested and not. It is just only text if you don't use $ , and it doesn't support these symbols \sum $\sum$ , \prod $\prod$ . For example, if I want to add a colored background to this formulae

屏幕截图 2023-01-18 174822

I will fail.

dreampasssser avatar Jan 18 '23 09:01 dreampasssser

Hmm ... you are right. According to these and these comments inherent problems with $ environment become more clear.

I'm not sure, how to deal with that inside of markdown-it-texmath. It will take some time.

goessner avatar Jan 18 '23 16:01 goessner

Well, that's all right.

dreampasssser avatar Jan 19 '23 11:01 dreampasssser