Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor in LaTeX equations #191

Open
diomidov opened this issue Jun 20, 2021 · 2 comments
Open

Cursor in LaTeX equations #191

diomidov opened this issue Jun 20, 2021 · 2 comments

Comments

@diomidov
Copy link

When the text cursor is inside an equation, it is shown before the equation:
image
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:
image
It does this by inserting {\color{...}\!|\!} at the cursor position before calling the LaTeX renderer (source). Unfortunately this approach can occasionally fail:
image

I'm not sure if this is better or worse than what we currently have in Cocreate...

@edemaine
Copy link
Owner

edemaine commented Jun 20, 2021

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?

@diomidov
Copy link
Author

Maybe the cursor shouldn't render at all when it's inside the formula? That'd still be better than what we have now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants