{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

2
votes
1answer
56 views

Align multiple items on each row

I'm trying to improve this , so that A,B,C,D properly aligned on each row. I'm currently using \begin{tabular}{ p{0.5cm} | p{17cm} } to create the vertical line, but I'm willing to change that, if ...
2
votes
2answers
80 views

intertext with no numbering

I'm trying to write this formula here \begin{align} L = 1 - \sum_{t \le x} \mathcal{N}(t | \mu, \sigma)\\ \intertext{where $\mathcal{N}$ is the Gaussian density function } \end{align}...
1
vote
1answer
47 views

Horizontal alignment in flalign

I feel like this will probably be an obvious one, but I've been struggling to keep the horizontal spacing tight in flalign; but with: \begin{flalign*} &\int_{-\pi}^{0} f(x)dx ...
7
votes
2answers
111 views

How to get a nice alignat of this equation?

I want to align this equation. I tried \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{2} A\cdot \left(A^{n-1}+A^{n-2}\cdot B + \cdots + B^{n-1} \right)&=& A^{...
4
votes
1answer
95 views

Define newenvironment using mdframed and align

I would like my math equations to have a gray background. My initial attempt at this was to simply "sandwich" my align environment by a mdframed environment. It would seem far easier to me though if I ...
2
votes
2answers
61 views

Aligning the first line of an align environment on the baseline of the last line of text preceding it

This may be bad typesetting, but I'm working with limited resources where I both want and need to conserve paper. This is not something for publication, so the standards for a math paper need not ...
6
votes
4answers
255 views

Equations and Equation Numbers within a Box

I use the code below to make a box around equations. It puts the equations numbers outside the box, however I would like to have the equation numbers within the box. How can I alter my code to do ...
2
votes
1answer
121 views

fleqn, koma-script and align: fleqn doesn't work properly

I have a problem using koma-script classes, fleqn and align: The equation are not completely left aligned. The fleqn option moves them to the left , but the equation are not left aligned. In my main ...
1
vote
2answers
260 views

Figure and caption are not aligned

I have a particular problem aligning the caption and the figure. I attach for you the image of what latex is producing, plus the image file if somone needs to replicate the code. As you see the image ...
0
votes
1answer
134 views

Left alignment of multiple equations with one label

I am using flalign for left alingment of two equations, but I also want to give them one label for which I found the split environment. But they are not working together. The question is how to align ...
1
vote
1answer
54 views

Size of equations

How I can shrink the equations within an align environment ? Here it it my MWE \documentclass[11pt,a4paper]{article} \usepackage[hmargin=2.5cm,vmargin=1cm]{geometry} \usepackage{amsmath} \...
5
votes
2answers
184 views

Two cases brackets in one line, aligned to a formula in a second line

I am trying to align two cases environments to a formula: schematically: A = B +C = {cases1 +{cases2 where B+cases1 and C+cases2 are aligned. I read about the \alignat{3} option, but I ...
2
votes
2answers
148 views

vertical center aligned inside align environment

How can I make the top of the aligned pack vertically aligns with the x ->? How can I use a box or something to achieve this? (There are other options of course but I would like to use box or ...
2
votes
2answers
45 views

How to reference long equations by numbered alphabets [duplicate]

I have 2 long equations when I want to label them as 2a and 2b by using subequation a problem occur that each line of equation n pdf gets number inspite of each equation so thats why i got more ...
0
votes
0answers
21 views

I'm getting an error when I try to align two expressions [duplicate]

I'm trying to align two expressions so "if" is the same place on each line. \documentclass[a4paper,12pt]{article} \usepackage{amssymb,amsmath} \begin{document} \begin{align} $1 & \mbox{if} x &...
5
votes
4answers
140 views

How do I align the sums using the align* environment?

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \sum_{k=1}^\infty \frac{1}{k} &\rightarrow \infty &\sum_{k=1}^\infty \frac{1}{k^2} &= \frac{\pi^2}{6} &&...
5
votes
3answers
130 views

Aligning systems of equations by symbol and variable

Using this code: \begin{flalign} & +3x+2y-5z=+04 \\ & +2x+4y-1z=+12 \\ & -4x-8y+9z=-06 & \end{flalign} I produce this output: However, I'd like to produce a similar alignment, ...
2
votes
4answers
57 views

Add line break to one line of a multi-line equation

I am writing an equation consisting of many lines, however, one particular line is very long and I want to break into a new line. For example: \begin{equation} \begin{aligned} & \text{...
5
votes
2answers
96 views

How do I use equation in this scenario without running into “Missing number, treated as zero”

I'm pretty new to Latex and I am working with a bunch of formulae. I'd like to give each of them different numbering and this is what I've got: \begin{align} \begin{split} &|\Theta_P| = {|P| \...
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 ...
1
vote
2answers
74 views

Left-align text in math-mode and break equations

I have the following MWE \documentclass[11pt, a4paper]{article} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{amsfonts, amsmath, amssymb, amsfonts} \begin{document} \begin{align} \...
3
votes
1answer
49 views

Making aligned environment and stacked limits work

I'm trying to typeset something like this: \begin{align*} n^{\frac1n} & = \exp\left(\frac1n\ln(n)\right) \\ & = \exp\left(\frac1n\ln(n)\right) \\ &...
3
votes
2answers
124 views

horizontally align group of nodes with respect to coordinate

I have one node (or rather, a coordinate) and a couple of nodes which are aligned in one "row" (via right=of, left=of). They are aligned below each other (via below right=of), \documentclass{article} ...
1
vote
1answer
59 views

Best way to arrange several (systems of) equations (of different size)

There are many many examples of how to deal with and depict a system of (linear) equations (e.g. compare Best way to create an system of equations environment? ). But I like to design exercise sheets ...
3
votes
1answer
179 views

Center aligned group of equations based on ampersand

MWE: \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \begin{document} aaa \vspace{17cm} \begin{align*} \centering (a+b)^3 &= (a+b)^2(a+b)\\ &=(a^2+2ab+b^2)(a+b)\\ ...
2
votes
2answers
122 views

How to stop centering effect when using split equation?

For example, the following code produces the equations below: \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{split} Helloworld & = A \\ & = B \...
4
votes
1answer
243 views

Align three images horizontally

I have three images that don't have the same size. I want to arrange them horizontally in a way that they are centered. I tried this code, it works for the positionning. But I don't know how I can add ...
2
votes
1answer
54 views

Increase vertical space for tikz boxes

Problem: This problem is two-fold: How would I do in order to increase the top and bottom margin for the orange box where it says "Code if true"? How would I do in order to always align the orange ...
2
votes
1answer
159 views

Customizing the sidebar in beamer having aligned section numbers

I'd like to know how the vertical navigation in the beamer sidebar can be edited to have the section numbers aligned left like in a toc. The question is very similar to this one I think the MWE can ...
2
votes
2answers
86 views

Beamer overlayarea within align environment

In my beamer presentation there are three equations in an align environment. First, they should be rendered as specified. In step 2, part of the first equation should have a box around it. In step 3, ...
2
votes
1answer
79 views

How to reset numbering every new math block?

In a paper/document with multiple math blocks, such as align, equation etc. every new block resumes numbering from the number it was left in the previous. How can we reset the numbering, that is, how ...
3
votes
3answers
64 views

Aligning the cell contents to the middle of the cell while using multicolumn

While using this table environment, I need to get the cell contents of the second row to be in the middle of each cell. But, I am getting all of them aligned to top of the cells (although there are ...
0
votes
1answer
44 views

Errors in align environment

The following block of code comes up with 10 errors. \begin{align} \|\tau(\textbf{x})-\tau(\textbf{y})\| &= \|\textbf{x}-\textbf{y}\| \\ \|\tau(\textbf{x})-\tau(\textbf{y})\|^2 &= \|\textbf{x}...
1
vote
0answers
17 views

Why can't I break this formula into two lines? [duplicate]

\begin{align} V_{\alpha \beta} = \left\langle (K_{il} E_{i j}^{\alpha} K_{j m} \delta_l \delta_m + 2 \epsilon_i \delta_m E_{i j}^\alpha K_{j m} + \epsilon_i \epsilon_j E_{i j}^{\alpha} - N_{i j} E_{i ...
1
vote
1answer
64 views

Double subscript error in align

What's the reason for the double superscript error? \nabla = \frac{\partial}{\partial r} \hat{\textbf{\r}} + \frac{1}{r} \frac{\partial}{\partial \phi} \hat{\textbf{\phi}} + \frac{...
2
votes
1answer
130 views

Good practice SI units align environment - tufte-book class

In a mission to purify my LaTeX-coding I encountered some problems. First problem after changing from book-class to tufte-book class I had to set all numbers in math-mode, meaning the units become ...
3
votes
3answers
80 views

Start a new line before align in equation

I use \begin{equation} \begin{aligned} p(z_{di, dj} = t | w^{(k)}_{di} = w_i, z_{-di}, x_{-di}, w^{(k)}_{-di}, w^{(n)}_{dj} = w_j, z_{-dj}, w^{(n)}_{-dj}, A, \alpha^{(k)}, \alpha^{(n)}, \beta) &\...
4
votes
2answers
3k views

Equations aligned center

The following code \begin{equation} \label{eq:test} \begin{aligned} A=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\ B=BBBBBBBBBBBBBBBB\\ C=CCCCC, D=DDDDDDD\\ E=EEEEE, F=FFFFFFF \end{aligned} \end{...
3
votes
1answer
92 views

Align equations with multiple subequation groups

I usually use the subequations environment with a nested alignso I can have nicely aligned equations with that neat 1a, 1b, 1c, etc. numbering and that's fine. But now I would want to still align ...
2
votes
1answer
68 views

Number equations and preserving alignment of equal signs

So as I have learned from a previous post that the \begin{aligned}... \end{aligned} with the usage of "&" before "=" will help arrange neatly the equations where the equal sign of each equation ...
3
votes
1answer
45 views

My phantom cup doesn't have the same width as my non-phantom cups in an align environment; how can I fix this?

Here's my code: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} Q= & \phantom{\cup} \{\{n-1,n-1,3\}\} \\ & \cup \{\{n-1,n-j+1,j+1\}: 3 \leq j \leq \lfloor n/...
1
vote
1answer
27 views

Control Spacing and Alignment in align environment

I have an align-environment and basically want all the Z's and all the signs (+-) left-aligned + all centered + the smallest possible/sane gap in between + numbering + labels (if possible): ...
6
votes
4answers
221 views

Align ordinal numbers

\documentclass[10pt]{article} \usepackage{ulem,amsmath} \newcommand{\unline}[1]{\rule[0pt]{#1}{0.6pt}} \usepackage[T1]{fontenc} \usepackage[sfdefault]{AlegreyaSans} \begin{document} \begin{...
4
votes
2answers
97 views

Move tag next to equation in align environment

It's my first time asking here but I have got so much help from this site :D My particular case is that I need order and tag Maxwell's equations but I need set the tag in a particular location, just ...
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 ...
3
votes
3answers
125 views

Hanging brackets in an align environment

I have two formulas in an align environment, and the second one starts with a bracket (this particular example is simplified): \begin{align} & x_\alpha(s) x_\alpha(t) \\ & \left[ x_\alpha(s), ...
3
votes
2answers
106 views

Equation numbers not showing up while using align together with mathtools

In the following \documentclass{memoir} \usepackage{amssymb,amsmath} \usepackage[fixamsmath]{mathtools} \mathtoolsset{showonlyrefs,showmanualtags,mathic,centercolon} \renewcommand{\u}{\textbf{u}} \...
3
votes
2answers
183 views

Align definition of variables of an equation right (not next to the equation)

this question has been asked before but I never saw a "perfect" solution for this problem. I use the equation block for my equations and I want the definition of the variables to show at the right, ...
4
votes
4answers
470 views

\overset and align environment: how to get correct alignment?

I'm using the align environment together with the \overset command to put some text over a relation symbol. Here is my MWE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}...
1
vote
1answer
58 views

Vertical spacing around align in a figure

Math environments like align put vertical space around them, to separate them from the text. This is all well, and if I wanted to change that, I could check this question. However, these environments ...