VSCode + Latex 配置
生活随笔
收集整理的這篇文章主要介紹了
VSCode + Latex 配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 安裝VSCode
VSCode下載
next,next就安裝好了。
2. 配置VSCode
2.1 安裝LaTeX Workshop插件
install,安裝LaTeX Workshop插件
2.2 修改 user setting
點擊左下角,進入用戶設置
點擊上圖標記的部分,選擇
打開settings.json
具體配置文件如下:
{"latex-workshop.latex.recipes": [{"name": "xelatex","tools": ["xelatex"]}, {"name": "latexmk","tools": ["latexmk"]},{"name": "pdflatex -> bibtex -> pdflatex*2","tools": ["pdflatex","bibtex","pdflatex","pdflatex"]}],"latex-workshop.latex.tools": [{"name": "latexmk","command": "latexmk","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","-pdf","%DOC%"]}, {"name": "xelatex","command": "xelatex","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"]}, {"name": "pdflatex","command": "pdflatex","args": ["-synctex=1","-interaction=nonstopmode","-file-line-error","%DOC%"]}, {"name": "bibtex","command": "bibtex","args": ["%DOCFILE%"]}],"latex-workshop.view.pdf.viewer": "tab","latex-workshop.latex.clean.fileTypes": ["*.aux","*.bbl","*.blg","*.idx","*.ind","*.lof","*.lot","*.out","*.toc","*.acn","*.acr","*.alg","*.glg","*.glo","*.gls","*.ist","*.fls","*.log","*.fdb_latexmk"],}重啟VSCode。
3. 測試
(1)新建并打開文件夾,之后所有產生的文件都在此文件夾下
(2)新建tex文件
擴展名是 .tex
(3)編寫tex文檔
在 test.tex 中輸入:
\documentclass{article} \begin{document} hello,world \end{document}單擊"Recipe:xelatex",使用xelatex編譯,
預覽可以選擇在VSCode的標簽頁中打開,也可以選擇在瀏覽器中打開。或者點擊右上角的預覽按鈕。
注意:當你更改了tex文檔的時候,需要先進行編譯,然后才能預覽,否則內容還是修改之前的內容
在vs界面中的預覽效果:
在瀏覽器上的預覽效果:
4. 使用 texlive 編輯tex 文檔
Windows系統下latex:texlive2016和texstudio
texstudio 相當于編程時的IDE,可以使用這個經驗貼安裝texstudio,然后在texstudio中編寫tex文檔。所以如果你準備用VSCode來編寫tex文檔的話,可以不用安裝texstudio。
總結
以上是生活随笔為你收集整理的VSCode + Latex 配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: NIO网络编程实战之简单多人聊天室
- 下一篇: CentOS 7 + Hadoop3 伪