命令 \ifCLASSINFOpdf 是什么意思?

命令 \ifCLASSINFOpdf 是什么意思?

我在我的日记模板中找到了此部分:

\ifCLASSINFOpdf
  % \usepackage[pdftex]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../pdf/}{../jpeg/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
  % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
  % will default to the driver specified in the system graphics.cfg if no
  % driver is specified.
  % \usepackage[dvips]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../eps/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.eps}
\fi

我想知道这个\ifCLASSINFOpdf宏的含义是什么。

我尝试谷歌搜索,但没有找到满意的答案。我尝试搜索我的LATEX 2ε 简介无济于事。

它是否可以检测我是否正在使用pdfLaTeX或者乳胶或者它做了其他的事情?

答案1

这是在IEEEtran.cls(见)中定义的http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/) 并将其设置为 PDF 流的 true:类文件检查是否\pdfoutput为(这似乎是pdflatex因为注释中建议的情况):

{\@ifundefined{pdfoutput}{\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}}{%
% pdfoutput is defined and not equal to \relax
% check for pdfpageheight existence just in case someone sets pdfoutput
% under non-pdflatex. If exists, set them regardless of value of \pdfoutput.
\@ifundefined{pdfpageheight}{\relax}{\global\pdfpagewidth\paperwidth
\global\pdfpageheight\paperheight}%
% if using \pdfoutput=0 under pdflatex, send dvips papersize special
\ifcase\pdfoutput
\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}%
\else
% we are using pdf output, set CLASSINFOpdf flag
\global\CLASSINFOpdftrue
\fi}}

相关内容