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

Real-time math preview #1427

Closed
tamuratak opened this issue Jun 8, 2019 · 14 comments · Fixed by #2294
Closed

Real-time math preview #1427

tamuratak opened this issue Jun 8, 2019 · 14 comments · Fixed by #2294
Assignees
Labels
enhancement Issue suggests an enhancement

Comments

@tamuratak
Copy link
Contributor

tamuratak commented Jun 8, 2019

In VS Code Insiders, WebviewEditorInset has become available. So, I have implemented real-time math preview. It is fast and lightweight than I expected. This feature seems promising. Related to #1122 and #1420.

Jun-08-2019 11-17-53

You can try on this branch with VS Code Insiders. You can toggle with Ctrl-l Ctrl-i.

I hope you enjoy this feature.

Technical Details

  • MathJax is used to render equations as before.
  • Displaying multiple real-time math previews at the same time is very heavy because WebviewEditorInset is implemented with WebView.
  • Horizontal alignment is not configurable because of the restriction of VS Code API. We can not display an equation directly below an inline math.
  • To implement this feature, I have split the math preview code in src/providers/hover.ts into src/components/mathpreview.ts.
@tamuratak tamuratak added the feature request Feature request label Jun 8, 2019
@James-Yu
Copy link
Owner

James-Yu commented Jun 8, 2019

Awesome! Happy to merge the feature once it and vscode are ready.

@ofenerci
Copy link

ofenerci commented Jun 9, 2019

Very interesting feature!

@tecosaur

This comment has been minimized.

@jlelong

This comment has been minimized.

@tecosaur

This comment has been minimized.

@tecosaur

This comment has been minimized.

@tamuratak

This comment has been minimized.

@jlelong jlelong added enhancement Issue suggests an enhancement and removed feature request Feature request labels Jun 15, 2019
@tecosaur tecosaur mentioned this issue Jun 18, 2019
9 tasks
@cvcore

This comment has been minimized.

@jlelong
Copy link
Collaborator

jlelong commented Sep 28, 2019

Up. Any news on this issue?

@tamuratak
Copy link
Contributor Author

No. The API is still experimental. Only available in vscode.proposed.d.ts

@tamuratak
Copy link
Contributor Author

A discussion on the proposed API continues in microsoft/vscode/issues/85682 . Up voting in the issue might encourage the deployment of the API.

@Kaiyokun

This comment has been minimized.

@tamuratak

This comment has been minimized.

@Kaiyokun

This comment has been minimized.

Repository owner locked as resolved and limited conversation to collaborators Sep 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Issue suggests an enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants