根据给出的答案这里,我正在尝试调整较长的多行方程。但是,当我尝试添加更多方程时,解决方案似乎对我的情况不起作用。我想要一个类似这样的输出:
(我已经通过 获得了它\documentclass[preview]{standalone}
。但是,现在我想将它嵌入到 中IEEEtrans class
。
\documentclass[lettersize,journal]{IEEEtran}
\usepackage{mathtools,amssymb,lipsum}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\usepackage{cuted}
\setlength\stripsep{3pt plus 1pt minus 1pt}
\usepackage{empheq}
\title{equation}
\begin{document}
\section{equations}
\begin{strip}
\begin{align}
\begin{gathered}
\textbf{R(Reg\_S)} = {} \forall X1 \in x1 \wedge \forall X3 \in x3 \; | \; \\ X3[1] \coloneqq X1[1] \wedge X3[3] \coloneqq X1[3] \wedge X3[4] \coloneqq X1[4] \wedge X3[5]
\coloneqq X1[6] \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{gathered}
\begin{gathered}
\textbf{R(Reg\_S)} = {} \forall X1 \in x1 \wedge \forall X3 \in x3 \; | \; \\ X3[1] \coloneqq X1[1] \wedge X3[3] \coloneqq X1[3] \wedge X3[4] \coloneqq X1[4] \wedge X3[5]
\coloneqq X1[6] \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{gathered}
\begin{gathered}
\textbf{R(Reg\_S)} = {} \forall X1 \in x1 \wedge \forall X3 \in x3 \; | \; \\ X3[1] \coloneqq X1[1] \wedge X3[3] \coloneqq X1[3] \wedge X3[4] \coloneqq X1[4] \wedge X3[5]
\coloneqq X1[6] \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{gathered}
\end{align}
\end{strip}
\maketitle
\end{document}
答案1
您可以将方程式放在一列中,同时使用align
和split
。但是,由于 1 列的空间确实很小,我不得不对\mathrlap
和进行一些小技巧\hspace
。您还可以让它们跨越两列,并在格式方面具有更大的灵活性。
下面是演示这两种情况的代码。我选择了\wedge
一个分割点,但您必须决定什么才是最清晰的。
代码如下:
\documentclass[letterpaper,journal]{IEEEtran}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{cuted}
\usepackage{empheq}
\usepackage{kantlipsum}
\setlength\stripsep{3pt plus 1pt minus 1pt}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\title{Equation}
\author{Name Name}
\begin{document}
\maketitle
\section{Equations}
\kant[1]:
\begin{align}
\begin{split}
\mathrlap{\mathbf{R(Reg\_S)} = \forall X1 \in x1}
& \\
& \hspace{2em} \begin{aligned}[t]
& \wedge \forall X3 \in x3 \; | \; X3[1] \coloneqq X1[1] \\
& \wedge X3[3] \coloneqq X1[3] \\
& \wedge X3[4] \coloneqq X1[4] \\
& \wedge X3[5] \coloneqq X1[6] \\
& \wedge {x3}' \coloneqq x3 \\
& \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{aligned}
\end{split} \\
\begin{split}
\mathrlap{\mathbf{R(Reg\_S)} = \forall X1 \in x1}
& \\
& \hspace{2em} \begin{aligned}[t]
& \wedge \forall X3 \in x3 \; | \; X3[1] \coloneqq X1[1] \\
& \wedge X3[3] \coloneqq X1[3] \\
& \wedge X3[4] \coloneqq X1[4] \\
& \wedge X3[5] \coloneqq X1[6] \\
& \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{aligned}
\end{split} \\
\begin{split}
\mathrlap{\mathbf{R(Reg\_S)} = \forall X1 \in x1}
& \\
& \hspace{2em} \begin{aligned}[t]
& \wedge \forall X3 \in x3 \; | \; X3[1] \coloneqq X1[1] \\
& \wedge X3[3] \coloneqq X1[3] \\
& \wedge X3[4] \coloneqq X1[4] \\
& \wedge X3[5] \coloneqq X1[6] \\
& \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{aligned}
\end{split}
\end{align}
\kant[2-5]
\begin{strip}
\begin{align}
\begin{split}
\mathbf{R(Reg\_S)} = \forall X1 \in x1
& \begin{aligned}[t]
& \wedge \forall X3 \in x3 \; | \; X3[1] \coloneqq X1[1] \wedge X3[3] \coloneqq X1[3] \wedge X3[4] \coloneqq X1[4] \wedge X3[5] \coloneqq X1[6] \\
& \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{aligned}
\end{split} \\
\begin{split}
\mathbf{R(Reg\_S)} = \forall X1 \in x1
& \begin{aligned}[t]
& \wedge \forall X3 \in x3 \; | \; X3[1] \coloneqq X1[1] \wedge X3[3] \coloneqq X1[3] \wedge X3[4] \coloneqq X1[4] \wedge X3[5] \coloneqq X1[6] \\
& \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{aligned}
\end{split} \\
\begin{split}
\mathbf{R(Reg\_S)} = \forall X1 \in x1
& \begin{aligned}[t]
& \wedge \forall X3 \in x3 \; | \; X3[1] \coloneqq X1[1] \wedge X3[3] \coloneqq X1[3] \wedge X3[4] \coloneqq X1[4] \wedge X3[5] \coloneqq X1[6] \\
& \wedge {x3}' \coloneqq x3 \cup \{X3[1], X3[3], X3[4], X3[5]\}
\end{aligned}
\end{split}
\end{align}
\end{strip}
\kant[6-8]
\end{document}
截图
由于split
会中断列的连续性,使得文本在之前的下一列中继续split
,因此我个人更喜欢将方程式放在一列中,或者放在页面的顶部或底部——对于后一种情况,可以使用包浮点数可能会有帮助。