答案1
这是 Werner 解决方案的变体。代码还修复了原始模型排版中的主要错误,您应该仔细查看。例如,请注意^{}
用于在同一级别设置下标的位。
还请注意,原文中明显缺少\left
and\right
一词。请特别注意带有“col”的行。
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{array}
\usepackage{booktabs}
\DeclareMathOperator{\col}{col}
\DeclareMathOperator{\sech}{sech}
\begin{document}
\begin{table}[htp]
\newcommand{\tabindent}{2em}
\setlength{\tabcolsep}{0pt}
\centering
\caption{Robust diffusion detection algorithm}
\medskip
\begin{tabular}{
>{\hspace*{\tabindent}}lp{\dimexpr 0.8\textwidth-\tabindent}
}
\toprule
\multicolumn{2}{p{0.8\textwidth}}{%
Initializations: $w_s$, $B_k$, $\alpha_{k,-1}\in\mathbb{R}_{++}^{B_k}$,
$\hat{R}_{\varphi_{k,-1}}$, $\hat{\varphi}'_{k,-1}$, $\nu_k$,
$\lambda_k$, $\epsilon$, $\mu_k$. Start with $w_{k,-1}=0$ for
every node $k$. For every time instant $i\ge 0$, repeat.
}
\\ \addlinespace
&\textbf{Error nonlinearity update:} for every node $k$, repeat
\hspace*{\tabindent}%
$\!\begin{aligned}
e_k(i) &= d_k(i)-u_{k,i}w_{k,i-1} \\
\phi_{k,b}(i) &= \tanh(be_k(i)),\ b=1,\dots,B_k \\
\varphi_{k,i} &= \col\{\phi_{k,1}(i),\dots,\phi_{k,B_k}(i)\} \\
\hat{R}_{\varphi_{k,i}} &= \nu_k\hat{R}_{\varphi_{k,i-1}}
+ (1-\nu_k)\varphi_{k,i}^{}\varphi_{k,i}^T \\
\phi'_{k,b}(i) &= b\sech^2(be_k(i)),\ b=1,\dots,B_k \\
\varphi'_{k,i} &= \col\{\phi'_{k,1}(i),\dots,\phi'_{k,B_k}(i)\} \\
\hat{\varphi}'_{k,i} &= \nu_k\varphi'_{k,i-1}+(1-\nu_k)\varphi'_{k,i} \\
\delta_{k,i} &= 2(\hat{R}_{\varphi_{k,i}}\alpha_{k,i-1}-\varphi'_{k,i}) \\
\lambda_{k,i} &= \lambda_k
\frac{\min\{\alpha_{k,i-1}(b),\ 1\le b\le B)k\}}{\lVert\delta_{k,i}\rVert+\epsilon} \\
\alpha_{k,i} &= \alpha_{k,i-1}-\lambda_k(i)\delta_{k,i} \\
h_k(i) &= \alpha_{k,i}^T\varphi_{k,i}^{}
\end{aligned}$
\\ \addlinespace
&\textbf{Incremental update:} for every node $k$, repeat
\hspace*{\tabindent}%
$\psi_{k,i}^{}=w_{k,i-1}^{}+\mu_ku_{k,i}^Th_k^{}(i)$
\\
\bottomrule
\end{tabular}
\end{table}
\end{document}
答案2
这应该是一个足够的启动项。
我们创建一个虚拟的两列表格。“第一列”是插入到每行前面的空格3em
,使文本看起来像是从第二列开始的(还有其他方法可以做到这一点):
\documentclass{article}
\usepackage{booktabs,array}
\begin{document}
\begin{table}
\centering
\caption{A table caption}
\begin{tabular}{@{}>{\hspace{3em}}p{.8\linewidth}@{}}
\toprule
\unskip Initialization: This is where the pseudocode initialization is supposed to go.
It may span several lines within the \texttt{tabular}. \\
\textbf{Error nonlinearity update:} Some content \\[.25\normalbaselineskip]
\centering\arraybackslash
$\setlength{\arraycolsep}{0pt}
\begin{array}{r>{{}}l}
f(x) &= ax^2 + bx + c \\
g(x) &= f(x) \\
h(x) &= \displaystyle \frac{a}{e}
\end{array}$ \\
\textbf{Incremental update:} Some content \\
\qquad $f(x) = ax^2 + bx + c$ \\
\textbf{Diffusion update:} Some content \\
\qquad $g(x) = f(x)$ \\
\textbf{Decision:} Some content \\
\qquad $h(x) = \frac{a}{e}$ \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
除此之外,它就像在文档中设置常规文本一样。优点是我们使用固定宽度的p
aragraph 列,如果需要,可以容纳\centering
内容。