取消命令跨越多行方程式

取消命令跨越多行方程式

我正在尝试取消一个太长的方程式项,并且取消箭头与我想要取消的上方和下方的方程式重叠:在此处输入图片描述

最小代码:

\documentclass[8pt]{extarticle}
\usepackage{extsizes}
\usepackage{amsmath}
\usepackage[margin=0.5in]{geometry}
\usepackage{cancel}
\renewcommand{\vec}[1]{\mathbf{#1}}
\begin{document}

\begin{align}
    &b^T(x_k)\left(\vec{B}^{T}\vec{W}(x_k)\vec{B}-K_\lambda(x_k,x_k)v(x_k)b^t(x_k)\right)^{-1}det\left(\vec{B}^{T}\vec{W}(x_k)\vec{B}-K_\lambda(x_k,x_k)v(x_k)b^T(x_k)\right)b(x_j)=\nonumber\\[1em]
    &=b^T(x_k)\left[   (\vec{B}^T\vec{W}\vec{B})^{-1}+\dfrac{ (\vec{B}^T\vec{W}\vec{B})^{-1}  (K_\lambda(x_k,x_k)b(x_k)b^T(x_k))  (\vec{B}^T\vec{W}\vec{B})^{-1}}{1-K_\lambda(x_k,x_k)b^T(x_k)  (\vec{B}^T\vec{W}\vec{B})^{-1} b(x_k)}  \right]det (\vec{B}^T\vec{W}\vec{B})\left(1-K_\lambda(x_k,x_k)b^T(x_k)  (\vec{B}^T\vec{W}\vec{B})^{-1} b(x_k)\right)b(x_j)=\nonumber\\[1em]
    &=b^T(x_k)\underbrace{(\vec{B}^T\vec{W}\vec{B})^{-1}det(\vec{B}^T\vec{W}\vec{B})}_{adj(\vec{B}^T\vec{W}\vec{B})}\left(  1-K_\lambda(x_k,x_k)b^T(x_k)  (\vec{B}^T\vec{W}\vec{B})^{-1} b(x_k) \right)b(x_j)\nonumber\\[1em]
    &\text{\qquad   \qquad }\text{\qquad }\text{\qquad   \qquad }\text{\qquad }+b^T(x_k)\underbrace{(\vec{B}^T\vec{W}\vec{B})^{-1}det(\vec{B}^T\vec{W}\vec{B})}_{adj(\vec{B}^T\vec{W}\vec{B})}\left( K_\lambda(x_k,x_k)b(x_k)b^T(x_k)  \right)(\vec{B}^T\vec{W}\vec{B})^{-1}b(x_j)=\nonumber\\[1em]
    &=b(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_j)-b(x_k)adj(\vec{B}^T\vec{W}\vec{B}) K_\lambda(x_k,x_k)b^T(x_k)(\vec{B}^T\vec{W}\vec{B})^{-1}b(x_k)b(x_j)\nonumber\\[1em]
    &\text{\qquad   \qquad }\text{\qquad }\text{\qquad   \qquad }\text{\qquad }+b(x_k)adj(\vec{B}^T\vec{W}\vec{B}) K_\lambda(x_k,x_k)b(x_k)b^T(x_k)(\vec{B}^T\vec{W}\vec{B})^{-1}b(x_j)=\nonumber\\[1em]
    &=b(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_j)+\dfrac{K_\lambda(x_k,x_k)}{det(\vec{B}^T\vec{W}\vec{B})}   \left[  -b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})\underbrace{b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_k)}_{1\times1}  b(x_j)+ b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_k)b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_j) \right]\nonumber\\[1em]
    &=b(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_j)+\dfrac{K_\lambda(x_k,x_k)}{det(\vec{B}^T\vec{W}\vec{B})}   \cancelto{0}{\left[ b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_k)b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_j)-b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_j)  b^T(x_k)adj(\vec{B}^T\vec{W}\vec{B})b(x_k) \right]}
\end{align}

In conclusion, if we plug Expression 6 into Expression 5, we obtain that
\begin{equation}
b^T(x_k)adj\left(\vec{B}^{(-k),T}\vec{W}^{(-k)}(x_k)\vec{B}^{(-k)}\right)\vec{B}^{(-k),T}\vec{W}^{(-k)}(x_k)\vec{y}^{(-k)}=\sum_{j\neq k}^N\left[     b^T(x_k)adj\left(\vec{B}^{T}\vec{W}(x_k)\vec{B}\right)b(x_j)K_\lambda(x_k, x_j)y_j     \right] \label{eq7}
\end{equation}
\end{document}

我怎样才能使对角箭头变得更平坦(当然,如果可能的话)?

答案1

我会\cancelto{0}{...}用 来代替\underbrace{...}_{=0}

我不需要生成大量语句,而是在环境中\nonumber使用单个环境。此外,我会引入更多换行符,以避免出现多行过满的情况。aligned[b]equation

在此处输入图片描述

\documentclass[8pt]{extarticle}
\usepackage{extsizes}
\usepackage[margin=1in]{geometry}

\usepackage{amsmath,amssymb}
\DeclareMathOperator{\adj}{adj} % \det and \adj are operators
\renewcommand{\vec}[1]{\mathbf{#1}}

\begin{document}
\begin{equation}
\begin{aligned}[b]
&b^{T\!}(x_k)\left(\vec{B}^{T}\vec{W}(x_k)\vec{B}-K_\lambda(x_k,x_k)v(x_k)b^{T\!}(x_k)\right)^{-1}
    \det\left(\vec{B}^{T}\vec{W}(x_k)\vec{B}-K_\lambda(x_k,x_k)v(x_k)b^{T\!}(x_k)\right)b(x_j)\\[1em]
&\quad=b^{T\!}(x_k)\left[   (\vec{B}^T\vec{W}\vec{B})^{-1}+
\frac{ (\vec{B}^T\vec{W}\vec{B})^{-1}  (K_\lambda(x_k,x_k)b(x_k)b^{T\!}(x_k))  (\vec{B}^T\vec{W}\vec{B})^{-1}}
  {1-K_\lambda(x_k,x_k)b^{T\!}(x_k) (\vec{B}^T\vec{W}\vec{B})^{-1} b(x_k)}  \right] \\
&\qquad\times\det (\vec{B}^T\vec{W}\vec{B})\left(1-K_\lambda(x_k,x_k)b^{T\!}(x_k)  
  (\vec{B}^T\vec{W}\vec{B})^{-1} b(x_k)\right)b(x_j)\\[1em]
&\quad=b^{T\!}(x_k)\underbrace{(\vec{B}^T\vec{W}\vec{B})^{-1}\det(\vec{B}^T\vec{W}\vec{B})}_{\adj(\vec{B}^T\vec{W}\vec{B})}
  \left( 1-K_\lambda(x_k,x_k)b^{T\!}(x_k) (\vec{B}^T\vec{W}\vec{B})^{-1} b(x_k) \right)b(x_j)\\
&\qquad+b^{T\!}(x_k)\underbrace{(\vec{B}^T\vec{W}\vec{B})^{-1}\det(\vec{B}^T\vec{W}\vec{B})}_{\adj(\vec{B}^T\vec{W}\vec{B})}
  \left( K_\lambda(x_k,x_k)b(x_k)b^{T\!}(x_k) \right)(\vec{B}^T\vec{W}\vec{B})^{-1}b(x_j)\\[1em]
&\quad=b(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_j)-b(x_k)\adj(\vec{B}^T\vec{W}\vec{B}) 
  K_\lambda(x_k,x_k)b^{T\!}(x_k)(\vec{B}^T\vec{W}\vec{B})^{-1}b(x_k)b(x_j)\\[1em]
&\qquad+b(x_k)\adj(\vec{B}^T\vec{W}\vec{B}) K_\lambda(x_k,x_k)b(x_k)b^{T\!} (x_k)(\vec{B}^T\vec{W}\vec{B})^{-1}b(x_j)\\[1em]
&\quad=b(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_j)+\frac{K_\lambda(x_k,x_k)}{\det(\vec{B}^T\vec{W}\vec{B})}   \\
&\qquad \times\left[  -b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})
    \smash[b]{\underbrace{b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_k)}_{1\times1}}
    b(x_j)+ b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_k)b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_j) \right]\\[1em]
&\quad=b(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_j)+\frac{K_\lambda(x_k,x_k)}{\det(\vec{B}^T\vec{W}\vec{B})}   \\
&\qquad \times\underbrace{\left[ b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_k)b^{T\!}(x_k)
  \adj(\vec{B}^T\vec{W}\vec{B})b(x_j)-b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_j)  
  b^{T\!}(x_k)\adj(\vec{B}^T\vec{W}\vec{B})b(x_k) \right]}_{=0}
\end{aligned}
\end{equation}

In conclusion, if we plug Expression 6 into Expression 5, we obtain
\begin{equation}
\begin{aligned}[b]
&b^{T\!}(x_k)\adj\left(\vec{B}^{(-k),T}\vec{W}^{(-k)}(x_k)\vec{B}^{(-k)}\right)
  \vec{B}^{(-k),T}\vec{W}^{(-k)}(x_k)\vec{y}^{(-k)}\\
&\quad =\sum_{j\neq k}^N\left[ b^{T\!}(x_k)\adj\left(\vec{B}^{T}\vec{W}(x_k)\vec{B}\right)
   b(x_j)K_\lambda(x_k, x_j)y_j  \right] 
\end{aligned}
\label{eq7}
\end{equation}
\end{document}

附录:如果您愿意通过将二次形式项替换为更简洁的表达式来简化您的符号,则您不需要使用8pt主字体大小;常规10pt大小,甚至是11pt,都可以。

在此处输入图片描述

\documentclass[10pt]{article}

\usepackage{amsmath,amssymb}
\DeclareMathOperator{\adj}{adj}

\usepackage[margin=1in]{geometry}
\renewcommand{\vec}[1]{\mathbf{#1}}

\begin{document}
Put $\vec{P}=\vec{B}^T\vec{W}\vec{B}$, 
$\vec{P}^{}_{\!k}=\vec{B}^{T}\vec{W}(x_k)\vec{B}$, 
$b_i=b(x_i)$, $i=1,2,\dots,N$, 
and $\widetilde{K}=K_\lambda(x_k,x_k)$. Then
\begin{equation} \label{eq6}
\begin{aligned}[b]
&b_k^{T\!}\bigl(\vec{P}^{}_{\!k}-\widetilde{K}v(x_k)b_k^{T\!}\,\bigr)^{-1}
    \det\bigl(\vec{P}^{}_{\!k}-\widetilde{K}v(x_k)b_k^{T\!}\,\bigr) b_j\\ 
&\quad= b_k^{T\!}\biggl[ \vec{P}^{-1}+
   \frac{ \vec{P}^{-1} (\widetilde{K}b_kb_k^{T\!}\,) \vec{P}^{-1}}
        { 1-\widetilde{K}b_k^{T\!} \, \vec{P}^{-1} b_k} \biggr] 
         \det\vec{P} \bigl(1-\widetilde{K}b_k^{T\!} \, \vec{P}^{-1} b_k\bigr) b_j\\ 
&\quad= b_k^{T\!}\underbrace{\vec{P}^{-1}\det\vec{P}}_{\adj(\vec{P})}
            \bigl(  1-\widetilde{K}b_k^{T\!} \, \vec{P}^{-1} b_k \bigr) b_j
       +b_k^{T\!}\underbrace{\vec{P}^{-1}\det\vec{P}}_{\adj(\vec{P})}
            \bigl( \widetilde{K}b_kb_k^{T\!} \, \bigr)\vec{P}^{-1}b_j\\ 
&\quad= b_k^{T\!}\adj(\vec{P})b_j-b_k\adj(\vec{P}) \widetilde{K}b_k^{T\!} \, \vec{P}^{-1}b_kb_j
        +b_k^{T\!}\adj(\vec{P}) \widetilde{K}b_kb_k^{T\!} \, \vec{P}^{-1}b_j\\
&\quad= b_k^{T\!}\adj(\vec{P})b_j+\frac{\widetilde{K}}{\det\vec{P}} 
       \bigl[  -b_k^{T\!}\adj(\vec{P})
    \underbrace{b_k^{T\!}\adj(\vec{P})b_k}_{1\times1} b_j
    + b_k^{T\!}\adj(\vec{P})b_kb_k^{T\!}\adj(\vec{P})b_j \bigr] \\ 
&\quad= b_k^{T\!}\adj(\vec{P})b_j+\frac{\widetilde{K}}{\det\vec{P}}     
        \underbrace{\bigl[ b_k^{T\!}\adj(\vec{P})b_kb_k^{T\!}
  \adj(\vec{P})b_j-b_k^{T\!}\adj(\vec{P})b_j  
  b_k^{T\!}\adj(\vec{P})b_k \bigr]}_{=0}\,.
\end{aligned}
\end{equation}
In conclusion, if we plug Expression 6 into Expression 5, we obtain
\begin{equation} \label{eq7}
b_k^{T\!}\adj\bigl(\vec{B}^{(-k),T}\vec{W}^{(-k)}(x_k)\vec{B}^{(-k)}\bigr)
  \vec{B}^{(-k),T}\vec{W}^{(-k)}(x_k)\vec{y}^{(-k)}
 =\sum_{j\neq k}^N \bigl[ b_k^{T\!}\adj(\vec{P}^{}_{\!k}) b_jK_\lambda(x_k, x_j)y_j  \bigr] \,.
\end{equation}
\end{document}

相关内容