這些演算法2e空警告是什麼?

這些演算法2e空警告是什麼?

我在論文中使用了 Algorithm2e 包,出於某種原因,TexStudio 報告了來自 Algorithm2e.sty 的這兩個警告,其中沒有任何消息或行號。

當我啟用該Issues and Log選項卡以查看這些警告的來源時,它們似乎指向日誌檔案中以下輸出中包含星號的行。

********************************************************
Package `algorithm2e' Release 5.0 -- january 06 2013 --
- [email protected] mailing list for announcement about releases
- [email protected] mailing list for discussion about package
subscribe by emailing [email protected] with 'subscribe <list> <firstname name>'
- Author: Christophe Fiorio ([email protected])
********************************************************

我不知道某處是否有實際警告,或者只是 TexStudio 誤解了這些警告。

這些警告其實是來自其他地方嗎?或者這只是 TexStudio 的誤解?

答案1

該訊息是由於以下幾行引起的algorithm2e.sty

1214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% Main Part %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1215 %
1216 \newcommand{\algocf@name}{algorithm2e}%
1217 \newcommand{\algocf@date}{january 06 2013}%
1218 \newcommand{\algocf@version}{Release 5.0}%
1219 \newcommand{\algocf@id}{\algocf@version\space -- \algocf@date\space --}%
1220 \typeout{********************************************************^^JPackage `\algocf@name'\space\algocf@id^^J%
1221          - [email protected]  mailing list for announcement about releases^^J%
1222          - [email protected] mailing list for discussion about package^^J%
1223          subscribe by emailing [email protected] with 'subscribe <list> <firstname name>'^^J%
1224          - Author: Christophe Fiorio ([email protected])^^J********************************************************}%

不幸的是,如果不更改套件程式碼或執行諸如此類的令人討厭的技巧,就不可能刪除該訊息

\let\latextypeout\typeout\def\typeout#1{}
\usepackage{algorithm2e}
\let\typeout\latextypeout

我不推薦。

該程式碼應該使用\PackageInfo

\PackageInfo{algorithm2e}{%
  ********************************************************\MessageBreak
  Package `\algocf@name'\space\algocf@id\MessageBreak
  - [email protected]  mailing list for announcement about releases\MessageBreak
  - [email protected] mailing list for discussion about package\MessageBreak
  subscribe by emailing [email protected] with 'subscribe <list> <firstname name>'\MessageBreak
  - Author: Christophe Fiorio ([email protected])\MessageBreak
  ********************************************************%
}

這只會將資訊寫入日誌檔案中,而不是寫入終端輸出中,似乎會讓 TeXStudio 的解析器感到困惑。

相關內容