0

I have the following code:

\begin{align*}
&[f_2,\phi](a)=0, &&[f_2,\psi](a)=0, &[f_2,\phi](b)=-\beta_2, &&[f_2,\psi](b)=\beta_1.\\
&[f_1,\phi](a)=-\alpha_2, &&[f_1,\psi](a)=\alpha_1, &[f_1,\phi](b)=0, &&[f_1,\psi](b)=0.
\end{align*}

which produces the following

enter image description here

which isnt aligned after the second column. I'd like the alignment to coincide with each ' [ ' . Any ideas on how to line these up?

1 Answer 1

3

enter image description here

Use an & between each equation, and an & at the aligment point (=) in each equation.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
[f_2,\phi](a)&=0, &[f_2,\psi](a)&=0, &[f_2,\phi](b)&=-\beta_2, &[f_2,\psi](b)&=\beta_1.\\
[f_1,\phi](a)&=-\alpha_2, &[f_1,\psi](a)&=\alpha_1, &[f_1,\phi](b)&=0, &[f_1,\psi](b)&=0.
\end{align*}
\end{document}

If you want the aligment at [ not = that would be less conventional, but keep the & between the equations but move the aligment from &= to &[. The output is unchanged in this case as the left hand sides of each group have the same width.

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
&[f_2,\phi](a)=0, &&[f_2,\psi](a)=0, &&[f_2,\phi](b)=-\beta_2, &&[f_2,\psi](b)=\beta_1.\\
&[f_1,\phi](a)=-\alpha_2, &&[f_1,\psi](a)=\alpha_1, &&[f_1,\phi](b)=0, &&[f_1,\psi](b)=0.
\end{align*}
\end{document}

To better see the difference, the two forms, but replacing f_1 and f_2 by variables of different widths:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .