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

Is it possible to have an inline math preview feature that reveals realtime changes? #1420

Closed
DRuiCHEN opened this issue Jun 3, 2019 · 4 comments
Labels
feature request Feature request

Comments

@DRuiCHEN
Copy link

DRuiCHEN commented Jun 3, 2019

The math preview on-hover feature is great and makes it more efficient to preview math equations. However, the preview disappear once I press any key or move the mouse cursor away. As a result, every time we modify the equations we have to move the mouse cursor again to trigger the preview.

I am wondering if we can somehow make the followings happen:

  1. pin the hovering-preview, say, by some hotkeys, so that it won't disappear when we move the cursor away or modify the equations;
  2. the preview auto updates to reveal realtime changes in the equations.
@DRuiCHEN DRuiCHEN added the feature request Feature request label Jun 3, 2019
@seragunn
Copy link
Contributor

seragunn commented Jun 3, 2019

There are various extensions for quick math preview inside a Markdown document. Maybe it would be possible to have our extension open up a new markdown tab to use such extensions.

Now that I'm thinking about it, one would like to be able to copy the equations between the latex document and the markdown document and I don't think there's a good way to do this, because LaTeX-workshop doesn't touch markdown files.

Another consideration is that you probably want such a preview function to be done using KaTeX rather than MathJax, which is the current renderer. KaTeX is faster and this is important if you're constantly trying to update it in a "live preview". Most of the markdown extensions use KaTeX. If we wanted to do that in this extension, we'd have to bundle a copy of KaTeX.

The more I think about it, the more I believe that anything beyond a simple "copy this equation into a new markdown document" is going to be too complicated to develop and maintain.

@DRuiCHEN
Copy link
Author

DRuiCHEN commented Jun 4, 2019

Thank you for getting to the request so quickly.
I agree that a "live preview" feature could be too heavy to have for now. But is there a simple way to make it easier to trigger the hovering preview? The hovering preview feature that we currently have is great, but I am just so reluctant to move to the beginning of the math block every time I want to see the preview...

@tecosaur
Copy link
Contributor

tecosaur commented Jun 4, 2019

Personally, I'm looking forward to when this API (microsoft/vscode#66418) enters stable,
— see #1122.

I think that is the best method of approaching this. Simply put, hover preview was designed for taking a quick peek, this is more what we really want.

@DRuiCHEN
Copy link
Author

DRuiCHEN commented Jun 4, 2019

Thanks a lot! I look forward the future enhancement.

@DRuiCHEN DRuiCHEN closed this as completed Jun 4, 2019
Repository owner locked as resolved and limited conversation to collaborators Oct 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

3 participants