Centring without phantom spacing

My current approach uses phantom to place the first line where I want it, is there a better way to do this? I would still like the split environment or something similar so I can align multiple where clauses.

\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\newcommand{\card}[1]{\left|#1\right|}
\newcommand{\vertices}[1]{V\!\left(#1\right)}

$$\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}$$


-
Under any circumstances, you will have to know the width of the widest where clause.As for the centering, there is several useful tools in the mathtools package. –  daleif Dec 10 '13 at 14:24
Use gathered environment from mathtools –  Aditya Dec 10 '13 at 14:26
@Aditya, gathered is from amsmath and it will not let the OP align several where clauses (it was also my first thought) –  daleif Dec 10 '13 at 14:28
Put the two expressions into an \array. You might need to use \displaymode since \array put one into the other mode. –  John Kormylo Dec 10 '13 at 14:46
@GarethA.Lloyd, that is sheer luck that that actually works. –  daleif Dec 10 '13 at 15:08

I'm surprised the simplest solution has not been given, that is, using gathered. The additions with \DeclarePairedDelimiter are only stylistical.

\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{gathered} \modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\ \text{\textbf{where} x={}number of maximal overlapping regions in \modelM} \end{gathered}$$

\end{document}


Multiple clauses can use alignedat that allows for specifying accurately the spacing:

\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{gathered} \modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} \\ \text{\textbf{where} x={}number of maximal overlapping regions in \modelM} \end{gathered}$$
And another
\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{document}


-
did you read the requirement? Several have suggested it, but that would not keep alignment if there are more sets of where clauses –  daleif Dec 10 '13 at 19:05
@daleif Then the clauses can be inserted in an aligned environment; but I don't see them in the OP's example and it's difficult to guess what's a use case. –  egreg Dec 10 '13 at 21:16

Since the first line is actually the equation, I would go this way:

\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}


-

Nasty trick of the day, split is really a two column array type of thing. So why not try \multicolumn. That actually works. Though It is not nice

\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{split} \HideMe{\modelM \mapsto \graphG, x \le \card{\vertices{\graphG}} } \\ \textbf{where}\;x &= \text{number of maximal overlapping regions in \modelM} \end{split}$$

\end{document}


-
I do like the way this keeps the equation numbering over the whole equation. –  Gareth A. Lloyd Dec 10 '13 at 15:24

This is the type of problem tailor made for the stackengine package.

\documentclass{article}
\usepackage{amsmath}
\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\newcommand{\card}[1]{\left|#1\right|}
\newcommand{\vertices}[1]{V\!\left(#1\right)}
\usepackage[usestackEOL]{stackengine}
\stackMath
\begin{document}
$$\stackunder{% \modelM \mapsto \graphG, x \le \card{\vertices{\graphG}}% }{% \textbf{where}\;x = \text{number of maximal overlapping regions in \modelM}% }$$
\end{document}


-

Using aligned inside gathered inside equation

\newcommand{\graphG}{\mathcal{G}}
\newcommand{\modelM}{\mathcal{M}}
\newcommand{\vertices}[1]{V\!\left(#1\right)}
\newcommand{\card}[1]{\left|#1\right|}

\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}


-
Why the inner aligned? –  egreg Dec 10 '13 at 17:20