Hot answers tagged

25 votes
Accepted

3 equations + vertical dots

I think you can simplify a bit and use something like this (from the amsmath package): \begin{align} x_{0} &= y + m_{0} \\ x_{1} &= y + m_{1} \\ &\;\;\vdots \notag \\ x_{n} &...
Thomas's user avatar
  • 1,431
23 votes
Accepted

How the `\alignat` works in ams package

I've always found the description of alignat based on the number of & tokens confusing. It's simpler than that: first you decide how many parts your alignment consists of, then adjust the number ...
egreg's user avatar
  • 1.1m
19 votes
Accepted

How do you do a "staircase align" in Latex?

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat}{2} a = b & &&\\ & {}= c &&\\ & &{} = d &\\ ...
Steven B. Segletes's user avatar
15 votes

How to align operators using alignat or someother environment?

You have to understand that, in the align and alignat environments, for n alignment points, one needs 2n – 1ampersands: the first one is to introduce a ne column (from the second column), the next one ...
Bernard's user avatar
  • 270k
12 votes
Accepted

How to properly align two numbered equations?

You can use IEEEeqnarray from IEEEtrantools. Here I specify alternating centered columns, one for ordinary material and one for relation/operation symbols. I also add a simpler syntax for the ...
egreg's user avatar
  • 1.1m
11 votes

Writing a system of Linear Equations

You're overcomplicating things: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*} \left\{ \begin{alignedat}{3} % R & L & R & L & R & L 2x &...
egreg's user avatar
  • 1.1m
10 votes
Accepted

Writing a system of Linear Equations

The \begin{alignat*}{4}[left = \empheqlbrace] solution which you employ in your own answer requires hand-editing "& 6" to "& 6\phantom{0}" in order to generate the appearance of left-alignment ...
Mico's user avatar
  • 496k
10 votes
Accepted

How to align single-digit numbers with multi-digit numbers in multi-line equations?

Use array features. Setting the intercolumn spacing to zero and forcing TeX's automatic spacing around binary relations or operations is simple. In the second example, which I like better, I also ...
egreg's user avatar
  • 1.1m
9 votes
Accepted

Numbering for a whole system of equations

You can use alignedat inside equation. I added a couple of adjustments for having the vertical dots centered with respect to the equals signs and not so far away from the last line. \documentclass{...
egreg's user avatar
  • 1.1m
9 votes
Accepted

siunitx and alignat?

Something like this: \documentclass{article} \usepackage{amsmath,siunitx} \begin{document} \begin{alignat*}{4} & I_{A} && = \mathit{SSA}/\mathit{SST} && ={} &\SI{...
daleif's user avatar
  • 53.2k
9 votes

How to align single-digit numbers with multi-digit numbers in multi-line equations?

This may seem rather "manual" but actually ends up using less markup than forcing the alignment through alignment cells. \documentclass{article} \usepackage{amsmath} \mathcode`\:="...
David Carlisle's user avatar
9 votes

How do you do a "staircase align" in Latex?

You could use an array environment. \documentclass{article} \usepackage{amsmath} \begin{document} \[ \begin{array}{*5{l@{\;}}} a = & b \\ & = & c \\ & & = &...
Vincent's user avatar
  • 20k
9 votes

How do you do a "staircase align" in Latex?

You can use alignat, but it's handier if we don't have to compute the number of necessary &'s and let TeX do it. The main left-hand side is given as argument to the environment, the rest is in the ...
egreg's user avatar
  • 1.1m
9 votes
Accepted

Aligning polynomial expansion

Here's a solution that uses an 11-column array environment. \documentclass{article} \usepackage{mathtools} % for '\mathrlap' macro \usepackage{array} % for '\newcolumntype' macro \...
Mico's user avatar
  • 496k
9 votes

How to properly align two numbered equations?

In your case you could use the eqparbox package for example. It helps to make pairs of boxes of the same width. After making them, it is sufficient to use simple `align' for your equations to be ...
Sergei Golovan's user avatar
8 votes
Accepted

Error message when using split within alignat

To have just one equation number it is reasonable to use equation as the outer environment. A split will provide a single alignment point, if you need more use alignedat, or aligned, instead. For ...
Andrew Swann's user avatar
  • 94.9k
7 votes

3 equations + vertical dots

You don't have to write the equation twice: you have to write the relation symbol w.r.t. which the dots will be centred. Illustration with \vdotswithin and \shortvdotswithin: \documentclass{article} ...
Bernard's user avatar
  • 270k
7 votes

How to align operators using alignat or someother environment?

You may find the following solution, which uses only the array package, instructive. The array environment used in the solution has 23 [!] separate columns: 12 for the very first term and the ...
Mico's user avatar
  • 496k
7 votes

How to align operators using alignat or someother environment?

You can use the new package autoaligne, augmented with a trick for removing the + sign from the first term in the second line. The \f macro is just for slimming the input. It would be better if the ...
egreg's user avatar
  • 1.1m
7 votes

siunitx and alignat?

Here's a solution that uses an array environment. \documentclass[12pt]{article} \usepackage[english, italian]{babel} \usepackage{array} \newcolumntype{C}{>{{}}c<{{}}} % col. type for binary ...
Mico's user avatar
  • 496k
7 votes

siunitx and alignat?

eddit: sorry but at uploading my answer, i was interrupted ... and than Mico overtake me for one minute with similar idea ... however, some details the mine answer are different (and simpler?): \...
Zarko's user avatar
  • 294k
7 votes
Accepted

How should I use alignat with more than two columns?

I just converted 2 columns from & separators to &&, in order to force left alignment of those columns. And, as Mico generously added, all occurrences of {}={} can be replaced with =. \...
Steven B. Segletes's user avatar
7 votes
Accepted

Equation alignment with varying number of columns

I suggest you use a \mathrlap directive (provided by the mathtools package, a superset of the amsmath package) to "hide" the t_i + t_j + t_k + t_m part from the remaining equations; see the ...
Mico's user avatar
  • 496k
7 votes

Why is there space?

I won't claim my mind-reading skills are any good, but I suspect that what you really want is something like this -- observe the argument {2} instead of {3} in alignat*: \documentclass{article} \...
Mico's user avatar
  • 496k
7 votes
Accepted

How to add a left-hand brace to this system of equations?

The following solution employs the empheq package and its eponymous environment. Note that it's not necessary to employ {alignat}{3} for the equations at hand -- align will do just fine. \...
Mico's user avatar
  • 496k
6 votes
Accepted

Is there an environment similar to alignat, but embedded in a single equation?

Just use the "internal" form alignedat. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{alignedat}{2} \nu_n &= \mu_n \vec{F}_n &&= - \mu_n \...
campa's user avatar
  • 29.9k
6 votes
Accepted

refining alignat

Two alignments will do.You can use the eqparbox package, and the \smashoperator command from mathtools. Two compilations are necessary. \documentclass{article} \usepackage{mathtools} \usepackage{...
Bernard's user avatar
  • 270k
6 votes

How to align operators using alignat or someother environment?

If I understand the problem correctly, you could do it with a TABstack. \documentclass{article} \usepackage{tabstackengine}[2016-10-04] \TABstackMath \TABstackMathstyle{\displaystyle} \begin{document}...
Steven B. Segletes's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible