You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用iopart模板编译报错:Missing = inserted for \ifnum等问题求助

问题分析与解决方案

错误根源

  1. indented环境参数缺失:iopart模板的indented环境要求传入数字参数指定缩进级别,你调用时未提供参数,导致TeX解析\ifnum条件时触发数值错误。
  2. 包冲突:同时加载subfloat和subfig,两个包功能重叠(均用于子浮动体排版),会引发潜在兼容性问题。

修正代码

\documentclass[10pt]{iopart}
% \newcommand{\gguide}{{\it Preparing graphics for IOP Publishing journals}}
% Uncomment next line if AMS fonts required
% \usepackage{iopams}  
\usepackage{graphicx} 
\usepackage{booktabs}
\usepackage{nicefrac}
\expandafter\let\csname equation*\endcsname\relax

\expandafter\let\csname endequation*\endcsname\relax
\usepackage{amsmath,mathtools}
\DeclareMathOperator{\cotinv}{cot\,inverse}
\usepackage{amssymb}
\let\amscases\cases
\makeatletter
\def\cases{\@ifnextchar\bgroup\plaincases\amscases}
\def\plaincases#1{\begin{cases*}#1\end{cases*}}
\makeatother
\usepackage{multirow}
% 移除冲突包,保留subfig即可
\usepackage{subfig}
\usepackage{gensymb}
% \newcommand{\acot}{\cot^{-1}}
\begin{document}

\title[]{}

\author{}
\author{}
\address{Department of}

\vspace{10pt}
% 为indented环境添加缩进级别参数[1]
\begin{indented}[1]
\item[]November 2022
\end{indented}

\begin{abstract}
lll
\end{abstract}

%
% Uncomment for keywords
\vspace{2pc}
\noindent{\it Keywords}: electronics
%
% Uncomment for Submitted to journal title message
% \submitto{\JPA}
%
% Uncomment if a separate title page is required
\maketitle
% 
% For two-column output uncomment the next line and choose [10pt] rather than [12pt] in the \documentclass declaration
\ioptwocol
%


\section{Introduction}\label{sec:introduction}


\end{document}

修改说明

  • 为indented环境补充[1]参数,匹配模板对该环境的语法要求。
  • 删除subfloat包,避免与subfig功能冲突,单包即可满足子浮动体排版需求。

内容的提问来源于stack exchange,提问作者sara00

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.10 21:22:04