You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a macro which should transform one string to another. If I try to render such string: "\mymacro$\mymacro$", it works in first part but second part renders as a red "\mymacro" text instead of what it should have been transformed to. I read generator/htmlgenerator source code and came to a conclusion that it won't render because math pieces of the document are rendered via katex and my macros are not sent there. Is it true? If so, what would you recommend to create math mode macros? If not, why won't the macro render in math mode? Also, I believe #126 was a question about that.
The text was updated successfully, but these errors were encountered:
I just noticed \newcommand works in math mode as expected. I'll write a wrapper to create "math" macros using it. But I still don't quite understand if CustomMacros should work in math display mode by design
Ah, yes, now I understand #126 :) Your analysis is correct, the latex.js macros are not (yet) available in KaTeX. I just had a look at the KaTeX API: it is possible to pass a macros object to KaTeX. Maybe it is possible to create a compatible object from LaTeX.js automatically... I have to investigate.
I created a macro which should transform one string to another. If I try to render such string:
"\mymacro$\mymacro$"
, it works in first part but second part renders as a red "\mymacro" text instead of what it should have been transformed to. I read generator/htmlgenerator source code and came to a conclusion that it won't render because math pieces of the document are rendered via katex and my macros are not sent there. Is it true? If so, what would you recommend to create math mode macros? If not, why won't the macro render in math mode? Also, I believe #126 was a question about that.The text was updated successfully, but these errors were encountered: