
I. VSCode+Latex安裝
- VSCode+Git安裝
lonelybag:vscode_git_github 配置教程zhuanlan.zhihu.com
- Latex安裝
踏歌:編寫中文Latex(VSCode+TexLive)zhuanlan.zhihu.com
或
Marvey:使用VSCode編寫LaTeXzhuanlan.zhihu.com
II. VSCode配置
2.1 英文配置
- 下載下傳 Latex Workshop 并安裝
此時已經滿足英文的編譯要求
- 編譯 Ctrl+Alt+B
- PDF預覽 Ctrl+Alt+V
- 反向搜尋 Ctrl+單擊
編譯Ctrl+Alt+B - PDF預覽Ctrl+Alt+V - 反向搜尋Ctrl+單擊
2.2 中文配置
- 打開 Latex Workshop 的 setting.json - 鍵入 Ctrl + , 或執行
- 在 {} 中複制如下代碼并 儲存 ,此處參考
// Latex workshop
"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.latex.recipes": [
{
"name": "xelatex",
"tools": [
"xelatex"
]
},
{
"name": "latexmk",
"tools": [
"latexmk"
]
},
{
"name": "pdflatex -> bibtex -> pdflatex*2",
"tools": [
"pdflatex",
"bibtex",
"pdflatex",
"pdflatex"
]
}
],
"latex-workshop.view.pdf.viewer": "tab",
"latex-workshop.latex.clean.enabled": true,
"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"
],
"latex-workshop.latex.autoClean.run": "onBuilt",
- 效果
編譯Ctrl+Alt+B - PDF預覽Ctrl+Alt+V - 反向搜尋Ctrl+單擊
III. 常用指令
- 注釋&取消注釋
Ctrl + K 接着 Ctrl + C
Ctrl + K 接着 Ctrl + U
- 點選 超連結 後, 傳回原位置 鍵入
Alt + 左箭頭
- Tex live 指令行安裝 宏包
tlmgr install <package-name> % 安裝某個宏包
tlmgr remove <package-name> % 解除安裝某個宏包
tlmgr update --all --self % 更新所有宏包(包括 tlmgr 本身)
tlmgr update --list % 列出所有可更新的宏包
tlmgr repository set http://.../CTAN/systems/texlive/tlnet % 指定更新源(CTAN)位址
tlmgr info <package-name> % 檢視宏包資訊
% 加 --list 參數可列出宏包的所有檔案
IV. 本文制作工具
- 錄屏gif制作軟體
Cockos Incorporated | LICEcapwww.cockos.com
關于作者 目前電氣工程碩士在讀,平常喜歡琢磨有限元仿真、Matlab、Latex、三維模組化等一切有趣的東西 一些成果會放在 Github 或者 知乎,也歡迎通過郵箱聯系我 [email protected]