{align} is an environment provided by math packages that permits multiple related equations to be aligned at a common reference point, usually a sign of relation. For general question about aligning document elements, use {horizontal-alignment} or {vertical-alignment} instead.

learn more… | top users | synonyms

9
votes
1answer
1k views

Split expressions with parentheses in align environment

I am writing down a rather long expression, which has to be splitted in a align environment. The thing is that this expression has parentheses which have to be splitted too. I don't want to use ...
9
votes
5answers
1k views

How to subtract two equations?

I am trying to subtract one equation from another but I can't get it to display the way that I want. This is what I have right now. \begin{align*} &y&=2x+5\\ -&&\\ ...
8
votes
3answers
166 views

Align matrices problem

I have an equation of matrices and I want to align the dimensions of the matrices below the equation of matrices. However, I produce something very ugly. Can someone advise how to make it look better ...
8
votes
2answers
98 views

Glossaries in Align Environment

Using glossaries commands in align environment seems to screw up the tag alignment. How can I use gls{...} commands in align environments without the tag position being altered? Consider the ...
8
votes
1answer
122 views

How to avoid this undesired horizontal space?

In the following output, why do I get the undesired space before the (, and how to get rid of it globally? Here is my code: \documentclass{article} \usepackage{amsmath} \begin{document} ...
8
votes
1answer
7k views

Aligning the right parts in multiple \begin{cases}

Is there an intelligent way to left-align the parts right of & of the two cases environments shown below (if x >= 0, otherwise, if y < 0, otherwise). I wonder if there is a better way than ...
7
votes
3answers
367 views

Aligning different parts of an equation with certain spots in the line above

I am trying to get certain parts in the second line of an equation to line up with certain parts in the first line. For example, X=AAA+BBB+CCC = a + b + c where here I am wanting the lower-case ...
7
votes
2answers
2k views

What's the difference between align and align*?

After some brief searching I can't find the difference between align and align*. Google summarily ignoring the * is making it harder I think. Can you tell me the difference between these two? ...
6
votes
2answers
461 views

Why does aligning equations not work here?

\documentclass{minimal} \usepackage{amsmath} \newcommand*{\op}[1]{\operatorname{#1}} \begin{document} \begin{align*} \noalign{$\quad \op{f} * \op{r} = \op{c}_{\op{f}*\op{r}} (x_1,...,x_k) = ...
6
votes
3answers
280 views

How can I align two split environments at the equal signs?

\documentclass{scrartcl} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{amsmath, amsthm, amssymb} \usepackage{mathtools} \begin{document} ...
5
votes
2answers
282 views

Equation tags for parts of alignments

Consider the following example: \documentclass{article} \usepackage{amsmath} \begin{document} \[ 1+2=3 \implies \left\{ \begin{aligned} &a+b=c, \\ &x=y+z. ...
4
votes
2answers
324 views

proof format 2 columns [duplicate]

Possible Duplicate: How to correctly format (and align) a LaTeX proof? In my proofs I would like to have justifications of each step to the side of the numerical manipulation. For instance ...
4
votes
3answers
267 views

Alignment in multiple locations of a single equation based on first line

I want to align a multi-line equation so that it basically looks like this: a = (b + c + d + e) f = g The requirements of this alignment are: The equal signs should be aligned. The beginning ...
3
votes
2answers
3k views

Align multiline equation with expression after equal sign

I am trying to align a multiline equation using array within the equation but it turns out it doesn't do very well. The code I am using is as follows: \begin{equation}\ \begin{array}{lcl} ...
3
votes
1answer
1k views

How can I create a multi line split inside of a radical inside of an array environment?

I have an align like this: \begin{align*} \sigma &= \sqrt{\sum_x \left[ (x-\mu_x)^2\mathbf{f}(x) \right] } = \sqrt{\frac{1}{10}\sum_x (x-\mu_x)^2 } \\ &= \sqrt{\frac{1}{10}( (0-.45)^2 + ...
2
votes
1answer
93 views

Equation Number Positioning in Align Environment

How do I control the space between the equation number and the right margin in the align environment?
0
votes
0answers
33 views

Multi-line brackets in align [duplicate]

Possible Duplicate: How to make \left, \right pairs of delimiter work over multiple lines? The following code (from the official User's Guide for the amsmath Package) works: ...
11
votes
2answers
650 views

Problems with alignment of sequences

I want to align two sequences: a_1, b_1, c_1, d_1, e_1 etc. a_2, b_2, c_2, d_2, e_2 etc. here's what I wrote \begin{align} \notag &a_1,\ &b_1,\ &c_1,\ &d_1,\ &e_1\ ...
10
votes
3answers
3k views

Defining a shorthand for amsmath's align environment (as commands)

I'd like to define a shorthand command for \begin{align*} and \end{align*}. When I write \newcommand{\ba}{\begin{align*}} it works fine. But when I write \newcommand{\ea}{\end{align*}} ...
8
votes
1answer
108 views

Underbrace multiple math lines

I have to underbrace multiple lines in an align-environment with one brace. Meaning something like \begin{align*} A ={}& B + \underbracemultiline{C + D + E \\ & + F + G \\ & ...
8
votes
2answers
1k views

Label one line in a begin align*

I have the following block of TeX: \begin{align*} m_n^+ = \dfrac{1}{n}\sum\limits_{k=N+1}^{n} =& \dfrac{1}{n}\sum\limits_{k=N+1}^{n}\left(a_k-L+L\right) \\ ...
8
votes
1answer
136 views

Why does the `&` reset grouping?

In this answer, I used \tikzmark to mark the extent of a typeset piece of text, so I could draw changebars next to it. But it initially seemed that the changebars "disappear" with math-mode content. ...
7
votes
1answer
92 views

Formula label outside of formula

I want to label a block of equations like that: The "AB" should not inflict the central alignment of the formula. I saw it a lot, but do not succeed on my own. Do I need to build boxes? I used the ...
7
votes
2answers
252 views

How to stop fractions in display equations from running into each other?

Is there some standard way to create multiple display equations like the following without having to use: \renewcommand*{\arraystretch}{2} (so that the two rows in the second equation don't get ...
7
votes
2answers
10k views

Big \sum instead of small \sum in array environment

\begin{align*} \begin{array}{c} \min \: A = \min \: \sum_{i\in B} C_i \\ \\ \min \: D = \min \: \sum_{i\in B} \pi_i \cdot F_i \end{array} \end{align*} See http://i.stack.imgur.com/TFIfY.png for an ...
6
votes
1answer
81 views

Long formula in align environment

Usually, if I have a very long formula, I will use two lines in the align environment and \qquad to space things out nicely. For example, \begin{align*} % First line \rho\left(\frac{\partial ...
6
votes
2answers
680 views

How to edit the length of a color box?

I've typed my Resume and Im using a color box, with a line underneath it. However the grey colored box doesn't reach the full length of the page width. \documentclass[letterpaper,11pt]{article} ...
6
votes
2answers
956 views

Underlining an equation in an align block

I'm trying to set up a system of equations and want to underline the last equation, but can't figure it out. Here's what I have: \begin{alignat*}{4} &F_n &- mg &- F_a\sin 32^\circ &= ...
5
votes
1answer
297 views

\marginpar and \begin{align}

I want to use \marginpar directly beside a formula within a \begin{align} statement. I tried: \begin{align} E^2 \end{align} \marginpar{Not correct} but the 'Not correct' statement is written ...
5
votes
1answer
425 views

Automatic linebreak in align environment in macros

I have given a selfdefined command like \newcommand{\AND}[2]{\left(#1 \vee #2 \right)} which makes sure that I always give the correct number of parameters to my formula and which handles the ...
5
votes
1answer
2k views

Automatic equation numbering in LyX

I would like to create automatic numbering of equations in LyX. when I entered \renewcommand\[{\begin{equation}} \renewcommand\]{\end{equation}} for the "equation" environment it worked. However, ...
5
votes
1answer
1k views

Why does this error keep popping up even though I clearly fixed it?

This is the code I have: \begin{align} \vec{l} \cdot \vec{n} & = \left \langle 1,2,3 \right \rangle$ \cdot \left \langle 3,-3,1 \right \rangle \\ ...
5
votes
3answers
252 views

About alignment of mathematics formulas

How can I implement the alignment like in the following image? Because the usual \begin{align*} and \end{align*} command can not work, so I hope you can help me! Thanks! Wait for your elegant ...
5
votes
2answers
301 views

Size of the delimiters when the equation is split in an align environment.

The following code does not work: \begin{align*} \left \| x \mapsto \sup_{(y, t) \in \Gamma_x^{(A, a)}(\gamma)} & \int_{\R^d} M_{t^2}(y, z) 1_{N_\tau^c}(y, z) |f(z)| \, \d z \right ...
4
votes
2answers
794 views

Equation: How to create nested/multiple cases in LaTeX to align the qualifiers

I am having trouble with a particular equation as the cases are nested within a case. It would also be cool if I could align the qualifiers. I tried to post an image of the equation but I could not ...
4
votes
2answers
165 views

How to align equation items below their =

How is it possible to sort equations align with their = like this: a*b*c = d*e*f g*h = i*j k = l*m*n o*p*q = r I've seen it before but I don't know how to find that!
4
votes
1answer
600 views

How can I use align environment in conjuction with iopart.cls class?

I would like to use align environment over eqnarray for typesetting my equations. However the publisher forces to use the iopart.cls as the article class file which, as they mentioned, is incompatible ...
4
votes
2answers
310 views

Using aligned and align without amsmath

I am currently working on a proceedings paper, and have realised after finishing it that only specific packages are permitted - one of which is not amsmath. As a result, many of the nice equations ...
4
votes
1answer
424 views

Aligning equations with align*

I wanted to align a set of equations to left. I found on the Internet that you can do it easily with align* environment. I found it here: http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics So ...
4
votes
3answers
288 views

How to right-side annotate a bracketed-together set of items in cases environment?

How to right-side annotate a bracketed-together set of items in the align environment, cases sub-environment? E.g. how to put an annotation such as "(Fermat)" where the following code would put a ...
4
votes
1answer
924 views

I used eqnarray ignorantly and now must change all to align.. any solutions?

Other than manually going over all the dozen plus instances where I ignorantly used eqnarray must all be changed to align. I first tried doing a finad replace all and replaced align, and then, for ...
3
votes
1answer
205 views

Automatic arrangement of equations with comments

This question led to a new package: conteq I am writing a paper with multiple chains of equations or inequalities, with optional explanations. Depending on the size of the equations, I use one ...
3
votes
1answer
769 views

Spacing between equation and text inconsistent due to large equations

I've read through answers to similar question but I still have the same problem. Essentially, I have some large equations and they are in the form \documentclass{article} \usepackage{amsmath} ...
3
votes
1answer
290 views

Align inside align

I have a list of equations with annotations like the one below: \documentclass{scrartcl} \usepackage{amsmath} \begin{document} \begin{align*} aaaa &= 1 &&\text{for $X$} \\ bbbb ...
3
votes
1answer
219 views

How to position “=” mid-line inside a '\raisebox' and then `align` using `&=` with expression below?

In order to get a full stop at the bottom, rather than mid-line, after an aligned matrix expression, I have raised the expression using a raisebox, and adjusted space using `vspace'. This is now ...
3
votes
2answers
477 views

Adjust vspace between multiple align environments

I am using some independant align environments directly one after the other one and it produces some nasty space between them. Is there any workaround to shrink the size of the space a little bit? ...
3
votes
2answers
339 views

Macro to allow for alignment points within its argument

I would like to have a macro that allows for alignment points inside it. As a specific example, I would like to be able to say: \begin{align*} a &= b\\ \bracr{c &= d} \end{align*} ...
2
votes
1answer
93 views

Table Vertical Alignment not functioning

So I'm creating some tables and trying to use the array package to vertically align the text in some of my columns. Unfortunately whether I use p{xcm}, m{xcm} or d{xcm} the column is always aligned to ...
2
votes
2answers
118 views

mathtools: tagging with words and a number in align

How does one tag an equation with both words and numbers? \documentclass{article} \usepackage{mathtools} \newenvironment{Dequation} {% ...
2
votes
2answers
147 views

Ignoring alignment for certain lines in an alignat environment

I am having trouble typesetting an optimization problem, and would like to know how to ignore the alignment for a certain line in an alignat environment. I've currently typeset the optimization ...