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

Not working with live preview #17

Closed
ndharari opened this issue Jan 6, 2022 · 11 comments · Fixed by #19
Closed

Not working with live preview #17

ndharari opened this issue Jan 6, 2022 · 11 comments · Fixed by #19
Assignees

Comments

@ndharari
Copy link

ndharari commented Jan 6, 2022

The plugin is not working in the new update, the commands do not appear in the command pallete

@raineszm
Copy link
Owner

Sorry. This is due to live preview using CodeMirror6 while this plugin was using some of the CodeMirror5 internals. I'm working on porting to use obsidian's compatibility layer but there is some functionality that isn't exposed. I'll probably roll by own version independent solution for those bits, but it may take a little bit of time.

@raineszm raineszm self-assigned this Jan 17, 2022
@ndharari
Copy link
Author

Great man, keep up the excellent job!

@ndharari
Copy link
Author

Any news? Loved your pluggin!

@raineszm
Copy link
Owner

I've been working on updating the plugin. Due to how it was implemented before I've had to rewrite most of the internal details but at this point it's mostly working. I have to iron out a couple of issue with whitespace and see if I'm able to properly detect when the editor is in a math mode section easily. After that I hope to make a release.

@brianbecsi
Copy link

Great, thank you!

raineszm added a commit that referenced this issue Feb 10, 2022
…tion

This allows the plugin to be used with live preview.

BREAKING CHANGE: Some behavior may differ from previous versions as the backend was completely rewritten. Fixes #17
@raineszm
Copy link
Owner

I have packaged up a prerelease of my rewrites. Would anyone be willing to install this using the manual install method in the readme and just test it out a bit?

obsidian-latex-environments-0.3.0-0.zip

@ndharari
Copy link
Author

I'll let a try and ley you know!

@ndharari
Copy link
Author

I did only a little bit of testing but for now its working great.
Only one bug: double input environments are not deleting correctly, so

\begin{alignedat}{2} -->  2} 
\end{array}{rlrl}  --> rlrl} 

on both begin and end statements the deletion bug is the same

@raineszm
Copy link
Owner

Thanks for the testing! Is the latter valid latex? I believe this is related to #8. Supporting environments with multiple arguments is definitely planned but I'm not sure it should delay this release. That being said, even if they are not supported, the extra brace getting deleted is a bug. I'll try to iron that at some of the whitespace bugs I'm seeing out over the next couple days.

@ndharari
Copy link
Author

No, you are right, the latter is not valid latex. Was just trying to make a quick example.
I was just to find the bug again and cannot reproduce it, so maybe was a one-timer.

@ndharari
Copy link
Author

Another thing thats not a bug but a mild inconveniance. Sometimes after using the "change environment" the screen jumps to the beggining of the document. Its annoying but it does not break stuff

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

Successfully merging a pull request may close this issue.

3 participants