sjtug / SJTUThesis

上海交通大学 LaTeX 论文模板 | Shanghai Jiao Tong University LaTeX Thesis Template
Apache License 2.0
3.33k stars 796 forks source link

feat: use xelatex in latexmk #736

Closed skyzh closed 2 years ago

skyzh commented 2 years ago

Signed-off-by: Alex Chi iskyzh@gmail.com

最近有不少用户反馈 latexmk 没有默认使用 latexmkrc 中 pdf_mode 指定的 xelatex 编译器,所以我们把这个参数加到 compile.bat 里面了。

Ref https://github.com/sjtug/SJTUThesis/discussions/735

AlexaraWu commented 2 years ago

735 提供的信息不足,需要调查一下 compile.bat 的运行表现。TeXstudio 默认的 -pdf选项会覆盖 .latexmkrc 的配置。

LogCreative commented 2 years ago

+1,昨天也有人问我这个问题,如果使用 VS Code 的话,VS Code 的第一个receipe是不使用 .latexmkrc 的,然后一保存会自动跑 latexmk,而不是 latexmk (latexmkrc),这样就会优先在 Windows 平台上跑 pdflatex。

AlexaraWu commented 2 years ago

LaTeX Workshop 第一个 receipe 同样设置了 -pdf 选项,并不是不使用 .latexmkrc

LogCreative commented 2 years ago

在 Mac 和 Linux 上 LaTeX Workshop 会默认设置 xelatex。然后当时的临时解法是在工作区覆写配置文件,这样强制让它跑第一个(唯一一个)

{
  "latex-workshop.latex.recipes": [
      {
          "name": "latexmk (latexmkrc)",
          "tools": [
              "latexmk_rconly"
          ],
      },
  ]
}

(实际上应该改 lastUsed