{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 questions about aligning document elements, use {horizontal-alignment} or {vertical-alignment} instead.

learn more… | top users | synonyms

9
votes
1answer
2k views

Blank lines in align environment

Is there a way to insert a blank line between two equations in align environment? From what I understand a blank line is interpreted as \par and \par is not allowed in align. Can I disable this ...
9
votes
2answers
181 views

How to add equations on top of arrows?

I have the following matrix: $$ \left[ \begin{array}{ccc|c} -4&2&-2&10 \\ 1&0&1&-3 \\ 3&-1&1&-8 \end{array} \right] \sim $$ I want to have something like this: ...
9
votes
1answer
1k views

How to organize labels when there are too many equations?

I'm writing a moderately long text using LaTeX, and it's great to be able to organize chapters, sections, appendices, and everything else almost automatically. One thing has been bothering me though. ...
9
votes
2answers
213 views

how can I align limits at “lim”?

I am trying to align several limit expressions at varying x-values. It seems that align treats the "limit" portion together with its subscript as an entire object, then aligns these limits, which ...
9
votes
1answer
560 views

How do I rescale an align environment on a beamer slide?

I'm trying to resize an equation on a beamer slide to make it larger. However, the usual approach of using \scalebox doesn't seem to work: \begin{frame} \scalebox{2}{ \begin{align} x &= y\\ y ...
9
votes
1answer
907 views

Aligning sub-equations within align

Update: How do I align both the \sum signs and the = signs in the last two equations? I have updated the picture. Original Question: When I use the following code: \begin{equation} \begin{split} ...
9
votes
3answers
14k views

Using \gather and \align together

I'm very picky regarding alignment inside my proofs. What's frustrating me right now is that I have some lines that I want to be center-aligned (using \begin{gather}) and others that I wish to align ...
9
votes
1answer
386 views

In align environment, put word at left margin and still align equations with &?

In an align environment, how can I put a word such as "Now" or "And" at the left margin and still align equations on that line and subsequent lines with &?
9
votes
2answers
3k views

Mix align and enumerate

Is it possible to mix align* and enumerate, for example I want to TeX something like this (item a) and d), b) and e) and c) and f) should be aligned) a) x^2 + y^2 = 1 b) a + b = c c) r-x = y+z d) f ...
9
votes
1answer
312 views

How to split and align equations when they are inside an enumerate environment?

How to make the first line of aligned equations sit in the same baseline as the bullet and make the equation left justified? \documentclass{article} \usepackage{amsmath} \begin{document} ...
9
votes
1answer
7k views

Error in align environment - runaway argument? [duplicate]

Possible Duplicate: Blank lines in align environment \documentclass[12pt,a4paper]{article} \usepackage[version=3]{mhchem} \usepackage{siunitx} \begin{document} \begin{align*} \ce{K_a} ...
9
votes
1answer
1k views

\overbrace split accross multiple lines

Is there a way to split the overbrace so that it appears in two halves over a multi-line equation. Something like /-----------Overbrace Label---- Equation over which to place ...
9
votes
2answers
3k views

How to position text on top of a node?

How to position text on top of a node? \documentclass{report} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \tikzset{every node/.style={rounded corners,minimum height=5cm}} ...
9
votes
1answer
147 views

How can I align the terms of this equation nicely?

I have the following alignat segment: \begin{alignat*}{3} \text{max}_{\underline{\lambda}} \text{min}_{\underline{x}} \quad & \underline{c}^T \underline{x} + \underline{\lambda}^T(\underline{d} ...
9
votes
2answers
360 views

Selective numbering of equations with align

I have an align environment with 5 equations. I want 3 of them numbered, and the other 2 not numbered. I understand that there's other posts on the issue of selective numbering of those equations that ...
9
votes
3answers
254 views

Remember position of equal sign from one align environment to the next

As you know, the align-environment puts all positions marked with & (normally the equals sign) exactly beneath each other. I now want to save the position LaTeX calculates for & and use it ...
9
votes
1answer
6k views

Vertical space before and after align environment

I am wondering if it is possible in LaTeX to generally adjust the spacing before and after math in the align environment from amsmath. From the Mathmode-guide (by Herbert Voss) I gather that ...
9
votes
1answer
9k 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 ...
9
votes
1answer
158 views

Measuring align

From what I read it seems that align environments are processed twice: the first time for measuring, the second time for actual typesetting. My question is whether one can get access to these ...
9
votes
2answers
534 views

amsmath align within list

In the code below, the equation within the itemize environment is too wide for the page, but I don't get an overfull hbox warning (which I find annoying because it's sometimes useful to know exactly ...
8
votes
3answers
23k views

How can I use an align environment flush left?

Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page? MWE: \documentclass{article} ...
8
votes
4answers
246 views

How to align five equations on three lines, e.g., 2-2-1, with the last equation centered?

I'm trying to use the alignat environment to arrange five equations on three lines as follows: two equations on the first line, two equations on the second line (aligned with those of the first ...
8
votes
4answers
829 views

How to align 'implies that' symbols neatly in equation array

The following is an equation array I have: \begin{eqnarray} \Rightarrow\eta_t &=& \eta_x(\omega \eta-(\varphi_x)_s) + (\varphi_y)_s\notag\\ \Rightarrow\eta_t\,(\varphi_y)_s &=& ...
8
votes
3answers
138 views

Aligning elements in set

How can I create a set with aligned elements? Example: I tried using align but it does not align as nicely as in the example. \begin{align*} &P = \set{ &A &\rightarrow &a | ...
8
votes
4answers
177 views

Alignment of table entries: the case of negative numbers

Assume that we have a table that has positive and negative entries. My question is simple: how can we have the number alignment to start from the actual number and not the negative (-) symbol? Let ...
8
votes
4answers
281 views

How can I align at relation symbols within a cases environment?

I have used the following code in LaTeX - \documentclass{article} \usepackage{amssymb,amsmath} \begin{document} \begin{table}[H] \centering \begin{tabular}{c|c} \hline { $X=y+z$} & { ...
8
votes
3answers
12k 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 ...
8
votes
3answers
2k views

How to align piecewise functions?

I have two piecewise functions defined like this: \begin{align*} \left\{ \begin{array}{ll} i = x^2 + y^2 \\ j = a^2 + b^2 \\ \end{array} \right. \\ \left\{ ...
8
votes
2answers
136 views

DeclareMathOperator and align environment

Minimal working example: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} &s + t &\text{foo}\\ &\sin x &\text{bar} \end{align} ...
8
votes
3answers
199 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
111 views

How to align only some equations in an align environment?

Here's what I got: \begin{align*} P[E_{m}] &= P[m] + P[2m] + P[3m] + \dots \\ &= \frac{1}{\varsigma(s)} \langle m^{-s} + (2m)^{-s} + (3m)^{-s} + \dots \rangle \\ &= \frac{1}{\varsigma(s)} ...
8
votes
2answers
394 views

Aberrant vertical spacing with {align} and friends?

Consider documents with the following preamble: \documentclass[12pt]{article} \usepackage{amsmath} Question #1. Why do we get bad alignment with the following code? \noindent ...
8
votes
1answer
394 views

How to force equation to be closer to the sum operator?

I would like to know if it is possible to force the equation to be closer to the operation sum? When there are a lot of subscript under the sum operator, it tends to pouch the equation to the right, ...
8
votes
3answers
244 views

Multiple alignments

If I have a string of equations whose equal signs are aligned and one of the equations is too long and needs to span multiple lines, how do I create a second alignment. For instance, in the following ...
8
votes
3answers
8k views

AMS Split inside AMS Align

I'd like to have multiple lines inside a single align cell like so: \begin{alignat*}{1} = & \begin{split}x+\\ y\end{split} \end{alignat*} But I get an error like: \end{alignat*} \An extra ...
8
votes
2answers
200 views

Errors when trying to define a custom align environment

I'm currently trying to create a custom environment with its own counter. \documentclass[a4paper,11pt]{report} \usepackage[fleqn]{amsmath} \newcounter{grammarcounter} \newenvironment{grammar}{ ...
8
votes
2answers
198 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
2answers
217 views

How to align multiple symbols for a long equation?

\documentclass[11pt]{article} \usepackage{xfrac, array, tabu, multirow, graphicx, setspace, dcolumn, tikz} \usepackage[fleqn]{mathtools} %the argument for d specifies the maximum number of decimal ...
8
votes
2answers
3k 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
226 views

What's the right space to right the alignment of a right aligned align environment?

As Hilbert would have put it, had he lived in the TeX-era: No one shall expel us from the Paradise that AMS has created. and one aspect of that paradise is release from the tyranny of eqnarray ...
8
votes
1answer
137 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
3answers
230 views

Align text equation and math equation

How do align an textual equation with the mathematical expression under it? Some text before Sum = Summand + Summand * Factor of Eternity x = a + b * ...
8
votes
2answers
88 views

Is there a way to set character align in the preamble

So I haven't been able to find an answer to this and sorry if it's actually simple and I'm kind of an idiot for not finding a solution but I can't find anything in any of the wiki's for the align ...
8
votes
2answers
74 views

Horizontal alignment across nested aligned

Is there a way to left align the first 2 rows with the last one? \documentclass{article} \usepackage{amsmath} \begin{equation*} \left\{{\begin{aligned} &\left.{\begin{aligned} &A+B=X\\ ...
8
votes
2answers
5k views

Phantom and Align Environment

Is there any way to 'phantom' text within the align environment? I have the following code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \phantom { a & = b \\ ...
8
votes
1answer
142 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. ...
8
votes
2answers
1k views

Padded Left Align for Table Columns

I have a table whose column headings (centre aligned with \multicolumn{1}{c}{Foobar here}) are wider than the left-aligned data. This looks somewhat odd, as there are large right-margins in each ...
8
votes
1answer
6k views

Multiple labels in aligned environment

I would like to format an optimization problem by \documentclass{article} \usepackage{amsmath} \begin{document} We want to label each line separately. The inserted text and formulas have to be ...
8
votes
2answers
2k views

How to reduce hspace between columns in align environment

With the following MWE, I have 2 columns: \documentclass[12pt, a4paper]{scrartcl} \usepackage{amsmath} \begin{document} \begin{align*} 4 &= 4 && \text{yes}\\ 0 &= 0 && ...
8
votes
1answer
2k views

Spurious space above align environment at top of page/minipage

It seems that the align environment adds additional vertical space if it starts at the top of a page or minipage. Below are two pages, and two minipages (on Page 1), where the first page/minipage has ...