将一系列不等式与解释交织在一起

将一系列不等式与解释交织在一起

我有一长串的不平等现象:

    \begin{align*}
    d_{DTW}(w'_\epsilon,v) 
    &\leq \sum_{(i',j') \in P'} c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),v_{j'}) + \sum_{(i',j') \in P''} c(w_{i'},v_{j'})\\
    &\leq \sum_{(i',j') \in P} c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),w_{i'}) + \sum_{(i',j') \in P'} c(w_{i'},v_{j'}) + \sum_{(i',j') \in P''} c(w_{i'},v_{j'})\\
    &\leq \sum_{(i',j') \in P} c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),w_{i'}) + \sum_{(i',j') \in P} c(w_{i'},v_{j'})\\
    &\leq \sum_{(i',j') \in P} c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),w_{i'}) + d_{DTW}(w_\epsilon,v)\\
    &\leq \epsilon * \sum_{(i',j') \in P} c(h(\kappa_{i'}),\kappa_{i'}) + d_{DTW}(w_\epsilon,v)\\
    &\leq \delta' * \sum_{(i',j') \in P} c(h(\kappa_{i'}),\kappa_{i'}) + d_{DTW}(w_\epsilon,v)\\
    &\leq \frac{b-b'}{\sum_{(i',j') \in P} c(h(\kappa_{i'}),\kappa_{i'})} * \sum_{(i',j') \in P} c(h(\kappa_{i'}),\kappa_{i'}) + d_{DTW}(w_\epsilon,v)\\
    &\leq b-b' + d_{DTW}(w_\epsilon,v)\\
    &\leq b
\end{align*}

我希望对此进行交错解释,以解释不平等现象的每一步。

我可以将哪种方法与 align 结合来实现这一点?

答案1

amsmath包还提供了环境align*,它提供了一个名为 的宏\intertext,可以完成您要完成的工作。该mathtools包是amsmath包的超集,它提供了一个名为 的宏,特别适合简短的交错解释。以下屏幕截图说明了和\shortintertext的输出。\intertext\shortintertext

在此处输入图片描述

\documentclass{article}
\usepackage{mathtools,lipsum}
\providecommand{\constantsAndvInfiniteEpsilons}{ZZZ} % ?

\begin{document}
\begin{align*}
    d_{\mathrm{DTW}}(w'_\epsilon,v) 
    &\leq \smashoperator{\sum_{(i',j') \in P'}}  
      c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),v_{j'}) 
      + \smashoperator{\sum_{(i',j') \in P''}} c(w_{i'},v_{j'})\\
    \intertext{\lipsum[1][1-3]}
    &\leq \smashoperator{\sum_{(i',j') \in P}} 
      c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),w_{i'}) 
      + \smashoperator{\sum_{(i',j') \in P'}} c(w_{i'},v_{j'}) 
      + \smashoperator{\sum_{(i',j') \in P''}} c(w_{i'},v_{j'})\\
    \intertext{\lipsum[1][1-3]}
    &\leq \smashoperator{\sum_{(i',j') \in P}} 
      c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),w_{i'}) 
      + \smashoperator{\sum_{(i',j') \in P}} c(w_{i'},v_{j'})\\
    \intertext{\lipsum[1][1-3]}
    &\leq \smashoperator{\sum_{(i',j') \in P}} 
      c(h_{\constantsAndvInfiniteEpsilons}(w_{i'}),w_{i'}) 
      + d_{\mathrm{DTW}}(w_\epsilon,v)\\
    \intertext{\lipsum[1][1-3]}
    &\leq \epsilon * \smashoperator{\sum_{(i',j') \in P}} 
      c(h(\kappa_{i'}),\kappa_{i'}) 
      + d_{\mathrm{DTW}}(w_\epsilon,v)\\
    \shortintertext{\lipsum[1][1]}
    &\leq \delta' * \smashoperator{\sum_{(i',j') \in P}} 
      c(h(\kappa_{i'}),\kappa_{i'}) 
      + d_{\mathrm{DTW}}(w_\epsilon,v)\\
    \shortintertext{\lipsum[1][1]}
    &\leq \frac{b-b'}{\sum_{(i',j') \in P}
      c(h(\kappa_{i'}),\kappa_{i'})} * 
      \smashoperator{\sum_{(i',j') \in P}} 
      c(h(\kappa_{i'}),\kappa_{i'}) 
      + d_{\mathrm{DTW}}(w_\epsilon,v)\\
    \shortintertext{\lipsum[1][1]}
    &\leq b-b' + d_{\mathrm{DTW}}(w_\epsilon,v)\\
    \shortintertext{\lipsum[1][1]}
    &\leq b\,.
\end{align*}
\end{document} 

相关内容