text icon indicating copy to clipboard operation
text copied to clipboard

Support Latex Math commands

Open giannistolou opened this issue 2 years ago • 1 comments

Hello :wave:,

I started using Nextcloud and Collectives a few weeks ago, and I love it. It's incredibly user-friendly, and the markdown support is fantastic. However, I've encountered a critical problem because it doesn't support LaTeX and mathematical symbols. If you work or study in a scientific field, you will need this support to write and share mathematical symbols.

I'm wondering if you can add LaTeX support to help everyone who uses it. This is such an important feature for education, mathematicians and more.

Unfortunately, I don't know much about the infrastructure of Collectives and Nextcloud, but I'd like to suggest some libraries that can work on the frontend using the $$ math symbol $$ or $ math symbol $: KaTeX and MathJax.

I've also noticed a similar issue in the Notes app.

giannistolou avatar Oct 27 '23 20:10 giannistolou

This is essential. KaTeX is favourable as it renders vectorised equations, rather than raster copies like Mathjax.

henrysheehy avatar Mar 11 '25 11:03 henrysheehy

There is actually https://tiptap.dev/docs/editor/extensions/nodes/mathematics these days, so this could be a good first contribution to integrate this extension into text. The important part in addition to integrating the extension is that the node needs to be extended to be able to have a markdown representation with a toMarkdown. For loading existing files we need markdown it to handle transform this syntax to html which can then again be picked up by the tiptap node in the parseHTML function. A good sample of how this is done with other nodes is the callout node type.

https://www.npmjs.com/package/@iktakahiro/markdown-it-katex#block may be a good option for the markdown representation.

juliusknorr avatar Oct 30 '25 12:10 juliusknorr