如何将 \underset 与 iopart 文档类和 setstack.sty 结合使用

如何将 \underset 与 iopart 文档类和 setstack.sty 结合使用

我有以下代码,我试图使用\underset,如 中所定义setstack.sty。但是,每次我编译代码时都会收到错误Undefined control sequence \underset{top}{bottom}setstack.sty与我的文档位于同一文件夹中。这是否像我导入setstack.sty错误一样简单?

    %                                                                      %
%    LaTeX source code `ioplau2e.tex' used to generate `author         %
%    guidelines', the documentation explaining and demonstrating use   %
%    of the Institute of Physics Publishing LaTeX preprint files       %
%    `iopart.cls, iopart12.clo and iopart10.clo'.                      %
%                                                                      %
%    `ioplau2e.tex' itself uses LaTeX with `iopart.cls'                %
%                                                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[10pt]{iopart}
\newcommand{\gguide}{{\it Preparing graphics for IOP Publishing journals}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages added by Austin Downey

\usepackage[]{graphicx}
\usepackage{booktabs} % used for bars on tables
\usepackage{placeins}    % used to allow \floatbarrier
\usepackage{array,multirow}  % used to add lines into my tables
\usepackage{float}
\usepackage{color}
\usepackage{gensymb}
\usepackage{soul} % used for strike throuh in editing
\usepackage{stfloats} % used to add bp, for placing figure*
\usepackage{setstack}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

% For two-column output uncomment the next line and choose [10pt] rather than [12pt] in the \documentclass declaration
\ioptwocol

\begin{equation}
\underset{top}{bottom}
\end{equation}

\end{document}

我尝试保留尽可能多的前言来展示我正在使用的各种包。

答案1

您不能使用setstack(顺便说一句,这是一个过时的包);iopart与不兼容amsmath,所以我不建议使用该类。如果您不得不使用它,您可以使用stackrel

%                                                                      %
%    LaTeX source code `ioplau2e.tex' used to generate `author         %
%    guidelines', the documentation explaining and demonstrating use   %
%    of the Institute of Physics Publishing LaTeX preprint files       %
%    `iopart.cls, iopart12.clo and iopart10.clo'.                      %
%                                                                      %
%    `ioplau2e.tex' itself uses LaTeX with `iopart.cls'                %
%                                                                      %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[10pt]{iopart}
\newcommand{\gguide}{{\it Preparing graphics for IOP Publishing journals}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages added by Austin Downey

\usepackage[]{graphicx}
\usepackage{booktabs} % used for bars on tables
\usepackage{placeins}    % used to allow \floatbarrier
\usepackage{array,multirow}  % used to add lines into my tables
\usepackage{float}
\usepackage{color}
\usepackage{gensymb}
\usepackage{soul} % used for strike throuh in editing
\usepackage{stfloats} % used to add bp, for placing figure*
%\usepackage{setstack}
\usepackage{stackrel}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

% For two-column output uncomment the next line and choose [10pt] rather than [12pt] in the \documentclass declaration
\ioptwocol

\begin{equation}
\stackrel[bottom]{top}{middle}
\end{equation}

\end{document}

在此处输入图片描述

答案2

关键在于你包括

\usepackage{iopams}

除了

\usepackage{setstack}

相关内容