嘗試使用 VSCode for LaTex 而不是 Overleaf 並將專案移至起點,但無法編譯

嘗試使用 VSCode for LaTex 而不是 Overleaf 並將專案移至起點,但無法編譯

此專案使用 pdfLaTex 在 Overleaf 上運行,但不能在使用 Latex Workshop 擴充功能中的任何編譯器的 VSCode 中運行。我已經透過 TeX Live 安裝了 Latex。

以前,我嘗試過 MikTex 並使用 Raspberry Perl 組合等,遵循相關指南,但沒有在我的系統上編譯。使用我目前的配置,可以編譯範例文檔,因此它可能配置正確,但我的專案起點(以學校模板開始,所以我不知道是否可以顯示它)無法編譯。

我認為可能存在問題的一些背景: main.tex使用setup.sty被呼叫的\usepackage{setup}.的內部setup.sty,第 1 行和第 2 行是:

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{packages}[2020/04/15 Packages]

其中第一個帶有黃色下劃線(警告?):您已請求套件“設定”,但該套件提供“套件”。

在文件的更下方:

\usepackage{minted} % Includes a lot of languages and styles, info at: https://www.overleaf.com/learn/latex/Code_Highlighting_with_minted

在其下方的空白處有一條紅色的波浪線。

錯誤(我認為這是錯誤訊息):

c:/Users/Andreas/LaTex/ELE620 - HW3/main.tex:8: Emergency stop.
<read 3> 
         
l.8 \begin{document}
                    ^^M
c:/Users/Andreas/LaTex/ELE620 - HW3/main.tex:8:  ==> Fatal error occurred, no output PDF file produced!
Transcript written on main.log.
Latexmk: If appropriate, the -f option can be used to get latexmk
  to try to force complete processing.
Reverting Windows console CPs to (in,out) = (850,850)
Latexmk: Getting log file 'main.log'
Latexmk: Examining 'main.fls'
PWD line not in UTF-8
Latexmk: Examining 'main.log'
Latexmk: Errors, so I did not complete making targets

Pastebin 中的完整日誌檔案: https://pastebin.com/t6zZ1EsJ

有誰知道我該如何解決這個問題?

答案1

調查了 David Carlisle 的回覆以了解如何添加 pdflatex

--shell-escape

並發現了這個https://tex.stackexchange.com/a/541385/279366答案是功能修復。

希望這對面臨相同問題的其他人有用。

相關內容