web-client icon indicating copy to clipboard operation
web-client copied to clipboard

[Feature] Support editing formulas

Open dhda opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. I want to be able to edit math formulas after I enter them. There seems to be noway to do it now–once they are entered, that's it. No editing, no way to recover the source LaTeX that created the formula.

Describe the solution you'd like The minimum solution is to have the formula editor load the source of the formula that is currently under the cursor or selected, and allow it to be edited and added again.

My ideal solution would be to have formulas entered and stored as text surrounded by delimiters like $...$ that is automatically rendered, and able to be edited inline (maybe by double clicking or right click edit or something like that). It seems like your use of markdown is more as a shortcut as opposed to any kind of underlying implementation so that might not be super feasible without a lot of work.

dhda avatar May 06 '20 02:05 dhda

Hello there 👋🏻

This is a fantastic idea! The LaTeX editor is long overdue some cosmetic updates anyway! I'll see what I can do to improve based on your feedback. I'm sure we can make this process easier somehow.

Shortly, formulas are rendered sort of like youtube embeds. And the problem with this is that, the formula you've typed gets processed before it gets displayed. We do store the original formula in the editor however, so that's good news, and it should be possible to add a simple edit-formula box much like the edit url/hyperlink box, or at least find a way to make it display the raw formula text somewhere.

As for markdown-like rendering. This I'm afraid we can't do, in the interest of continuing to be markdown-spec compliant. Markdown specifications don't actually have math/LaTeX etc. We can add in our own flavor today, but there's nothing stopping markdown specs from getting updated tomorrow with something like $...$ makes something bold etc. (just an example, you got the idea)

So I'm not a fan of inventing our own markdown shortcuts, and I think it's crucial that Cryptee is inter-operable with other markdown editors. (Both from a long term code-maintenance standpoint for us, and from a user-experience standpoint)

I'll keep this issue open, and keep you posted!

johnozbay avatar Jun 07 '20 06:06 johnozbay