Intereting Posts

Tex Gyre showcase
Inconsistent appearance of white \hline on black background
Interactively look up macro definitions
How to choose singular or plural form from presence of \and in argument
Can “style justification” be part of the colophon?
How do I use an OpenType font with my LaTeX document?
Missing number, treated as zero
How to compose figure from text with latex?
Different Style of pi infinity symbol
Bookmark Title Page
How to format an email conversation?
Changing font in tabular
Avoid height flickering in a block when hiding content with \only
BiBTeX: I couldn't open file name 'myBib.aux'
Radial Labels on Mindmap – Part I

I have a few aligned lists of coefficients. One set of coefficients has three columns and the other has four. At the moment I display them with two `align`

environments:

```
\begin{align}
\gamma_1 &= 8/15 & \gamma_2 &= 5/12 & \gamma_3 &= 3/4 \\
\zeta_1 &= 0 & \zeta_2 &= -17/60 & \zeta_3 &= -5/12 \\
\beta_1 &= 4/15 & \beta_2 &= 1/15 & \beta_3 &= 1/6
\end{align}
\begin{align}
a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1
\end{align}
```

The alignment and spacing between elements in each row is exactly as I want but there is too much space between the three column coefficients and the four column coefficients. Essentially, I want the alignment to reset at a certain point so that the next line of the `align`

environment has four columns and is centered.

I learned about the `aligned`

environment as I searched for an answer. The question asked there is essentially what I am asking, but the code provided there does not do what I want. I have not successfully been able to produce code to do exactly what I want.

- Aligning two fractions in the split environment
- alignment problem
- How to align piecewise functions?
- How to create a multi-row equation?
- Use flalign or alignat or align or similar environment to align to the left
- How to make formulae take equal vertical space in the align environment?

This is the closest I can get:

```
\begin{align}
\begin{aligned}
\gamma_1 &= 8/15 & \gamma_2 &= 5/12 & \gamma_3 &= 3/4 \\
\zeta_1 &= 0 & \zeta_2 &= -17/60 & \zeta_3 &= -5/12 \\
\beta_1 &= 4/15 & \beta_2 &= 1/15 & \beta_3 &= 1/6 \\
\end{aligned} \\
\begin{aligned}
a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1
\end{aligned}
\end{align}
```

This has two problems:

- The coefficients are compressed rather than expanded as they are with two
`align`

s. - Each
`aligned`

environment has one equation number. I’d prefer to refer to each set of coefficients (gamma, zeta, beta, and a) directly.

Likely I could manipulate the spacing at the bottom and/or top of the align environment and use my original code, but that’s sloppy and I’m confident a simple way to do what I want exists but I’m not aware of it.

Also, the a0 and a3 coefficients are required to be 0 and 1 respectively by definition, so I can leave one out, but I want to include both of them for clarity.

- Is there an environment that imitates align but displays `textstyle` math?
- Labeled linear program with labeled equations and wide objective function
- Alignment of horizontal subfigures
- Change align of a single cell in tabular
- How can I typeset LaTeX math proofs with long lines?
- tikzpicture alignment and centering
- Which command should I use for displayed equations?
- Arabic with Latin mathematical notation
- How do I display verification of propositional logic in this way?
- Aligning using flushleft and flushright

You can play around with columns to fool the alignment mechanism as:

```
\begin{align}
\gamma_1 &= 8/15 &&& \gamma_2&= 5/12 &&& \gamma_3 &= 3/4 &\\
\zeta_1 &= 0 &&& \zeta_2&= -17/60 &&& \zeta_3 &= -5/12& \\
\beta_1 &= 4/15 &&& \beta_2&= 1/15 &&& \beta_3 &= 1/6&\\
a_0 ={}&0 &&& a_1 = 8/15 && a_2 = 2/3 &&&\qquad a_3 = 1
\end{align}
```

but with all due respect, what you want to do, does not read well. I would have done something like the following

```
\begin{align}
\gamma_1 &= 8/15 & \gamma_2&= 5/12 & \gamma_3 &= 3/4 \\
\zeta_1 &= 0 & \zeta_2&= -17/60 & \zeta_3 &= -5/12 \\
\beta_1 &= 4/15 & \beta_2&= 1/15 & \beta_3 &= 1/6\\
a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 \\ \notag
& & a_3 &= 1 & &
\end{align}
```

You can deliberately put some vertical space between the first three and the last to highlight the grouping effect which is, in my opinion, more important in order to convey the message rather than to be able to command a LaTeX array.

For full control of the alignment you can use the `alignat`

environment.

```
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools} % loads »amsmath«
\begin{document}
\begin{alignat}{4}
& & \gamma_1 &= 8/15\qquad & \gamma_2 &= 5/12 & \gamma_3 &= 3/4 \\
& & \zeta_1 &= 0 & \zeta_2 &= -17/60\qquad & \zeta_3 &= -5/12 \\
& & \beta_1 &= 4/15 & \beta_2 &= 1/15 & \beta_3 &= 1/6 \\
a_0 &= 0\qquad & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1
\end{alignat}
\end{document}
```

Here is one viable alternative to your alignment issue:

```
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align}
\smash{\begin{array}[t]{*{2}{r@{\;}l@{\qquad}}r@{\;}l}
\gamma_1 &= 8/15 & \gamma_2 &= 5/12 & \gamma_3 &= 3/4 \\[\jot]
\zeta_1 &= 0 & \zeta_2 &= -17/60 & \zeta_3 &= -5/12 \\[\jot]
\beta_1 &= 4/15 & \beta_2 &= 1/15 & \beta_3 &= 1/6
\end{array}} \label{gammas} \\ \label{zetas} \\ \label{betas} \\
\begin{array}[t]{*{3}{r@{\;}l@{\qquad}}r@{\;}l}
a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1
\end{array} \label{as}
\end{align}
$\gamma$ is~\eqref{gammas}, $\zeta$ is~\eqref{zetas}, $\beta$ is~\eqref{betas} and $a$ is~\eqref{as}.
\end{document}
```

The equation elements are placed inside an `array`

. Proper vertical alignment is assured using `\\[\jot]`

, while horizontal adjustment is obtained via `\qquad`

for the column spacing. Modify this to suit your need (to say `\quad`

, or `\hspace{<len>}`

where `<len>`

is any known TeX length unit).

A very crude solution is to simply subtract some vertical space.

```
\begin{align}
\gamma_1 &= 8/15 & \gamma_2 &= 5/12 & \gamma_3 &= 3/4 \\
\zeta_1 &= 0 & \zeta_2 &= -17/60 & \zeta_3 &= -5/12 \\
\beta_1 &= 4/15 & \beta_2 &= 1/15 & \beta_3 &= 1/6
\end{align}
\vspace{-\belowdisplayskip}
\vspace{-\abovedisplayskip}
\vspace{-3\jot}
\begin{align}
a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1
\end{align}
```

It’s not perfect though. Does anyone know what the separation between lines in `align`

is?

- How to show latex commands in text mode
- How to remove headers and footers for pages between chapters?
- Aligning numbers by decimal points in table columns
- Best practices for setting figure width/height ratio across the document in a consistent fashion
- monochrome and pstricks
- Want to add more column on the left side?
- Tool to handle “precompiling the preamble” automatically
- Aligning plain `align` and `cases`?
- How can I manually install a package on MiKTeX (Windows)
- How to Convert XeTeX to HTML
- Is it possible to make a curly brace end in an arrow?
- Nice-looking p-th roots
- Can fuzzy borders be added to external pictures programmatically?
- How to plot a graph with separate scale reference lines?
- \centering doesn't seem to center my text