VSCode 配置

文章目录

  • Remote-SSH 配置
    • 1. 安装 Remote Development 拓展
    • 2. 本地配置文件
    • 3. 公钥上传服务器
  • Latex 配置
    • 1. 下载安装 texlive
    • 2. 安装 LaTeX Workshop 拓展
    • 3. 修改 vscode 设置
    • 4. latex 相关其他配置
      • SumatraPDF 中设置反向搜索:
      • 中文排版
      • PPT模板
      • 参考文献配置
      • 其他语法

Remote-SSH 配置

1. 安装 Remote Development 拓展

2. 本地配置文件

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host name
    HostName {ip}
    User {user}
    [Port {port}]
    [IdentityFile {~/.ssh/id_rsa}]
    ...

3. 公钥上传服务器

SET REMOTEHOST=your-user-name-on-host@host-fqdn-or-ip-goes-here

scp %USERPROFILE%\.ssh\id_rsa.pub %REMOTEHOST%:~/tmp.pub
ssh %REMOTEHOST% "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat ~/tmp.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm -f ~/tmp.pub"

Latex 配置

1. 下载安装 texlive

texlive 2018利用镜像安装节省下载时间
https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/

或者种子下载镜像
http://www.tug.org/texlive/acquire-iso.html#torrent

2. 安装 LaTeX Workshop 拓展

3. 修改 vscode 设置

{
    "latex-workshop.latex.autoBuild.run": "never",
    "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": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        },
        {
            "name": "latexmk",
            "command": "latexmk",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "-outdir=%OUTDIR%",
                "%DOC%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOC%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.synctex.afterBuild.enabled": true,
    "latex-workshop.view.pdf.external.command": {
        "command": "C:/Program Files/SumatraPDF/SumatraPDF.exe",
        "args": [
            "%PDF%"
        ]
    },
    "latex-workshop.view.pdf.external.synctex": {
        "command": "C:/Program Files/SumatraPDF/SumatraPDF.exe",
        "args": [
            "-forward-search",
            "%TEX%",
            "%LINE%",
            "%PDF%"
        ]
    },
    "latex-workshop.view.pdf.viewer": "external"
}

4. latex 相关其他配置

SumatraPDF 中设置反向搜索:

通过 vscode 调用 SumatraPDF 后,在 SumatraPDF 中设置C:\Program Files\Microsoft VS Code\Code.exe -g "%f:%l"

中文排版

\usepackage[UTF8]{ctex}

PPT模板

beamer

参考文献配置

\bibliographystyle{IEEEtran}    //会议应用风格
\bibliography{reference}        //bib文件名

其他语法

书写数学公式可以用\begin{equation}\end{equation}.
想来一段居中的文本, 可以用\begin{center}\end{center}. 将 center换成flushleftflushright, 分别得到居左和居右的文本.

你可能感兴趣的:(配置)