我目前的方法是使用幻像将第一行放置在我想要的位置,有没有更好的方法可以做到这一点?我仍然喜欢环境split
或类似的东西,这样我就可以对齐多个 where 子句。
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\newcommand{\card}[1]{\left|#1\right|}
\newcommand{\vertices}[1]{V\!\left(#1\right)}
\begin{equation}
\begin{split}
&\phantom{aaaaaaaa}\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\
\textbf{where}\;x &= \text{number of maximal overlapping regions in $\modelM$}
\end{split}
\end{equation}
答案1
我很惊讶没有给出最简单的解决方案,即使用gathered
。 的添加\DeclarePairedDelimiter
只是风格上的。
\documentclass{article}
\usepackage{amsmath,mathtools}
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\DeclarePairedDelimiter{\card}{\lvert}{\rvert}
\DeclarePairedDelimiter{\parens}{(}{)}
\newcommand{\vertices}{V\parens}
\begin{document}
\begin{equation}
\begin{gathered}
\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\
\text{\textbf{where} $x={}$number of maximal overlapping regions in $\modelM$}
\end{gathered}
\end{equation}
\end{document}
可以使用多个子句alignedat
来准确指定间距:
\documentclass{article}
\usepackage{amsmath,mathtools}
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\DeclarePairedDelimiter{\card}{\lvert}{\rvert}
\DeclarePairedDelimiter{\parens}{(}{)}
\newcommand{\vertices}{V\parens}
\begin{document}
\begin{equation}
\begin{gathered}
\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\
\text{\textbf{where} $x={}$number of maximal overlapping regions in $\modelM$}
\end{gathered}
\end{equation}
And another
\begin{equation}
\begin{gathered}
\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\
\begin{alignedat}{2}
&\textbf{where } & x&=\text{number of maximal overlapping regions in $\modelM$}\\
& & y&=\text{something else}
\end{alignedat}
\end{gathered}
\end{equation}
\end{document}
答案2
因为第一行实际上是等式,所以我会这样做:
\documentclass{article}
\usepackage{amsmath,amssymb}
\begin{document}
\newcommand\+{\mkern2mu}
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\graphH}{\mathcal{H}}
\newcommand{\setCA}{\mathbb{C}}
\newcommand{\setE}{\mathbb{E}}
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\vertices}[1]{V\!\left(#1\right)}
\newcommand{\edges}[1]{E\!\left(#1\right)}
\newcommand{\tuple}[1]{\left<\,#1\,\right>}
\newcommand{\card}[1]{\left|#1\right|}
\begin{gather}
\exists\+e \in \edges{\graphG}, \graphH = \tuple{\vertices{\graphG},\ \edges{\graphG} \setminus \set{e} }, \graphH \in \setCA \\
\begin{aligned}\notag
\textbf{where}\;\setCA &= \text{set of all circular-arc graphs} \\
\setE &= \text{set of all empty graphs}
\end{aligned}
\end{gather}
\end{document}
答案3
今天的恶作剧,split
实际上是两列array
类型的东西。所以为什么不试试呢\multicolumn
。这确实有效。虽然它不是好的
\documentclass[a4paper]{memoir}
\usepackage{amsmath}
\begin{document}
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\newcommand{\card}[1]{\left|#1\right|}
\newcommand{\vertices}[1]{V\!\left(#1\right)}
\newcommand\HideMe[1]{\multicolumn{2}{c}{$\displaystyle #1$}}
\begin{equation}
\begin{split}
\HideMe{\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} } \\
\textbf{where}\;x &= \text{number of maximal overlapping regions in $\modelM$}
\end{split}
\end{equation}
\end{document}
答案4
使用aligned
内部gathered
内部equation
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\newcommand{\vertices}[1]{V\!\left(#1\right)}
\newcommand{\card}[1]{\left|#1\right|}
\begin{equation}
\begin{gathered}
\modelM \mapsto \graphG,\ x \le \card{\vertices{\graphG}} \\
\begin{aligned}
\textbf{where}\;x &= \text{number of maximal overlapping regions in $\modelM$}
\end{aligned}
\end{gathered}
\end{equation}