{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
5answers
4k 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\\ -&&\\ &y&=...
8
votes
2answers
696 views

Equation number with an apostrophe

I am writing two equations in an align environment: \begin{align} x^2+y^2=z^2, \\ x^2=7, \end{align} I would like the first equation to be labelled with e.g. (1.1) and the second equation to be ...
7
votes
3answers
2k views

Align in Substack

\sum_{\substack{n=1\\n\neq i}}^N Using \substack to add multiple lines as subscripts of a sum does not make them aligned on the equal / not equal symbol. I found some answers to this problem, like ...
6
votes
1answer
3k views

Adding pictures to moderncv

I want to add my institution logos to my CV but unfortunately they don't appear in right place. How should I edit the code to make the picture appear right above the city without making the "...
6
votes
2answers
5k views

Break Large Equation Between Parenthesis Using Multline

I have a very large equation that I need to write in multiple lines, but multiline is not working between parenthesis. This is my LaTeX code: \begin{multline} e^{-y \lambda_n} \left( -\frac{...
5
votes
1answer
6k views

How can I use an align environment flush right?

Is there an option analogous within the align environment to the left align for right align, i.e. fralign. MWE: \documentclass{article} \usepackage[fleqn]{amsmath} % Instead have [freqn]. %\...
4
votes
1answer
75 views

“dec sep align” from pgfplot does not align with the header properly

In my ME below, I am having a problem to get the header align properly with the text. I have looked at the documentation for the pgfplotstable, also from other posts from this forum like that posted ...
3
votes
2answers
1k views

Align equations inside tabular

How can I align equations inside tabular? I want to place few lines of equation by side of the picture. But it turns out that I cannot use \& in order to shift equals signs to be one under another....
2
votes
3answers
12k views

how to insert multi line equation in the tabular environment?

How can insert multi line equation in the tabular environment? For example see the following code that can show my request. \begin{tabular}{rrr} &a &b\\ &u=\begin{cases} 0;& ...
-1
votes
2answers
109 views

Confusing missing $ [closed]

Can anyone help with this. I'm not sure at all what I'm doing wrong but i get an error Missing $ inserted. $ on the 2nd line with c)\ The rest of the text works fine and there are ...
11
votes
3answers
5k views

Defining a command for amsmath's align environment

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*}} ...
10
votes
1answer
13k views

aligning split equation

I am new to Latex ;) I split my equation like this: \begin{equation} \begin{split} \tilde{m}=P\tilde{M} \\ \quad = K(R^1R^2R^3t) \begin{pmatrix} X \\ Y \\ 0 \\ 1 \end{pmatrix} \\ \quad= K(...
8
votes
2answers
641 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 $-3x$\\[-\...
8
votes
2answers
3k 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 &= ...
8
votes
2answers
316 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 ...
7
votes
3answers
494 views

How to break long equations while keeping alignment?

I have the following long equations: \documentclass[]{article} \usepackage{amsmath} \begin{document} \begin{displaymath} \begin{aligned} (\chi_1|\chi_1) &=\frac{1}{24}\left(\left(\chi_1(1)\right)...
7
votes
3answers
318 views

Center a column in align

I have the following type of code in my document: \begin{align*} (-m)+m & \stackrel{\mathrm{Ax 1.1 (i)}}{=} m+(-m)\\ &\stackrel{\mathrm{Ax 1.4}}{=} 0 \\ I want to align on the = ...
6
votes
1answer
165 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 u_{r}}{\...
6
votes
2answers
172 views

Align images with text without using tables

Problem: I have searched how you can align text without the use of tables using LaTex. What I am after is to align images after each other on one side and text to align to respective image on the ...
6
votes
2answers
233 views

What is the difference between align and equation environment when I only want to display one line of equation?

I am typesetting a physics document, and sometimes I need to type equations of several lines while in most cases I only need to type one-line formula. So is it OK if I always use align environment ...
5
votes
1answer
385 views

Aligning a split up equation not at equal sign

I currently have the following equation: \begin{align} \begin{split} \left| \Psi \left( t \right) \right\rangle _{I}^{3}&=-\frac{1}{{{\hbar}^{2}}}\int_{0}^{t}{\hat{H}_{1}^{I}\left( t' \right)\,}\...
5
votes
2answers
105 views

Environment aligned doesn't output first part in bracket

\begin{equation} \begin{aligned} [c\mathbf{v}+c'\mathbf{v}',\mathbf{w}]=&c[\mathbf{v},\mathbf{w}]+c'[\mathbf{v}',\mathbf{w}],\\ [\mathbf{v},c\mathbf{w}+c'\mathbf{w}']=&c[\...
4
votes
1answer
256 views

Latest xparse/amsmath update doesn't work well in align

The following minimal example doesn't compile when the optional argument to \macro is used: \documentclass{article} \usepackage{xparse,amsmath} \NewDocumentCommand{\macro}{o}{A\IfValueT{#1}{(#1)}}% ...
4
votes
2answers
4k views

How to box two lines inside align*

I asked a similar question today except it was targeted at one particular line inside the align* environment. Now I want to enclose two lines. The failed attempt below makes my intention clear: \...
3
votes
2answers
3k views

AMS align: Left aligned text/math plus multicolumn align

This question is basically a combination of two previous posts: Adding left aligned text to an equation. and AMS align / Align multiple “=”, too much space (the latter being my own question). What I ...
3
votes
1answer
471 views

Align all equal signs in the document

Is there a way to align all the equal signs in all equations all over the document? I write a theses (scrbook) and like all equal signs to line up. At least in a chapter if not possible for the whole ...
3
votes
1answer
485 views

In Lyx, align text inside a float caption

I'm trying to align a legend inside a table caption, so that the colons are vertically aligned. I can do it with the align ambient outside of the caption, but if I use the same code inside the caption ...
3
votes
1answer
240 views

Reason of existense of the extra space in align environment and removal of it between two align environments

This is a follow-up question regarding the extra vertical space in amsmath's align environment. Why when in use align uses so much vertical space in contrast with other environments like for example ...
2
votes
2answers
9k views

How can I use multline within an align environment?

I've been looking around and I know that there are possibilities to mimic the multline environment within the gather or align environments, or by using multlined but not in a way that I like, I think. ...
2
votes
1answer
714 views

siunitx: bold single numeric cells + mathspec

I need to bold and align numeric values in a table while using both mathspec and siunitx packages. I've looked at siunitx: Bold single numeric cells for bold and alignment in a tabular environment ...
2
votes
1answer
187 views

$$, \[ \] and equation environment alignment

I'm using scrreprt class and I'm having troubles with different behavior of $$ and \[ \]-written equations and equation environment. The problem is that alignment is not the same: $$ equations are ...
1
vote
1answer
102 views

Aligning three figures next to each other based on text width

Problem: I am trying to align three figures next to each other with text centered to each figure. This is going well until the box for the third box does not adjust after the text width. Minimal ...
1
vote
1answer
51 views

Errors by using align

I have the following code, which generates 4 errors (all of the type "bad math environment delimeter") but I don't know why. \listfiles \documentclass[oneside,12pt]{scrartcl} \usepackage[ngerman]{...
1
vote
1answer
607 views

Two columns of equations, aligned and just one number per column

I'm writing a two-column document, and I want to display two sets of large equations floating at the top. Each equation set should be aligned within the same column, and only the two top equations ...
1
vote
1answer
114 views

Is it possible to break up an align environment and keep the tab positions? [duplicate]

I'd like to take notes for a math class such that I can typeset a series of equations with the \align environment and make some text notes in between some of the lines. As far as I can tell, though... ...
0
votes
1answer
242 views

center align equation in ‎\documentclass[11pt,twoside,fleqn]{book}‎

I used the ‎\documentclass[11pt,twoside,fleqn]{book}‎ for set formulas left, but I want to put formulas to center in some cases like original type without [fleqn]. What command do I use? %%%%%%%%%%%%%%...
0
votes
1answer
217 views

Error message because of eqnarray, footnotes, tables or caption?

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 ...
14
votes
2answers
16k views

How to put the QED symbol of a proof at the right place inside align?

When a proof ends with a formula in equation or equation* environment, putting \qedhere after the equation would cause the QED symbol to appear in the right place. I.e. at the end of the line in which ...
13
votes
3answers
12k views

columns/alignment with itemize

I'm trying to make alignment points in a list environment. The following code gives me an error, but it almost compiles to what I want, just missing the bullet points. I must be misunderstanding ...
12
votes
4answers
7k views

Aligning plain `align` and `cases`?

The cases environment works very well for enumerating cases within a large left bracket. I'd like to be able to combine it with the align environment so that equals-signs and conditions also line up: ...
14
votes
6answers
1k views

Defining `$$$ $$$` to align

I would like to define $$$ \zeta(s) = \dfrac1{1^s} + \dfrac1{2^s} + \cdots $$$ as a short hand for \begin{align} \zeta(s) = \dfrac1{1^s} + \dfrac1{2^s} + \cdots \end{align}` How should I go ...
13
votes
2answers
3k views

In align environment, how can you label some (but not all) of the equations?

I know that the align environment labels all the lines, while the align* environment labels none of the lines. Is there a way to have the align environment label only some of the lines? For example, ...
2
votes
1answer
312 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} &= \! ...
14
votes
1answer
4k views

How can I write multi line equations with alignment in inline math mode?

Is there any way to override the fact that certain environments in LaTeX are automatically "displayed"? One such example is the align* environment. I want to keep my aligned equations inline. So ...
10
votes
2answers
454 views

Ignoring specific ampersand formatting on a specific line of an align block

I want to typeset a number of equations with some alignment constraints, but I want to partially ignore them on certain lines. An example formatted text might look like the following when it's ...
10
votes
4answers
5k views

Left-aligning specific text in math-mode

I currently have via \documentclass{scrartcl} \KOMAoptions{ fontsize = 10pt , headings = normal , } \usepackage{amsmath} \usepackage{multicol} \usepackage{siunitx} \begin{document} \begin{...
9
votes
2answers
8k views

\mbox does not draw a box inside align*

\mbox doesn't work inside align*: \begin{document} \usepackage{mhchem} \begin{align*} \ce{K_w} &= \ce{[H3O+][OH^-]} \\ -\log \ce{K_w} &= -\log ( \ce{[H3O+][OH^-]} ) \\ -\log ...
8
votes
2answers
4k views

Alignment across nested aligned environments

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 &= ...
6
votes
1answer
6k views

Using align in beamer with overlays

How can I get the align environment to play nicely with beamer overlays? As a simple example I would like \begin{align*} a = \frac{bc}{c} \end{align*} on the first overlay and then \begin{...
5
votes
2answers
5k views

Align a linear program

I want to write my linear program so that it looks like in this picture: meaning I want to have the following: text aligned to the left all the x_{j} variables to be one another the i= and j= ...