Latex远程编译服务器(Latex worksho),我真的很想要一个这种东西,但是配置起来太花费时间了,有没有好的解决方案

Latex远程编译服务器(Latex worksho),我真的很想要一个这种东西,但是配置起来太花费时间了,有没有好的解决方案

这两个博客写的都非常好:

https://zhuanlan.zhihu.com/p/166523064

https://jintaolee-roger.github.io/posts/latexsearch/


还是安装一下吧,最花费时间的有两个点:

1、latex下载;10分钟左右

2、latex安装,20分钟左右;

3、环境配置,15分钟左右;

开始本地安装

CTAN/systems/texlive/Images/

1、 https://mirrors.nwafu.edu.cn/ctan/systems/texlive/Images/

下载速度大概在14 MB/s,最高能冲到到20MB/s 吧(当前地点在PKU)

2、 https://mirrors.cloud.tencent.com/CTAN/systems/texlive/Images/


正方向搜索:

https://jintaolee-roger.github.io/posts/latexsearch/

Ctrl+Alt+J

Ctrl+Shift+J


最终的vscdoe中的环境配置如下(2022年11月17日19:07:26):

{
  "editor.fontSize": 25,
  "explorer.confirmDelete": false,
  "files.autoSave": "afterDelay",
  "editor.fontFamily": "Consolas, 'SimSun', monospace",
  "editor.renderControlCharacters": true,
  "git.confirmSync": false,
  "git.autofetch": true,
  "editor.wordWrap": "bounded",
  "explorer.confirmDragAndDrop": false,
  "terminal.integrated.tabs.enabled": true,
  "workbench.editorAssociations": {
    "*.ipynb": "jupyter-notebook"
  },
  "notebook.cellToolbarLocation": {
    "default": "right",
    "jupyter-notebook": "left"
  },
  "security.workspace.trust.untrustedFiles": "open",
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.profiles.windows": {
    "C:/Program Files/Git/bin/bash.exe (migrated)": {
      "path": "C:/Program Files/Git/bin/bash.exe",
      "args": []
    }
  },
  "leetcode.endpoint": "leetcode-cn",
  "leetcode.workspaceFolder": "d:/PythonProject/leetcode",
  "leetcode.defaultLanguage": "python3",
  "markdown.preview.fontSize": 35,
  "terminal.integrated.fontSize": 25,
  "notebook.markup.fontSize": 1,
  // vscode默认启用了根据文件类型自动设置tabsize的选项
  "editor.detectIndentation": false,
  // 重新设定tabsize
  "editor.tabSize": 2,
  // #每次保存的时候自动格式化 
  "editor.formatOnSave": true,
  // #每次保存的时候将代码按eslint格式进行修复
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  // 添加 vue 支持
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue",
  ],
  // #让prettier使用eslint的代码格式进行校验 
  "prettier.eslintIntegration": true,
  // #去掉代码结尾的分号 
  "prettier.semi": false,
  // #使用带引号替代双引号 
  "prettier.singleQuote": true,
  // #让函数(名)和后面的括号之间加个空格
  "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
  // #这个按用户自身习惯选择 
  "vetur.format.defaultFormatter.html": "js-beautify-html",
  // #让vue中的js按编辑器自带的ts格式进行格式化 
  "vetur.format.defaultFormatter.js": "vscode-typescript",
  "vetur.format.defaultFormatterOptions": {
    "js-beautify-html": {
      "wrap_line_length": 120,
      "wrap_attributes": "auto"
      // #vue组件中html代码格式化样式
    }
  },
  // 格式化stylus, 需安装Manta's Stylus Supremacy插件
  "stylusSupremacy.insertColons": false, // 是否插入冒号
  "stylusSupremacy.insertSemicolons": false, // 是否插入分号
  "stylusSupremacy.insertBraces": false, // 是否插入大括号
  "stylusSupremacy.insertNewLineAroundImports": false, // import之后是否换行
  "stylusSupremacy.insertNewLineAroundBlocks": false,
  "explorer.confirmDelete": false,
  "editor.unicodeHighlight.ambiguousCharacters": false,
  //------------------------------LaTeX 配置----------------------------------
  // 设置是否自动编译
  "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.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%"
      ]
    },
    {
      "name": "latexmk",
      "command": "latexmk",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "-pdf",
        "-outdir=%OUTDIR%",
        "%DOCFILE%"
      ]
    },
    {
      "name": "bibtex",
      "command": "bibtex",
      "args": [
        "%DOCFILE%"
      ]
    }
  ],
  // 用于配置编译链
  "latex-workshop.latex.recipes": [
    {
      "name": "XeLaTeX",
      "tools": [
        "xelatex"
      ]
    },
    {
      "name": "PDFLaTeX",
      "tools": [
        "pdflatex"
      ]
    },
    {
      "name": "BibTeX",
      "tools": [
        "bibtex"
      ]
    },
    {
      "name": "LaTeXmk",
      "tools": [
        "latexmk"
      ]
    },
    {
      "name": "xelatex -> bibtex -> xelatex*2",
      "tools": [
        "xelatex",
        "bibtex",
        "xelatex",
        "xelatex"
      ]
    },
    {
      "name": "pdflatex -> bibtex -> pdflatex*2",
      "tools": [
        "pdflatex",
        "bibtex",
        "pdflatex",
        "pdflatex"
      ]
    }
  ],
  //文件清理。此属性必须是字符串数组
  "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"
  ],
  //设置为onFaild 在构建失败后清除辅助文件
  "latex-workshop.latex.autoClean.run": "onFailed",
  // 使用上次的recipe编译组合
  "latex-workshop.latex.recipe.default": "lastUsed",
  // 用于反向同步的内部查看器的键绑定。ctrl/cmd +点击(默认)或双击
  "latex-workshop.view.pdf.internal.synctex.keybinding": "double-click",
  //使用 SumatraPDF 预览编译好的PDF文件
  // 设置VScode内部查看生成的pdf文件
  "latex-workshop.view.pdf.viewer": "external",
  // PDF查看器用于在\ref上的[View on PDF]链接
  "latex-workshop.view.pdf.ref.viewer": "auto",
  // 使用外部查看器时要执行的命令。此功能不受官方支持。
  "latex-workshop.view.pdf.external.viewer.command": "C:/Users/XXXX/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
  // 使用外部查看器时,latex-workshop.view.pdf.external.view .command的参数。此功能不受官方支持。%PDF%是用于生成PDF文件的绝对路径的占位符。
  "latex-workshop.view.pdf.external.viewer.args": [
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "-reuse-instance",
    "%PDF%"
  ],
  // 将synctex转发到外部查看器时要执行的命令。此功能不受官方支持。
  "latex-workshop.view.pdf.external.synctex.command": "C:/Users/XXXX/AppData/Local/SumatraPDF/SumatraPDF.exe", // 注意修改路径
  // latex-workshop.view.pdf.external.synctex的参数。当同步到外部查看器时。%LINE%是行号,%PDF%是生成PDF文件的绝对路径的占位符,%TEX%是触发syncTeX的扩展名为.tex的LaTeX文件路径。
  "latex-workshop.view.pdf.external.synctex.args": [
    "-forward-search",
    "%TEX%",
    "%LINE%",
    "-reuse-instance",
    "-inverse-search",
    "\"C:/Program Files/Microsoft VS Code/Code.exe\" \"C:/Program Files/Microsoft VS Code/resources/app/out/cli.js\" -r -g \"%f:%l\"", // 注意修改路径
    "%PDF%"
  ],
  "openInExternalApp.openMapper": [
    {
      "extensionName": "md",
      "apps": [
        {
          "isElectronApp": true,
          "title": "typora",
          "openCommand": "C:\\Program Files\\Typora\\Typora.exe"
        }
      ]
    },
  ],
  "terminal.integrated.showExitAlert": false,
  "extensions.ignoreRecommendations": true,
  "latex-utilities.countWord.format": "${wordsBody} Words",
  "[latex]": {
    "editor.defaultFormatter": "James-Yu.latex-workshop"
  },
  "workbench.colorTheme": "Visual Studio Light", // 两个选择器中是否换行
}
posted @ 2022-11-19 02:16  bH1pJ  阅读(129)  评论(0编辑  收藏  举报