4
$$
A = \{ x_{1}y_{1}z_{1}...x_{k}y_{k}z_{k} : x_{i}, y_{i}, z_{i} \in \{0, 1\}, k \geq 1, \text{ and } x < y < z \text{ where } x = x_{1}...x_{k},
y = y_{1}...y_{k}, \text{ and } z = z_{1}...z_{k}\}
$$

I want this to continue to a new line, but also indented past the A. I can't seem to figure it out. I tried to do this with align, but it's not working the way i was expecting.

enter image description here

3 Answers 3

4

You can do it with align*, using a & for determining the alignment position:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
A = \{ &x_{1}y_{1}z_{1}...x_{k}y_{k}z_{k} : x_{i}, y_{i}, z_{i} \in \{0, 1\},
      k \geq 1, \text{ and } x < y < z \text{ where } x = x_{1}...x_{k},\\
  &y = y_{1}...y_{k}, \text{ and } z = z_{1}...z_{k}\}
\end{align*}
\end{document}

Btw. also for single unnumbered equations you should not use $$, see: Why is \[ ... \] preferable to $$?

1
  • sigh, i did that, but it just wasn't going for me. I don't know what's different, but thanks.
    – Matt
    Sep 27, 2011 at 6:58
2

A slightly different answer to what @Stefan proposed, this time using some \phantoms to position the text correctly:

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
  A &= \big\{ x_1y_1z_1\cdots x_ky_kz_k : x_i,y_i,z_i\in\{0,1\}, \\
    &\phantom{{}= \big\{} k\geq 1, \text{ and } x<y<z \text{ where } x=x_1,\dotsc,x_k, \\
    &\phantom{{}= \big\{} y=y_1,\dotsc,y_k, \text{ and } z=z_1,\dotsc,z_k\big\}
\end{align*}
\end{document}

Spacing using align and phantom

I've spread the expression across 3 lines, just for illustration. Also note that the use of $$ to start/end display math mode is not encouraged. See the l2tabu documentation.

2
  • One could avoid the two \phantom constructs by moving the & on line one to just before the first x, right?
    – Mico
    Sep 27, 2011 at 10:18
  • @Mico: Yes, and that's what was done in the other answers. I tried something different so as to not duplicate an existing approach.
    – Werner
    Sep 27, 2011 at 14:15
2

If you want to split an equation in different lines you can use split environment. You also use & to fix aligning point. This environment is used inside an equation one and not alone as align suggested by Stefan.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{split}
A = \{ & x_{1}y_{1}z_{1}...x_{k}y_{k}z_{k} : x_{i}, y_{i}, z_{i} \in \{0, 1\}, k \geq  1, \text{ and } x < y < z \text{ where } x = x_{1}...x_{k}, \\
& y = y_{1}...y_{k}, \text{ and } z = z_{1}...z_{k}\}
\end{split}
\]
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .