{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

6
votes
3answers
246 views

How to align 'parts' of these equations?

I have a set of equations given by the following code: \begin{equation} \label{eqn:eraserStart} \max \, d \end{equation} \begin{equation} a_t \in \{0,1\} \, \forall t \in T \end{equation} \...
11
votes
3answers
19k views

aligned environment of amsmath vs array environment

Today I found out the existence of the aligned environment of the amsmath package. However, I can't see the advantage of using it instead of the array environment from the example provided in amsldoc....
5
votes
3answers
173 views

Aligning equal signs such that the line is already aligned

I have an align question. Essentially the following code: \begin{align} \nonumber & \exp\left(-\sum_{t=1}^T\lambda_t f_t(x_1)\right)\exp(-\mu-1) + \exp\left(-\sum_{t=1}^T\lambda_t f_t(x_2)\...
0
votes
0answers
53 views

Is there an opposite to \nonumber? [duplicate]

Usually I set equations using the align environment together with \nonumber for those few lines that shall not have a number, or the align* environment if no equation shall be numbered. But what if ...
2
votes
1answer
130 views

TikZ object misaligned with main document: slightly shifted to the right

The TikZ picture is not aligned with the main content of the document. It slightly shifts to the right. Notice how the words go outside the frame on the right side. Any hints on how to correct this ...
3
votes
2answers
1k views

Unnumbered line inside align

Basically, I have two equations that I wanted to use align to number, but I also wanted to put the word 'and' in between the lines. Here's what I have so far \begin{document} \usepackage{amsmath} \...
3
votes
1answer
368 views

Conflict between \hline and arydshln in aligned environment?

I'm using the following code: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} % \usepackage{arydshln} %code doesn't compile anymore with this package \begin{document} \begin{...
4
votes
1answer
84 views

Specify number of columns in brqalign

Some time ago David Carlisle wrote an awesome brqalign function in this answer: http://tex.stackexchange.com/a/51543/4011. See the cited code below. How to modify the brqalign environment such that ...
11
votes
5answers
8k views

How to align the equal signs in this equation such that the first line and last 2 lines align

so I have an equation below. My latex code for it is: \begin{align*} CoJPoD_{ \{I_1, \cdots, I_{k-1}, I_{k+1}, \cdots, I_{n}\} | I_{k} } = CoJPoD_{ \{system \backslash I_{k}\} | I_k} \\ = P\...
1
vote
1answer
392 views

tabbing numbering and alignat numbering

Is there a way for the tabbing environment \begin{tabbing} to number equations and sync up with the align or alignat environments? If I use align or alignat, each successive use is numbered ...
2
votes
2answers
416 views

Split equation with each element being exactly below each other

I have an estimated equation with both coefficients and t-statistics. It's a multiline equation and would like to put the t-statistics right below the coefficient estimates Currently my code looks ...
7
votes
2answers
4k views

Equations and defining equation variables

I have a main equation that should be numbered and now I want to define the variables of the equations which may contain another set of equations. For example please have a look; code: \begin{align} ...
6
votes
3answers
8k views

\underbrace and align environment

I want to typeset a proof and want to emphasize what I do in each step e.g. by underbracing an equal-sign when I substitute a variable. In addition I also want to align equal-signs in every line. ...
5
votes
3answers
4k views

Left-align math with fleqn inside split environment

Below, how would I move the first math-line left so that a^2 left-aligns with where? \documentclass{article} \usepackage[fleqn]{amsmath} \begin{document} \setlength{\parindent}{0pt} Some text \begin{...
10
votes
2answers
3k views

How to format Maxwell equations?

Is there a variant of split environment from amsmath package which would allow for two aligned equations in a row? I want to format two pairs of Maxwell equations in two rows and put single equation ...
6
votes
4answers
194 views

How can I nicely align a single split equation?

I'd like to align my equation to that it (and its label) fit on three lines. MWE \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{xfrac} \usepackage{transparent} \...
2
votes
1answer
313 views

Which one is recommended to split, continue and align a long equation?

In my investigation, the outputs are identical as follows. Version 1: Using aligned. \begin{align*} \framebox[6cm]{Top LHS}\\ \framebox[5cm]{Middle LHS}\\ \framebox[4cm]{Bottom LHS} &= \! ...
4
votes
2answers
350 views

How to create a beautifully aligned solution for exercises?

Basically, I'm writing solution for the exercises on the textbook. And I want something like this: As you can see, sub-problems are aligned after the problem number and the formulas are aligned ...
10
votes
1answer
536 views

Comment an equation without creating extra space

I try to make a comment on the right (or left) of one line of proof. But the align* environment automatically move the whole equations to the left to leave space for the comment. But I still want the ...
0
votes
1answer
752 views

Issues aligning equations

I thought I was doing everything correctly, but clearly not. I want my equations (all whether I use \begin{flalign} or \begin{equation}) to be aligned each other (have the same indent), and then when ...
3
votes
1answer
257 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 of ...
4
votes
1answer
2k views

Remove unnecessary horizontal space from amsmath align between two &

How do you remove unnecessary horizontal space in an amsmath align environment between two &? Consider: \documentclass{article} \usepackage{amsmath} \begin{document} Version 1: \begin{align*} ...
3
votes
1answer
254 views

Tikz Scaling and Positioning

I cannot scale the first picture. scale=0.6 does not work. Also I cannot vertically align the picture. I want top of text and top of figure are same. See figures in the following examples. \...
3
votes
1answer
286 views

Overset placement is uneven

I'm using this code to show that one element of the equation is greater than zero and the second element is less than zero. \begin{align} \overset{+}{\pi_{i}} + \overset{-}{w_{g}(S)} > 0 \end{...
2
votes
1answer
82 views

Fixing alignment with the rest of the text

The image included above is what I want to replicate - I want the name to appear on the top left, and the address/email-id to appear on the top right, and I want both of them to be aligned with the ...
4
votes
2answers
420 views

Aligning tikz picture within text

I want to align my tikz within a text. A sample can be seen at the second picture in the following link: Image courtesy from http://www.echoecho.com/htmlimages08.htm This is my trial: \...
12
votes
2answers
276 views

Align*, & and \futurelet

can somebody explain futurelet within align-environments? Example: The command \A should give an "A" if the next char is a {, a "B" if it is & and "C" in any other case. \gdef\A{\futurelet\...
7
votes
1answer
386 views

Breaking lines in equations

I have an equation that is too long. It gets cut off, so I have tried to modify it with the split environment inside an equation environment: \begin{equation} \begin{split} & I_{ribbon} = \frac{1}...
8
votes
1answer
290 views

Align successive equations through the entire document

I am fairly new to TeX and need to create my math assignment with TeX. I have succeeded aligning all my calculations with the use of \begin{align*} and \intertext{}, however in my document i have ...
2
votes
1answer
91 views

Aligning brackets [duplicate]

Hi is there anyway to get the two left [ brackets on the first and second lines to align? \begin{align} &\quad[v^{*}a^{-} +va^{\dagger}_{-k}]e^{+ik_{z}\centerdot z}=[u^{*}b^{-} +ub^{\dagger}_{-k}]...
6
votes
2answers
1k views

Align environment inside TikZ

I'm new to TikZ, and I'm trying to use the align enviroment to align some text then draw something on it using some TikZ lines. But the problem that pdfLaTeX is generating an error whenever I try to ...
2
votes
2answers
257 views

The multi-line equation with explanation is too wide

The original question provides a good answer for how to add explanations to the multi-line equations. However, my problem is that the explanations have too long space to the corresponding equations, ...
3
votes
1answer
680 views

align environment has too much white space

How can I let the following code look good ? \begin{align*} &\text{Als} &&a,b \in H\\ &\Rightarrow &&a,b\in H_1 \land a,b \in H_2 &&\text{Definitie van doorsnede}\\ ...
0
votes
1answer
67 views

Centering a group of equations and text both which is used in \begin{align*}…\end{align*}

Say I am trying to center a group of equations, written in separate lines, with equality sign aligned one below another, which are defined by: $f(r)+1=g(r^2)+1=O(r)$ as $r\to 1$ by first using the ...
3
votes
1answer
1k 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} \begin{...
1
vote
0answers
96 views

Problem using align* using [ ] and ( ) [closed]

i'm having trouble with align* when i'm using any type of parenthesis. Here is the code: \begin{align*} V_o^\prime &= A(V_2^+ -V_2^-) \\ &= A\left[0-\left(R_1\frac{...
7
votes
1answer
76 views

How many times is “align” processed?

Consider the following MWE which writes the word "Cat" to a file. \documentclass{article} \usepackage{amsmath} \begin{document} \newwrite\datei \immediate\openout\datei=Beispiel.txt \begin{align*} a+...
2
votes
2answers
500 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 ...
3
votes
1answer
164 views

Aligning parts of equations

So this is a continuation of my previous question but I didn't know if I should edit that post and ask a new question or just post a new question entirely. Anyway, I have this bit of latex: \begin{...
1
vote
1answer
131 views

Align a wall of equations

I have a wall of equations in the format: y = x^2 = 9 So basically, it's the variable part, the equation part and the answer part. I want these to be in three columns that are all aligned. So my wall ...
15
votes
2answers
43k 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} \mathcal{L}^...
8
votes
1answer
219 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 \\ & +...
2
votes
2answers
192 views

Formula with text, good design?

I have the following text in my align environment, but it does not look good. So what should I change in order to get a better design/output? \documentclass[a4paper, 12pt, ...
0
votes
0answers
35 views

! Improper \halign inside $$'s [duplicate]

I know this is not a minimal example, but I have to have this much code, in order to create my error. I had this error already several times and I cannot get rid of it?! I don't know where the problem ...
5
votes
1answer
681 views

Suppressing line break in enumerate environment

I'm using the gather environment within the enumerate environment. After creating an item/before entering the gather environment, LaTeX adds a linebreak which I don't like. \begin{enumerate}[(a)] \...
1
vote
0answers
42 views

split problem between \left( and \right) [duplicate]

I have this equation, and strangely enough I can not split the equation from somewhere in between \left( and \right) If I use the \\ to split the equation after \right) then it works, I did not really ...
11
votes
1answer
15k 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 ...
0
votes
0answers
31 views

Global label in a LaTeX “align” [duplicate]

I use \begin{align} \label{blah} ... \end{align} in order to do equations of multiple lines. Unfortunately the equation number (coming from label{blah}) is not centered vertically in the middle of ...
5
votes
3answers
396 views

Aligning equations in multiple places

I have an equation environment where most equation lines start with an arrow, which I have aligned in the align* environment, using &. The second line in the example below is too long for the page ...
10
votes
4answers
3k views

Centering equations within alignat command

I want to centre the formula inside the equals. So far I have \begin{alignat*}{2} v_2(16)&=\frac{2}{5}[v_3(32)+v_3(8)] &&= 0, \\ v_2(4)&=\frac{2}{5}[v_3(8)+v_3(2)] &&= 1....