breqn 中的嵌套括号不起作用

breqn 中的嵌套括号不起作用

我尝试使用最新版本的breqn包来分解这个方程;结果表明,即使使用,也无法分解大于 2 级/深度的方程\setkeys{breqn}{breakdepth={4}},而且 2 级/深度的分解是正确的。你有什么解释吗?

\documentclass{article}


\usepackage{breqn}
\setkeys{breqn}{breakdepth={4}}

\begin{document}

\begin{dmath}
R
\left\{tr\left[{P}_{k+1}^{H}\left({V}^{\ast\,\!}-{V}_{k+1}\right)+{Q}_{k+1}^{H}\left({W}^{\ast\,\!}-{W}_{k+1}\right)\right]\right\}
%level 1
=R
\left\{tr\left[
\left(  %level 3
{A}_{1}^{H}{R}_{k+1}{B}_{1}^{H}+{A}_{1}^{H}{R}_{k+1}{B}_{1}^{H}+{A}_{1}^{H}{R}_{k+1}{B}_{1}^{H}
+{\overline{A}}_{2}^{H}\overline{{R}_{k+1}}{\overline{B}}_{2}^{H}+{B}_{3}{R}_{k+1}^{H}{A}_{3}
+{\overline{A}}_{2}^{H}\overline{{R}_{k+1}}{\overline{B}}_{2}^{H}+{A}_{1}^{H}{R}_{k+1}
\right)
% level 2
+\left(  %level 3
{C}_{1}^{H}{R}_{k+1}{D}_{1}^{H}
+{\overline{C}}_{2}^{H}\overline{{R}_{k+1}}{\overline{D}}_{2}^{H}{D}_{3}{R}_{k+1}^{H}{C}_{3}
+\overline{{D}_{4}}{R}_{k+1}^{T}\overline{{C}_{4}}
+\dfrac{{\left\Vert{R}_{k+1}\right\Vert }^{2}}{{\left\Vert {R}_{k}\right\Vert}^{2}}{Q}_{k}
+\left({W}^{\ast\,\!}-{W}_{k+1}\right)+\left({W}^{\ast\,\!}-{W}_{k+1}\right)
\right)
%level 2
+\left({W}^{\ast\,\!}-{W}_{k+1}\right)+\left({W}^{\ast\,\!}-{W}_{k+1}\right)
\right]\right\}
%level 2
=R
\left\{tr\left[ %level 2
{R}_{k+1}^{H}{A}_{1}\left({V}^{\ast\,\!}-{V}_{k+1}\right){B}_{1}
+{R}_{k+1}^{T}{\overline{A}}_{2}\left({V}^{\ast\,\!}-{V}_{k+1}\right){\overline{B}}_{2}
+{R}_{k+1}{B}_{3}^{H}\left({V}^{\ast\,\!}-{V}_{k+1}\right){A}_{3}^{H}
+\overline{{R}_{k+1}}{\overline{{B}_{4}}}^{H}\left({V}^{\ast\,\!}-{V}_{k+1}\right){\overline{{A}_{4}}}^{H}
+{R}_{k+1}^{H}{C}_{1}\left({W}^{\ast\,\!}-{W}_{k+1}\right){D}_{1}+{R}_{k+1}^{T}{\overline{C}}_{2}\left({W}^{\ast\,\!}-{W}_{k+1}\right){\overline{D}}_{2}
+{R}_{k+1}{D}_{3}^{H}\left({W}^{\ast\,\!}-{W}_{k+1}\right){C}_{3}^{H}+\overline{{R}_{k+1}}{\overline{{D}_{4}}}^{H}\left({W}^{\ast\,\!}-{W}_{k+1}\right){\overline{{C}_{4}}}^{H}
+\left(\dfrac{{\left\Vert{R}_{k+1}\right\Vert }^{2}}{{\left\Vert {R}_{k}\right\Vert}^{2}}{P}_{k}^{H}\left({V}^{\ast\,\!}-{V}_{k+1}\right)\,\,+{Q}_{k}^{H}\left({W}^{\ast\,\!}-{W}_{k+1}\right)\right)
\right]\right\}
\label{eq12}
\end{dmath}

\end{document}

答案1

嗯,看起来不像breakdepth宣传的那样有效(但这breqn是一个复杂的软件包,而且 Michael 很遗憾已经离开了我们)。这是一种可能的解决方法

在此处输入图片描述

\documentclass{article}


\usepackage{breqn}
\setkeys{breqn}{breakdepth=4}
\def\Left#1{\mathopen{\big#1}}
\def\Right#1{\mathclose{\big#1}}

\def\overbar#1{\overline{\strut#1}}
\def\tr{\mathop{\mathrm{tr}}}

\begin{document}

\begin{dmath}
R
\Left\{\tr\Left[{P}_{k+1}^{H}\Left({V}^{\ast\,\!}-{V}_{k+1}\Right)+{Q}_{k+1}^{H}\Left({W}^{\ast\,\!}-{W}_{k+1}\Right)\Right]\Right\}
%level 1
=R
\Left\{\tr\Left[
\Left(  %level 3
{A}_{1}^{H}{R}_{k+1}{B}_{1}^{H}+{A}_{1}^{H}{R}_{k+1}{B}_{1}^{H}+{A}_{1}^{H}{R}_{k+1}{B}_{1}^{H}
+{\overbar{A}}_{2}^{H}\overbar{{R}_{k+1}}{\overbar{B}}_{2}^{H}+{B}_{3}{R}_{k+1}^{H}{A}_{3}
+{\overbar{A}}_{2}^{H}\overbar{{R}_{k+1}}{\overbar{B}}_{2}^{H}+{A}_{1}^{H}{R}_{k+1}
\Right)
% level 2
+\Left(  %level 3
{C}_{1}^{H}{R}_{k+1}{D}_{1}^{H}
+{\overbar{C}}_{2}^{H}\overbar{{R}_{k+1}}{\overbar{D}}_{2}^{H}{D}_{3}{R}_{k+1}^{H}{C}_{333}
+\overbar{{D}_{4}}{R}_{k+1}^{T}\overbar{{C}_{4}}
+\dfrac{{\Left\Vert{R}_{k+1}\Right\Vert }^{2}}{{\Left\Vert {R}_{k}\Right\Vert}^{2}}{Q}_{k}
+\Left({W}^{\ast\,\!}-{W}_{k+1}\Right)+\Left({W}^{\ast\,\!}-{W}_{k+1}\Right)
\Right)
%level 2
+\Left({W}^{\ast\,\!}-{W}_{k+1}\Right)+\Left({W}^{\ast\,\!}-{W}_{k+1}\Right)
\Right]\Right\}
%level 2
=R
\Left\{\tr\Left[ %level 2
{R}_{k+1}^{H}{A}_{1}\Left({V}^{\ast\,\!}-{V}_{k+1}\Right){B}_{1}
+{R}_{k+1}^{T}{\overbar{A}}_{2}\Left({V}^{\ast\,\!}-{V}_{k+1}\Right){\overbar{B}}_{2}
+{R}_{k+1}{B}_{3}^{H}\Left({V}^{\ast\,\!}-{V}_{k+1}\Right){A}_{3}^{H}
+\overbar{{R}_{k+1}}{\overbar{{B}_{4}}}^{H}\Left({V}^{\ast\,\!}-{V}_{k+1}\Right){\overbar{{A}_{4}}}^{H}
+{R}_{k+1}^{H}{C}_{1}\Left({W}^{\ast\,\!}-{W}_{k+1}\Right){D}_{1}+{R}_{k+1}^{T}{\overbar{C}}_{2}\Left({W}^{\ast\,\!}-{W}_{k+1}\Right){\overbar{D}}_{2}
+{R}_{k+1}{D}_{3}^{H}`\Left({W}^{\ast\,\!}-{W}_{k+1}\Right){C}_{3}^{H}+\overbar{{R}_{k+1}}{\overbar{{D}_{4}}}^{H}\Left({W}^{\ast\,\!}-{W}_{k+1}\Right){\overbar{{C}_{4}}}^{H}
+\Left(\dfrac{{\Left\Vert{R}_{k+1}\Right\Vert }^{2}}{{\Left\Vert {R}_{k}\Right\Vert}^{2}}{P}_{k}^{H}\Left({V}^{\ast\,\!}-{V}_{k+1}\Right)\,\,+{Q}_{k}^{H}\Left({W}^{\ast\,\!}-{W}_{k+1}\Right)\Right)
\Right]\Right\}
\label{eq12}
\end{dmath}

\end{document}

相关内容