cocreate
cocreate copied to clipboard
Cursor in LaTeX equations
When the text cursor is inside an equation, it is shown before the equation:
It would be nice if the cursor was shown correctly inside the equation.
Related: when you hover your mouse over an equation in VS Code, it renders it with the cursor:
It does this by inserting
{\color{...}\!|\!}
at the cursor position before calling the LaTeX renderer (source). Unfortunately this approach can occasionally fail:
I'm not sure if this is better or worse than what we currently have in Cocreate...
As the LaTeX rendering is expensive in Cocreate (as it uses MathJax instead of KaTeX like VSCode does), I'd rather not rerender as the cursor moves. I think the current behavior is best, unless you think an underline of or box around the formula would be better?
Maybe the cursor shouldn't render at all when it's inside the formula? That'd still be better than what we have now.