Latex 在 IEEE ACCESS 模板的图表、算法和表格中生成错误

Latex 在 IEEE ACCESS 模板的图表、算法和表格中生成错误
\documentclass{ieeeaccess}
\usepackage{cite}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{algorithmic}
\usepackage{graphicx}
\usepackage{textcomp}
\begin{document}
\begin{table}[h!]
  \centering
  \caption{{Evaluation of SDPSO-ELM }}
  \label{tab:Comput_time}
  \begin{tabular}{p{1.2cm}p{0.5cm}p{1.5cm} p{1.2cm} p{1.5cm} }
  \hline
  \hline
   \textbf{Months} &  \textbf{SDPSO-ELM} & \textbf{Fuzzy-RBF-CNN} & \textbf{SSA-SVM-CS} &\textbf{FA-HELF}  \\
   \hline
    Jan & 2.22 & 1.67 & 1.55 & 0.414\\
    \hline
    \hline%SDPSO-
  \end{tabular}
\end{table}

\begin{figure*}[ht]
\centering
\includegraphics[scale=0.50]{M_Forecast.eps}
\caption{Month ahead }
\label{figM}
\end{figure*}
\begin{algorithm}
{Pesudo-code of the proposed short term load forecasting model} \label{FS}
\begin{algorithmic}[1]
%\State {\textbf{Import inputs:} $\;{\omega ^r}[{\tau _j}]=0$, ${\omega ^F}[{\tau _j}]=0$, $D[]$, and $r[n]$}
\State {\textbf{Output:} $L_i^F = L_1^F,\;L_2^F,\;L_3^F,...,L_n^F$}
\State {\textbf{begin} }
\State {Restore the defective and missing values by data cleansing phase}
\State {Normalize the data w.r.t. its maximum value by data normalization phase}
\State {Change the data structure by data structuring phase}
%\State {\textbf{Parameters initialization:} set all weights equal to zero and read data from $D=[]$ }
\State {\textbf{First evaluator $\gamma$:} Evaluation based on first evaluator $\gamma$ }
\State {\textbf{begin} }
\State {\textbf{for} $k=1:m$ \textbf{do} }
\State {\textbf{for} $i=1:n$ \textbf{do} }
\State {Determine $errOOB{1_i}$ using OOB dataset of decision tree [i] }
\State {Add noise randomly to OOB dataset on feature ${\tau _k}$}
\State {Determine $errOOB{2_i}$ using OOB dataset of decision tree [i] }
\State {\textbf{end} }
\State {Determine the importance of the feature ${\omega ^r}[{\tau _j}] \leftarrow \frac{{\sum\limits_{i = 1}^n {errOOB{2_i} - errOOB{1_i}} }}{n}$ }
\State {\textbf{end} }
\State {\textbf{end} }
\State {\textbf{Second evaluator $\kappa$:} Evaluation based on second evaluator $\kappa$ }
\State {\textbf{begin} }
\State {\textbf{for} $i=1:m$ \textbf{do} }
\State {Randomly choose an item in class $C_i$  }
\State {Findout $k$ nearest hits item $H_j(C_i)$  }
\State {For each class ${C_j}\ne{C_i}$   }
\State {Findout $k$ nearest hits item $M_j(C_i)$  }
\State {\textbf{end} }
\State {\textbf{for} $i=1:m$ \textbf{do} }
\State {Update ${\omega ^F}[{\tau _i}]$ using Equation \ref{eq:IPU}}
\State {\textbf{end} }
\State {\textbf{Feature selector:} Select features based on  ${\omega ^F}$ and ${\omega ^r}$}
\State {\textbf{begin} }
\State {Normalize ${\omega^F}$ and ${\omega^r}$ using Equation \ref{eq:NI}}
\State {Perform feature selection using Equation  \ref{eq:FSKD}}
\State {\textbf{end} }
\State {\textbf{end} }
\State {\textbf{Feature extractor}}
\State {\textbf{begin} }
\State {Perform feature extraction based on  KPCA using Equations \ref{eq:FSKD}-\ref{eq:K}}
\State {\textbf{end} }
\State {\textbf{Forecaster}}
\State {\textbf{begin} }
\State {Perform electric load forecasting based on SVM classifier using Equations \ref{eq:CPF}-\ref{eq:QF}}
\State {\textbf{end} }
\State {\textbf{Optimizer}}
\State {\textbf{begin} }
\State {Perform optimization on regularization risk function based on mEDE to optimally tune parameters \ref{eq:TV}-\ref{eq:mFF2}}
\State {\textbf{end} }
\State {Return fast and accurate results}
%\EndProcedure
\end{algorithmic}
\end{algorithm}
\end{document} 

答案1

我建议开放access.tex作为IEEE Access LaTeX 模板并查看它们如何包含图形。具体来说,对于图 1 的构造:

在此处输入图片描述

他们使用这个代码:

\Figure[t!](topskip=0pt, botskip=0pt, midskip=0pt){fig1.png}
  {Magnetization as a function of applied field.
  It is good practice to explain the significance of the figure in the caption.\label{fig1}}

重新格式化后,以下是创建图形的详细信息:

\Figure% Command used to insert a figure float
  [<float spec>]% Float specification (optional, default is t!)
  (<spec>)% Vertical separation lengths using key-values for
          % topskip, botskip, midskip (optional, default is 0pt for all)
  [<image parms>]% Image parameters passed to \includegraphics[<image parms>]{<image>} (optional)
  {<image>}% Image to include
  {<caption>}% \caption text, including \label (if needed)

使用此方法处理您的图形。例如,对于您的第一个图形,而不是

\begin{figure*}[ht]
  \centering
  \includegraphics[scale=0.50]{M_Forecast.eps}
  \caption{Month ahead }
  \label{figM}
\end{figure*}

使用

\Figure
  [ht]
  [scale=0.50]
  {M_Forecast.eps}
  {Month ahead\label{figM}}

对于表格,有类似的格式:

\Table% Command used to insert a table float
  [<float spec>]% Float specification (optional, default is t!)
  (<spec>)% Various key-values (optional):
          %   topskip, botskip (default is 0pt),
          %   width (default is \columnwidth),
          %   resize (default is !),
          %   arraystretch (default is 1.3)
  {<caption>}% \caption text, including \label (if needed)
  {<table>}

您必须包含以下algorithm软件包(algorithmsalgorithmic如果您需要算法,它还提供)。它提供algorithm浮点数。

此外,您使用的algorithmic格式由algpseudocode,而不是通过包装algorithmic。所以,至少你需要

\usepackage{algorithm,algpseudocode}% ...not \usepackage{algorithmic}

您需要关闭\EOD,否则文档类将向您显示错误:

您没有使用\EOD文档最后一段末尾的命令。我已搜索到文档末尾。

相关内容