latex入门

隐身守侯 提交于 2020-11-08 17:41:53

参考:
https://liam.page/2014/09/08/latex-introduction/#TeX_%E5%AE%B6%E6%97%8F
https://zhuanlan.zhihu.com/p/38178015
https://www.latexstudio.net/archives/12260.html
https://www.zhihu.com/question/23658979

1.TexLive是必须要有的tex引擎,VSCode的插件只是用来调用texlive方便一些。

2.VSCode的插件默认用pdflatex编译引擎,pdflatex不支持ctex或者xeCJK的编译(中文),所以需要更改setting,用xelatex进行编译:

    "latex-workshop.latex.tools": [
        {
            "name": "xelatex",
            "command": "xelatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "-pdf",
                "%DOCFILE%"
            ]
        },
        {
            "name": "pdflatex",
            "command": "pdflatex",
            "args": [
                "-synctex=1",
                "-interaction=nonstopmode",
                "-file-line-error",
                "%DOCFILE%"
            ]
        },
        {
            "name": "bibtex",
            "command": "bibtex",
            "args": [
                "%DOCFILE%"
            ]
        }
    ],
    "latex-workshop.latex.recipes": [
        {
          "name": "pdfLaTeX",
          "tools": [
            "pdflatex"
          ]
          },
        {
          "name": "xelatex",
          "tools": [
            "xelatex"
          ]
        },
        {
          "name": "latexmk",
          "tools": [
            "latexmk"
          ]
        },
        {
          "name": "bibteX",
          "tools": [
            "bibtex"
          ]
        },
        {
            "name": "xelatex -> bibtex -> xelatex × 2",
            "tools": [
              "xelatex",
              "bibtex",
              "xelatex",
              "xelatex"
            ]
        },
        {
            "name": "pdflatex -> bibtex -> pdflatex × 2",
            "tools": [
              "pdflatex",
              "bibtex",
              "pdflatex",
              "pdflatex"
            ]
        }
    ],

3.中文需要:

\usepausepackage[UTF8]{ctex}

如果电脑默认是UTF8可以去掉。

4.bibtex是用来索引参考文献的,参考:https://www.zhihu.com/question/30344123

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!