使用 eqnarray 在表格中对齐编号方程式

使用 eqnarray 在表格中对齐编号方程式

我正在给 Springer 期刊写一篇论文(类别:svjour3),我在表格中放了一个算法,然后我使用等式数组以确保方程的对齐和编号,但拆分长方程时会出现问题,因为拆分的部分都已编号,但我想要的只是对最后一部分进行编号。我该如何使用等式数组

梅威瑟:

\documentclass[smallextended,natbib]{svjour3}         
\smartqed  % flush right qed marks, e.g. at end of proof
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
%--------------------------------------------------------------
\usepackage{booktabs,tabularx}% <-- new
\usepackage{bm}
\usepackage{mathptmx}
\usepackage{geometry}
\geometry{
  a4paper,         % or letterpaper
  textwidth=15cm,  % llncs has 12.2cm
  textheight=24cm, % llncs has 19.3cm
  heightrounded,   % integer number of lines
  hratio=1:1,      % horizontally centered
  vratio=2:3,      % not vertically centered
}
%---------------------------------------------------------------
\DeclareRobustCommand*{\drv}{\mathop{}\!\mathrm{d}}
\DeclareMathOperator{\DiffQR}{DiffQR}
%--------------------------------------------------------------
%end Packages--------------------------------------------------

%
% Insert the name of "your journal" with
% \journalname{myjournal}
%
%\hypersetup{draft}
\begin{document}

\begin{table}
\caption{Alg}\label{tab:Table1}

\rule{\textwidth}{\heavyrulewidth}
\subsubsection*{\textbf{Initialization}}

\subsubsection*{\textbf{Time update}}
The partial derivatives of the time update equations are 
\begin{eqnarray}
\frac{\partial {\mathbf{X}_{i,k-1|k-1}}}{\partial \theta_j} &=& \frac{\partial \hat{\mathbf{x}}_{k-1|k-1}}{\partial \theta_j}+\frac{\partial \mathbf{S}_{k-1|k-1}}{\partial \theta_j} \bm{\xi}_i\\
\label{eq:Equat_1}
\frac{\partial \mathbf{X}_{i,k|k-1}^*}{\partial \theta_j} 
 &=& \frac{\partial \mathbf{f}(\mathbf{X}_{i,k-1|k-1},\mathbf{u}_{k-1},\bm{\theta})}{\partial \theta_j}\\
 &=& \frac{\partial \mathbf{f}(\mathbf{X}_{i,k-1|k-1},\mathbf{u}_{k-1},\bm{\theta_j})}{\partial {\mathbf{X}_{i,k-1|k-1}}}\frac{\partial {\mathbf{X}_{i,k-1|k-1}}}{\partial \theta_j} + \frac{\partial \mathbf{f}(\mathbf{X}_{i,k-1|k-1},\mathbf{u}_{k-1},\bm{\theta})}{\partial \theta_j}
\label{eq:Equat_2}
\end{eqnarray}
\rule{\textwidth}{\heavyrulewidth}
\end{table}
\end{document} 

答案1

有专门的算法包,而不是使用表格。你有太多的选项可供选择,以满足你的需求,

  • algorithm- 算法的浮点包装器。
  • algorithmic- 第一个算法排版环境。
  • algorithmicx- 第二种算法排版环境。
  • algpseudocode- 布局algorithmicx
  • algorithm2e- 第三算法排版环境。

我将把选择权留给您阅读后自行决定。最后,不要使用eqnarray,它已被弃用,align对于未编号的amsmath方程式,请使用 和\notag

\documentclass[smallextended,natbib]{svjour3}         
\smartqed  % flush right qed marks, e.g. at end of proof
\usepackage{amstext}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
%--------------------------------------------------------------
\usepackage{booktabs,tabularx}% <-- new
\usepackage{bm}
\usepackage{mathptmx}
\usepackage{geometry}
\geometry{
  a4paper,         % or letterpaper
  textwidth=15cm,  % llncs has 12.2cm
  textheight=24cm, % llncs has 19.3cm
  heightrounded,   % integer number of lines
  hratio=1:1,      % horizontally centered
  vratio=2:3,      % not vertically centered
}
%---------------------------------------------------------------
\DeclareRobustCommand*{\drv}{\mathop{}\!\mathrm{d}}
\DeclareMathOperator{\DiffQR}{DiffQR}
%--------------------------------------------------------------
%end Packages--------------------------------------------------

%
% Insert the name of "your journal" with
% \journalname{myjournal}
%
%\hypersetup{draft}
\begin{document}

\begin{table}
\caption{Alg}\label{tab:Table1}
\rule{\textwidth}{\heavyrulewidth}
\subsubsection*{Initialization}
\subsubsection*{Time update}
The partial derivatives of the time update equations are 
\begin{align}
\frac{\partial {\mathbf{X}_{i,k-1|k-1}}}{\partial \theta_j} &= \frac{\partial \hat{\mathbf{x}}_{k-1|k-1}}{\partial \theta_j}+\frac{\partial \mathbf{S}_{k-1|k-1}}{\partial \theta_j} \bm{\xi}_i\notag\\ %\label{eq:Equat_1}
\frac{\partial \mathbf{X}_{i,k|k-1}^*}{\partial \theta_j} 
 &= \frac{\partial \mathbf{f}(\mathbf{X}_{i,k-1|k-1},\mathbf{u}_{k-1},\bm{\theta})}{\partial \theta_j} \notag\\
 &= \frac{\partial \mathbf{f}(\mathbf{X}_{i,k-1|k-1},\mathbf{u}_{k-1},\bm{\theta_j})}{\partial {\mathbf{X}_{i,k-1|k-1}}}\frac{\partial {\mathbf{X}_{i,k-1|k-1}}}{\partial \theta_j} + \frac{\partial \mathbf{f}(\mathbf{X}_{i,k-1|k-1},\mathbf{u}_{k-1},\bm{\theta})}{\partial \theta_j}
\label{eq:Equat_2}
\end{align}
\rule{\textwidth}{\heavyrulewidth}
\end{table}
\end{document}

在此处输入图片描述

相关内容