我制作了这个文件:
\documentclass[uplatex, dvipdfmx]{jsarticle}
\begin{document}
\LaTeX
\begin{equation}
x^2 + y^2 = 5
\end{equation}
\begin{equation}
x^2 + y^2 = 13
\end{equation}
\end{document}
然后在 VScode 中构建该文件。
构建这么小的文件需要 10 秒钟。我觉得这花了太长时间,所以我问了这个问题。
以下是日志(<my username>
并被(My Laptop name)
我替换了):
[13:55:28] RECIPES command invoked.
[13:55:28] BUILD command invoked.
[13:55:28] The document of the active editor: file:///c%3A/Users/<<my username>>/Dropbox/My%20PC%20%28My Laptop name%29/Desktop/test_latex/test.tex
[13:55:28] The languageId of the document: latex
[13:55:28] Current workspace folders: ["file:///c:/Users/<my username>/Dropbox/My PC (My Laptop name)/Desktop/test_latex"]
[13:55:28] Current workspaceRootDir: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex
[13:55:28] Found root file from active editor: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.tex
[13:55:28] Keep using the same root file: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.tex
[13:55:28] Building root file: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.tex
[13:55:28] Build root file c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.tex
[13:55:28] Recipe step 1: latexmk, -pdfdvi,c:/Users/<my username>/Dropbox/My PC (My Laptop name)/Desktop/test_latex/test
[13:55:28] Recipe step env: undefined
[13:55:28] cwd: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex
[13:55:28] LaTeX build process spawned. PID: 23388.
[13:55:37] LaTeX log parsed with 0 messages.
[13:55:37] Recipe of length 1 finished. PID: 23388.
[13:55:37] Successfully built c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.tex.
[13:55:37] No PDF viewer connected for c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.pdf
[13:55:37] Parse fls file.
[13:55:37] Fls file found: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.fls
[13:55:37] Parse aux file: c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.aux
[13:55:37] SyncTex after build invoked.
[13:55:37] Execute external SyncTeX command: command C:/Users/create310/AppData/Local/SumatraPDF/SumatraPDF.exe, args -reuse-instance,c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.pdf,-forward-search,c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.tex,11,-inverse-search,"C:\Users\create310\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd" -r -g "%f:%l"
[13:55:37] Open external viewer for syncTeX from c:\Users\<my username>\Dropbox\My PC (My Laptop name)\Desktop\test_latex\test.pdf
这是我的setting.json
:
{ "latex-workshop.latex.tools":
[
{
"name": "latexmk",
"command": "latexmk",
"args":
[
"-pdfdvi",
"%DOC%",
],
},
],
"latex-workshop.latex.recipes":
[
{
"name": "latexmk",
"tools":
[
"latexmk",
]
},
],
"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", "*.synctex.gz",
"_minted*", "*.nav", "*.snm", "*.vrb",
],
"latex-workshop.latex.autoClean.run": "onFailed",
"latex-workshop.latex.autoBuild.run": "never",
"latex-workshop.synctex.afterBuild.enabled": true,
"latex-workshop.view.pdf.viewer": "external",
"latex-workshop.view.pdf.external.synctex.command":
"C:/Users/create310/AppData/Local/SumatraPDF/SumatraPDF.exe",
"latex-workshop.view.pdf.external.synctex.args": [
"-reuse-instance",
"%PDF%",
"-forward-search",
"%TEX%",
"%LINE%",
"-inverse-search",
"\"C:\\Users\\create310\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\code.cmd\" -r -g \"%f:%l\""
]
}
这是我的.latexmkrc
:
#!/usr/bin/env perl
$latex = 'uplatex -synctex=1 -halt-on-error -interaction=nonstopmode -file-line-error';
$latex_silent = 'uplatex -synctex=1 -halt-on-error -interaction=nonstopmode -file-line-error';
$bibtex = 'upbibtex';
$dvipdf = 'dvipdfmx %O -o %D %S';
$max_repeat = 3;
$pdf_mode = 3;
$pvc_view_file_via_temporary = 0;
为什么我的文件要花这么长时间才能生成?
是否存在消息[13:55:37] LaTeX log parsed with 0 messages.
瓶颈?