In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to solve the vscode latex can not preview the problem, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
What if vscode latex cannot preview?
Preview Markdown and LATEX in real time under VS Code
Related recommendation: vscode tutorial
Preparing for the final exam these days, I intend to find a convenient text editor to take notes. Just installed VS Code, feel very easy to use, itself can also preview Markdown in real time, I intend to use it directly.
However, Markdown does not support LATEX natively, so you can only make do with html tag such as and, which is time-consuming and laborious. After taking a look at VS Marketplace, I found that there is a plug-in called Instant Markdown that can send markdown source files to the browser in real time and render the preview effect. Although LATEX is not supported natively, it can be changed. If you have plenty of food and clothing yourself, why not.
The heart is happy, install decisively. After installing, I opened a .md file and found that the plug-in had automatically opened a web page with the default browser, and render produced the effect. Change the plug-in yourself, and add MathJax Library, and you can already render the LATEX in Markdown. The steps are as follows:
First, from the terminal / command prompt, cd $HOME/.vscode/extensions/dbankier.vscode-instant-markdown-0.1.0/node_modules/instant-markdown-d goes to the directory of the instant-markdown plug-in.
Open index.html and add the following code to the tag:
MathJax.Hub.Config ({tex2jax: {inlineMath: [['$','$'], ['\ (','\)']]}})
In
Socket.on ('newContent', function (newHTML) {document.querySelector (".markdown-body") [xss_clean] = newHTML
Add a line after that
MathJax.Hub.Queue (["Typeset", MathJax.Hub])
Both:
Var socket = io.connect ('http://localhost:8090/'); socket.on (' connect', function () {socket.on ('newContent', function (newHTML) {document.querySelector (".markdown-body") [xss_clean] = newHTML;+ MathJax.Hub.Queue (["Typeset", MathJax.Hub]);}) Socket.on ('die', function (newHTML) {window.open (','_ self','); window.close (); var firefoxWarning = "Oops!" + "Firefox doesn't allow windows to self-close." + "If you want the preview window to close automatically like in other browsers, go to about:config and set dom.allow_scripts_to_close_windows to true." Document.body [XSS _ clean] = firefoxWarning;});})
4. Save, close the web page, restart VS Code, and everything will be fine.
Thank you for reading this article carefully. I hope the article "how to solve the problem that vscode latex cannot preview" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.