-
-
Notifications
You must be signed in to change notification settings - Fork 82
[BUG] TeX preview leaks definitions #515
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestupstreamSomething not possible or wrong with mathjax (math), obsidian or codemirror 6 (editor)Something not possible or wrong with mathjax (math), obsidian or codemirror 6 (editor)wontfixThis will not be worked onThis will not be worked on
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestupstreamSomething not possible or wrong with mathjax (math), obsidian or codemirror 6 (editor)Something not possible or wrong with mathjax (math), obsidian or codemirror 6 (editor)wontfixThis will not be worked onThis will not be worked on
Description
The preview tooltips are leaking their tex definitions. This becomes a problem in the Excalidraw preview dialog, but also anytime you're writing and deleting a definition again. (The definition will be persistent)
How to reproduce
Work in source-mode, write and delete a definition. Idealy redefine one.
We assume our preamble looks like:
we will write something like this, without switching to preview mode (Obsidian won't try to render this)
If we were to start a new math environment now,
\abs{...}would stil output red text, because it was executed by the preview.Expected Behavior
The plugin should save and restore the
SymbolMaps from MathJax during rendering. (see my changes to prevent this in Excalidraw)Another way arround this might be to create temporary command maps which are removed after rendering, but I'm not sure if that's possible.