Latex Macro Support

Big thanks to the Logseq team to build such a fantastic App! I use it every day to keep track of my research progress. I wonder if it is possible to provide a way to define the Latex macro in a file for all the pages so that I can make a smoother transition to other platforms like LatexStudio and Overleaf.

+1 Ah yes, this would be nice!

Related: Latex snippets?

Roam Research introduced something similar recently.

1 Like

It seems this is a feature of KaTeX. Maybe Logseq could support this too easily?

If you need LaTeX macro feature without waiting for the official support, you can try out my plugin logseq-display-math which has just included KaTeX custom macro support.

Edited: Remove links to avoid stupid and unfriendly “post hidden”


@Allan_Chain as a heavy LaTeX user, your plugin is really useful, thank you!

As for the moderation, it is in place catching new users making multiple posts with links to the same domain, that it was your case, unfortunately. I’d say it’s reasonable heuristics against spam bots. For future reference, just leave the post as it is: I usually approve posts catched by auto-moderation on a daily basis.


Sorry about that! I’ve upped your trust level, which should allow you to post multiple links in a post.

Thank you for contributing to the community :pray:


Actually, they are just advertising a feature that’s available in KaTeX. Probably something similar works in Logseq? So in Roam, you have write a \def somewhere within $...$, and have this cell be rendered by LaTeX before any other block, to inform Mathjax / KaTeX of the macro.

Here there is the link for convenience:

1 Like