如何增加子方程环境中方程之间的空间?

如何增加子方程环境中方程之间的空间?

我已经编写了附件中的优化问题。但是,可以看出方程 (1c)-(1j) 彼此非常接近。我想在每个方程之间添加一个小空格。最好的方法是什么?

多谢!!

\documentclass[review,12pt]{elsarticle}
\usepackage{array}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{setspace}
\usepackage{subfigure}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\diag}{diag}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{footnote}
\makesavenoteenv{tabular}
\makesavenoteenv{table}
\newcommand{\tightermath}{%
\setlength{\thickmuskip}{.3\thickmuskip}
\setlength{\medmuskip}{.3\medmuskip}
\setlength{\thinmuskip}{.3\thinmuskip}}
\onehalfspacing
\begin{document}
\begin{figure}[h]
\begin{subequations}
    \setlength\parindent{0pt}
    \rule{\columnwidth}{1pt}
    \textbf{M2:} \textbf{SDP-based OPF} \\
    \rule[1ex]{\columnwidth}{1pt}       
    \vspace*{-1.5\baselineskip} 
    \begin{flalign}
    \mathbf{M2: } \underset{\Psi}{\mathbf{minimize}}\ f(\Psi)&&& 
    \end{flalign}       
    \vspace*{-1.5\baselineskip}     
    \begin{flalign}
    &\mathbf{variable:}\hspace{1em}\mathbf{W}&\\
    & \hspace{5.7em}P_{g_k}^\varphi, Q_{g_k}^\varphi \hspace{2em}\forall \varphi \in \eta_{k}, \forall k \in N & \nonumber
    \end{flalign}   
    $\mathbf{subject}$ $\mathbf{to:}$ 
    \begin{flalign}
    & \Tr(\mathbf{\Psi}_{k,nw_p}^\varphi \mathbf{W}) + P_{l_k}^\upsilon = 0, \hspace{11.7em}\forall \varphi \in \eta_k, \upsilon \in \chi_k, k \in N\backslash G \label{eq:PBL2}\\ 
    & \Tr(\mathbf{\Psi}_{k,nw_q}^\varphi \mathbf{W}) + Q_{l_k}^\upsilon-y_{c_k}^\upsilon  \Tr(\mathbf{\Psi}_{k,nw_v}^\varphi\mathbf{W}) = 0, \hspace{3em}\forall \varphi \in \eta_k, \upsilon \in \chi_k, k \in N\backslash G \label{eq:QBL2} \\
    & \underline{P}_{g_i} \leq \Tr(\mathbf{\Psi}_{i,nw_p}^\varphi \mathbf{W}) {+} P_{l_i}^\upsilon \leq \overline{P}_{g_i}, \hspace{8.8em}\forall \varphi \in \eta_i, \upsilon \in \chi_i, i \in G \label{eq:PBG2}\\
    & \underline{Q}_{g_i} \leq \Tr(\mathbf{\Psi}_{i,nw_q}^\varphi \mathbf{W}) {+} Q_{l_i}^\upsilon \leq \overline{Q}_{g_i}, \hspace{8.8em}\forall \varphi \in \eta_i, \upsilon \in \chi_i, i \in G \label{eq:QBG2}\\
    & (\underline{V}_k)^2 \leq \Tr(\mathbf{\Psi}_{k,nw_v}^\varphi \mathbf{W}) \leq (\overline{V_k})^2, \hspace{9.0em}\forall \varphi \in \eta_k, k \in N^+ \label{eq:Vol2} \\
    & [\mathbf{W}]_{\eta_0 \times \eta_0} = \mathbf{V}_0 \mathbf{V}_0^H \\
    & \mathbf{W} \succeq 0, \\
    & \rank(\mathbf{W}) = 1 \label{rank_con}
    \end{flalign}
    \rule[1ex]{\columnwidth}{1pt}
\end{subequations}
\end{figure}
\end{document}

答案1

由于 ,线条特别紧\onehalfspacing。请将其删除。

\documentclass[review,12pt]{elsarticle}

\usepackage{amsmath}

\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\diag}{diag}

\begin{document}

\begin{figure}[ht]
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\begin{subequations}
\hrule height 1pt\kern6pt

\textbf{M2:} \textbf{SDP-based OPF}

\kern6pt\hrule height 1pt

\begin{flalign}
&\textbf{M2: } \operatorname*{\mathbf{minimize}}_{\Psi} f(\Psi)&& \\
&\textbf{variable:}\quad
    \begin{aligned}[t]
    &\mathbf{W}\\[-\jot]
    &P_{g_k}^\varphi, Q_{g_k}^\varphi \qquad \forall \varphi \in \eta_{k}, \forall k \in N
    \end{aligned} &&
\\
& \textbf{subject to:} && \nonumber
\\
&\! \Tr(\mathbf{\Psi}_{k,nw_p}^\varphi \mathbf{W}) + P_{l_k}^\upsilon = 0, 
  && \forall \varphi \in \eta_k, \upsilon \in \chi_k, k \in N\backslash G
\label{eq:PBL2}
\\ 
&\! \Tr(\mathbf{\Psi}_{k,nw_q}^\varphi \mathbf{W}) 
    + Q_{l_k}^\upsilon-y_{c_k}^\upsilon  \Tr(\mathbf{\Psi}_{k,nw_v}^\varphi\mathbf{W}) = 0,
  &&\forall \varphi \in \eta_k, \upsilon \in \chi_k, k \in N\backslash G
\label{eq:QBL2}
\\
& \underline{P}_{g_i} \leq \Tr(\mathbf{\Psi}_{i,nw_p}^\varphi \mathbf{W})
  + P_{l_i}^\upsilon \leq \overline{P}_{g_i},
  &&\forall \varphi \in \eta_i, \upsilon \in \chi_i, i \in G
\label{eq:PBG2}
\\
& \underline{Q}_{g_i} \leq \Tr(\mathbf{\Psi}_{i,nw_q}^\varphi \mathbf{W})
  + Q_{l_i}^\upsilon \leq \overline{Q}_{g_i},
  &&\forall \varphi \in \eta_i, \upsilon \in \chi_i, i \in G
\label{eq:QBG2}
\\
& (\underline{V}_k)^2 \leq \Tr(\mathbf{\Psi}_{k,nw_v}^\varphi \mathbf{W}) \leq (\overline{V_k})^2,
  &&\forall \varphi \in \eta_k, k \in N^+
\label{eq:Vol2}
\\
& [\mathbf{W}]_{\eta_0 \times \eta_0} = \mathbf{V}_0 \mathbf{V}_0^H
\\
& \mathbf{W} \succeq 0,
\\
&\! \rank(\mathbf{W}) = 1
\label{rank_con}
\end{flalign}

\kern6pt\hrule height 1pt
\end{subequations}
\end{figure}

\end{document}

我还做了其他一些更改以避免猜测空格。

在此处输入图片描述

答案2

增加两行之间的间距可以通过向 附加一个值来实现\\,例如

 \\[2ex]

如果你想对显示的所有行执行此操作,那么纯 TeX 有\openup通常用作的命令

\openup 2\jot

其中\jot是标准空间量。amsmath这在命令中内置,要获得它,您需要调整宏\spread@equation。下面的代码是 ,3\jot以示夸张。

示例输出

\documentclass{article}

\usepackage[fleqn]{amsmath}

\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\rank}{rank}
\setlength{\mathindent}{0pt}

\begin{document}

\begin{subequations}
  \setlength{\parindent}{0pt} \setlength{\abovedisplayskip}{0pt}
  \setlength{\belowdisplayskip}{0pt}
  \makeatletter
  \def\spread@equation{\reset@strutbox@
  \openup3\jot \let\spread@equation\@empty}
  \makeatother

  \rule{\columnwidth}{1pt}

  \textbf{M2:} \textbf{SDP-based OPF}

  \rule[1ex]{\columnwidth}{1pt}
  \begin{gather}
    \textbf{M2:} \qquad \operatorname*{minimize}_{\Psi} f(\Psi)\\
    \textbf{variables:} \quad\begin{aligned}[t] &\mathbf{W}\\
      &P_{g_k}^\varphi, Q_{g_k}^\varphi \qquad \forall \varphi \in
      \eta_{k}, \forall k \in N
    \end{aligned}\\
    \textbf{subject to:} \nonumber\\
    \Tr(\mathbf{\Psi}_{k,nw_p}^\varphi \mathbf{W}) + P_{l_k}^\upsilon
    = 0, \qquad\forall \varphi \in \eta_k, \upsilon \in \chi_k, k \in
    N\backslash G,
    \label{eq:PBL2}\\
    \Tr(\mathbf{\Psi}_{k,nw_q}^\varphi \mathbf{W}) +
    Q_{l_k}^\upsilon-y_{c_k}^\upsilon
    \Tr(\mathbf{\Psi}_{k,nw_v}^\varphi\mathbf{W}) = 0, \quad\forall
    \varphi \in \eta_k, \upsilon \in \chi_k, k \in
    N\backslash G \label{eq:QBL2}, \\
    \underline{P}_{g_i} \leq \Tr(\mathbf{\Psi}_{i,nw_p}^\varphi
    \mathbf{W}) {+} P_{l_i}^\upsilon \leq \overline{P}_{g_i},
    \qquad\forall \varphi \in \eta_i, \upsilon \in \chi_i, i \in
    G, \label{eq:PBG2}\\
    \underline{Q}_{g_i} \leq \Tr(\mathbf{\Psi}_{i,nw_q}^\varphi
    \mathbf{W}) {+} Q_{l_i}^\upsilon \leq \overline{Q}_{g_i},
    \qquad\forall \varphi \in \eta_i, \upsilon \in \chi_i, i \in
    G, \label{eq:QBG2}\\
    (\underline{V}_k)^2 \leq \Tr(\mathbf{\Psi}_{k,nw_v}^\varphi
    \mathbf{W}) \leq (\overline{V_k})^2, \qquad\forall \varphi \in
    \eta_k, k \in N^+, \label{eq:Vol2} \\
    [\mathbf{W}]_{\eta_0 \times \eta_0} = \mathbf{V}_0 \mathbf{V}_0^H \\
    \mathbf{W} \succeq 0, \\
    \rank(\mathbf{W}) = 1. \label{rank_con}
  \end{gather}
  \rule[1ex]{\columnwidth}{1pt}
\end{subequations}

\end{document}

\vspace请注意,我通过调整内部变量而不是临时添加命令来消除一些垂直空间。

相关内容