用沉默过滤

用沉默过滤

silence包会过滤掉警告和错误消息。是否可以过滤掉诸如以下信息消息

Package mdframed Info: mdframed works in twoside mode on input line 207.
Package mdframed Info: mdframed detected package amsthm
        changed the theorem header of amsthm
        (mdframed) on input line 121.
LaTeX Font Info:    Font shape `LGR/txr/m/sc' will be
     (Font)         scaled to size 10.0pt on input line 20.
File: 1327.eps Graphic file (type eps)

显示这些消息仅供参考,我想抑制它们以便更容易地找到真正的警告和错误。

答案1

以下命令可以重新定义:

  • \PackageInfo
  • \@font@info
  • \@latex@info

它们都会将(非关键)信息发送到终端。您可以在之前执行此操作\documentclass

\makeatletter
\renewcommand{\PackageInfo}[2]{}% Remove package information
\renewcommand{\@font@info}[1]{}% Remove font information
\renewcommand{\@latex@info}[1]{}% Remove LaTeX information
\makeatother

\documentclass...

相关内容