This is a VS Code extension to help you convert a standard LaTeX math equation like ## Table of Contents## Demo## FeaturesThere are two modes in which we will render your math equations in Markdown: - Locally (with MathJax and sourcing relative SVG), and...
- Remotely (with GitHub's LaTeX rendering server).
## Rendering remotelyThis is actually a hack. GitHub won't render LaTeX equations inside normal places like GitHub README, but it can render them in Jupyter notebooks, so we took advantage of this feature, utilizing GitHub's equation rendering server to embed SVG equations in GitHub. (See here for details: A hack for showing LaTeX formulas in GitHub markdown.) Basically we can convert a standard LaTeX math equation like the
... to a rendered image tag with the help of GitHub's math rendering server:
## Rendering locallyNot everywhere accept external SVGs. To circumvent this type of scenario, we can render math equations directly to local SVGs (with MathJax), and embed these local SVGs into our Markdown as a workaround. We can convert the same LaTeX math equation:
To a local SVG like:
If you are reading this on GitHub, you can see that both of these methods work when we need to add math equations to READMEs or other Markdown files on GitHub. See examples for more math equation rendering scenarios, i.e, inline math, aligned environments... ## Extension SettingsYou can specify the path to save the locally rendered SVG image. The settings are self-explanatory. **vscode-math-to-image.svgSavePath**:`Current file directory` : Generated SVG files will be put in a folder under current file's directory.`Current workspace directory` : Generated SVG files will be put in a folder under current workspace directory.
## Change LogFor version updates and bug fixes, please see: CHANGELOG. 📐 Authored and maintained by TeamMeow members. |