goessner / markdown-it-texmath

Support TeX math equations with your Markdown documents.
MIT License
161 stars 29 forks source link

using with markdonw-it-attrs #45

Open basilgass opened 1 year ago

basilgass commented 1 year ago

Hi!

I'm trying to use markdown-it-texmath with markdown-it-attrs. But I can't apply the attribute to displayed math. Am I missing something ?

I tried these ways:

\[
f(x) = \sqrt{3x-2} + \frac{2}{x}
\]{.make-it-nice}

(adding a little space)

\[
f(x) = \sqrt{3x-2} + \frac{2}{x}
\] {.make-it-nice}

on the next line

\[
f(x) = \sqrt{3x-2} + \frac{2}{x}
\]
{.make-it-nice}

on two lines below (and even tried 3 lines)

\[
f(x) = \sqrt{3x-2} + \frac{2}{x}
\]

{.make-it-nice}

Notice that it is working correctly for inline math.

Thanks for your help !