Math bugs in note editor
dstillman
Zotero Team
This discussion was created from comments split from: Available for beta testing: Markdown export of notes.
Upgrade Storage
For instance,
1). enclosing an expression in $expression$ works as expected but when you try to edit that expression, e.g., simply trying to delete the $ sign in order to be left only with the expression is almost impossible unless you re-write the whole expression.
2). trying to add math notes in display mode, e.g., $$expression$$ doesn't work as expected no display mode and the expression is not even being properly rendered.
3.) tables in markdown notation are not properly rendered in the note editor, and, also old md notes with math in them they seem to be rendered as images, i.e. not editable any more.
1) Do you mean you want to convert a math node back into plain text or what?
2) Does it work as expected if you type $$ and press space?
3) Markdown tables aren't supported currently. Do you mean you were able edit math in old MD notes? How?
2) Yes it does, which might be an indication of why things are not being parsed correctly. I don't know the inner workings of the note editor but seems like its looking for $ followed by a space to render properly the the math expression. If so this could explain the issue in 1). Usually you'd expect that any expression $expression$ or $$expression$$ regardless of space would be appropriately rendered and editing and changing expressions from $expression$ to $$expression$$ or vise versa should be easy and hassle free by just adding or removing additional $ signs.
3) Yes, I was able to edit math and tables in old note editor by using an external plugin (Markdown Here) that would toggle markdown mode in note editor on and off. By toggling markdown off in note editor you were able to write/edit/update notes in markdown, and, toggling markdown on would properly render that markdown including tables, but now after the MD note editor update the math expressions are rendered as images when I use this plugin and cannot edit them anymore.
Hope that clarifies things a bit!
For (2), you toggle block mode with
$$+spaceon a new line. For inline mode, it will be rendered when you pressspaceafter the closing$.Steps to reproduce:
1) start with a simple expression
$y = x^2$2) after either right arrow out of the expression or adding space the expression is properly rendered as inline math
3) edit the expression
$y = x^2$to change it to a display mode by adding additional$like$$ y = x^2 $$.4) as can be seen I've added additional
$+spacein the inline expression but is not being rendered correctly, it shows the original expression$y = x^2$as un-rendered5) starting with
$$+spacedoes provide a display mode, but that's not what we want, want to be able to change between inline and display mode by adding additional$signs without having start on a new line or rewrite the expressiony=x^2on a different line.So you're talking about switching between inline mode and block mode. I'll let @martynas_b comment on the feasibility of switching between the two modes. As far as I know, the only way to do that now would be by copying and pasting, as you say.
$. There're too many complications with that.But we could consider adding a context menu option for that. I.e. "Turn Into Block".