当前位置: 首页 > 工具软件 > ipynb-tex > 使用案例 >

Windows Latex写作之VScode + TeX Live

怀晋
2023-12-01
  1. 下载并安装 texlive,选择.iso下载(4G+),然后解压,右键管理员运行install-tl-windows.bat,选择安装路径后按默认设置安装即可;
  2. VScode扩展商店中,安装LaTex和LaTex Workshop;
  3. VScode中F1,键入“open setting”,搜索“首选项-打开设置(json)”,在打开的settings.json中输入如下跟LaTex配置相关的内容:
    {	
    	// 其它配置
        "remote.SSH.remotePlatform": {
            "202.120.39.131": "linux",
            "202.120.39.131-20300": "linux"
        },
        "workbench.editorAssociations": {
            "*.ipynb": "jupyter-notebook"
        },
        "editor.fontSize": 18,
        "notebook.cellToolbarLocation": {
            "default": "right",
            "jupyter-notebook": "left"
        },
        "jupyter.interactiveWindowMode": "perFile",
        "python.showStartPage": false,
        "workbench.colorTheme": "Default Light+",
        "python.defaultInterpreterPath": "D:\\Programs\\miniconda3\\envs\\3Dsense\\python.exe",
        "remote.SSH.configFile": "C:\\Users\\Lenovo\\.ssh\\config",
        "jupyter.themeMatplotlibPlots": true,
        "terminal.integrated.defaultProfile.windows": "Command Prompt",
        "files.autoSave": "afterDelay",
        "terminal.integrated.defaultProfile.linux": "bash",
        "bracketPairColorizer.depreciation-notice": false,
        "editor.fontLigatures": false,
        "launch": {
            
            "inputs": [],
    
            "configurations": [],
            "compounds": []
        },
    
        // 以下是跟LaTex相关的配置
        "latex.linter.enabled": false,
        "latex-workshop.latex.autoBuild.run": "never",
        // "latex-workshop.showContextMenu": true,
        "latex-workshop.intellisense.package.enabled": true,
        "latex-workshop.message.error.show": false,
        "latex-workshop.message.warning.show": false,
        "latex-workshop.latex.autoClean.run": "onFailed",
        "latex-workshop.latex.recipe.default": "lastUsed",
        "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
        "latex-workshop.view.pdf.viewer": "tab",
        "latex-workshop.latex.recipes": [
    
            {
                "name": "LaTeXmk ",
                "tools": [
                    "latexmk"
                ]
            },
            
            {
                "name": "LaTeXmk (xelatex)",
                "tools": [
                    "xelatexmk"
                ]
            },
    
            {
                "name": "XeLaTeX",
                "tools": [
                    "xelatex"
                ]
            },
            {
                "name": "PDFLaTeX",
                "tools": [
                    "pdflatex"
                ]
            },
            {
                "name": "BibTeX",
                "tools": [
                    "bibtex"
                ]
            },
            
            {
                "name": "xelatex -> bibtex -> xelatex*2",
                "tools": [
                    "xelatex",
                    "bibtex",
                    "xelatex",
                    "xelatex"
                ]
            },
            {
                "name": "pdflatex -> bibtex -> pdflatex*2",
                "tools": [
                    "pdflatex",
                    "bibtex",
                    "pdflatex",
                    "pdflatex"
                ]
            },
            
        ],
        "latex-workshop.latex.tools": [
            {
                "name": "xelatex",
                "command": "xelatex",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "%DOCFILE%"
                ]
            },
    
            {
                "name": "pdflatex",
                "command": "pdflatex",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "%DOCFILE%"
                ],
                "env": {}
            },
    
            {
                "name": "latexmk",
                "command": "latexmk",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "-pdf",
                    "-outdir=%OUTDIR%",
                    "%DOCDOCFILE%"
                ],
                "env": {}
            },
           
            {
                "name": "xelatexmk",
                "command": "latexmk",
                "args": [
                    "-synctex=1",
                    "-interaction=nonstopmode",
                    "-file-line-error",
                    "-xelatex",
                    "-outdir=%OUTDIR%",
                    "%DOCFILE%"
                ],
                "env": {}
            },
            
            {
                "name": "bibtex",
                "command": "bibtex",
                "args": [
                    "%DOCFILE%"
                ],
                "env": {}
            },
        ],
        "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"
        ],
    
    }
    
 类似资料: