5
\begin{align*}
    abcd &= abcd &(abcdefghijk)\\
         &= ab   &(ab)
\end{align*}

After the first ampersand the equal signs are aligned. However, after the second ampersand, the closing parentheses ")" are aligned. I'd like the opening parenthesis "(" to be aligned instead. Is there an optional argument like that for align? Am I using the wrong environment? Should I define a new one instead?

Incidentally, how can I avoid having that much white space in between these two?

enter image description here

6

1. align:

The align environment provides pairs or rl aligned equations. So, in normal usage the first & make the content on the left, be right aligned and the content on the right be left aligned. So, you need to insert an additional & to make the second left aligned:

enter image description here


2. alignat:

If you want to control the spacing between them, I would recommend you use the alignat environment. Similar, to align, it also provides pairs of rl aligned equations, but unlike align the alignat does not insert additional horizontal spacing in between:

enter image description here

In the above, I inserted a \quad space, without which it looks like:

enter image description here

References:


Code:

\documentclass{article}
\usepackage{amsmath}


\begin{document}
\begin{align*}
    abcd &= abcd &&(abcdefghijk)\\
         &= ab   &&(ab)
\end{align*}

\begin{alignat*}{2}
    abcd &= abcd &\quad &(abcdefghijk)\\
         &= ab   &\quad &(ab)
\end{alignat*}

\begin{alignat*}{2}
    abcd &= abcd &&(abcdefghijk)\\
         &= ab   &&(ab)
\end{alignat*}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.