Hi,
I have implemented hover preview. When you put your mouse cursor on \begin{...} or $...$, then an equation rendered with MathJax hovers. I want this one to be merged to LaTeX-Workshop although it is now alpha version. Please try this branch. Additional libraries are not required.

implementation
- In HoverProvider, we send a string of equation to WebView using WebView.postMessage
- In WebView, with MathJax, we convert the string to a SVG string.
- We render the SVG string in a canvas element again.
- Wiht HTMLCanvasElement.toDataURL, we convert the image in the canvas element to a string of png dataURL.
- We send back the string to LaTeX-Workshop extension process with postMessage.
- We make a markdown string with the dataURL.
- Hover renders the markdown.
- We've done it!
Pros
- Fast. It must be faster than you expect. Thanks to V8.
- We do not need to install any other libraries and binaries. Implemented only in TypeScript and JavaScript.
- No abusing of VSCode API. I believe.
Cons
- We need WebView. We now use the WebView of pdf.js viewer for that purpose. When you close the preview tab, hover will not appear.
- Hover API is very restricted. Additional features are impossible.
ToDo
- Change colors of rendered equations to appropriate ones for each theme. Now only suited for light themes.
- Zoom option for rendered euqations.
- Others?
Hi,$...$ , then an equation rendered with MathJax hovers. I want this one to be merged to LaTeX-Workshop although it is now alpha version. Please try this branch. Additional libraries are not required.
I have implemented hover preview. When you put your mouse cursor on \begin{...} or
implementation
Pros
Cons
ToDo