2

I guess this is quite a trivial question but upon searching i only found answers explaining align with one & or how to put the whole equation to the left (such as with fleqn). But i want to keep my equation centered (default) but introduce two "tabulators".

I know how to use the {align} or {aligned} environment. It works perfectly fine with only two columns. But when i introduce two & signs (i.e. three columns) the second & sign does not align the two rows anymore but instead everything after the equal sign is aligned to the right insted of at the & sign.

I thought I can use the & as "tabulator" so that rows are aligned at it but this seems to be wrong.

\documentclass[11pt,a4paper]{scrartcl}
\usepackage[ngerman,british]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{amsmath}

\usepackage{chemmacros}
\chemsetup{modules={all}}

\begin{document}
This works perfectly fine
\begin{equation}\begin{aligned}
Aa   &= Bb    \\
\Leftrightarrow \quad Cccc &= Dddd    \\
\Leftrightarrow \quad Eeeeee &= Ffffff
\end{aligned}\end{equation}

But as soon as i introduce three columns, the equals are not aligned anymore
\begin{equation}\begin{aligned}
& Aa &= Bb  \\
\Leftrightarrow \quad & Cccc &= Dddd  \\
\Leftrightarrow \quad & Eeeeee &= Ffffff
\end{aligned}\end{equation}

same with align instead of aligned
\begin{align}
& Aa &= Bb    \nonumber\\
\Leftrightarrow \quad & Cccc &= Dddd  \nonumber\\
\Leftrightarrow \quad & Eeeeee &= Ffffff
\end{align}
\end{document}
4

In this case the environment of choice is alignedat, which allows to set the spacings between the columns, which are pairs of “left-right” ones.

\documentclass[11pt,a4paper]{scrartcl}
\usepackage{amsmath}
\usepackage{chemmacros} %formula, spectra, ...
\chemsetup{modules={all},greek=default}

\begin{document}

If I introduce three columns, the equals are again aligned 
\begin{equation}
\begin{alignedat}{2}
&\quad& 
  \frac{v_1}{v_2} &= \frac{[\ch{A}]_1^{m_{\ch{A}}}}{[\ch{A}]_2^{m_{\ch{A}}}} \\
\Leftrightarrow&& 
  \ln\frac{v_1}{v_2} &= m_{\ch{A}} \ln \frac{[\ch{A}]_1}{[\ch{A}]_2}   \\
\Leftrightarrow&&
  m_{\ch{A}} &= \frac{\ln(v_1/v_2)}{\ln([\ch{A}]_1/[\ch{A}]_2)}
\end{alignedat}
\end{equation}

\end{document}

Here the first column contains the \Leftrightarrow symbols, the second column a quad of space, then the main formulas appear.

enter image description here

  • That was fast and does what i wanted, thank you :) So, are the align and aligned environments only suitable for adding one "tabulator" resp. two columns ? – Wulfram Dec 9 '16 at 21:23
  • @Wulfram They're for “independent” column pairs, which are evenly spaced. – egreg Dec 9 '16 at 21:27
  • 1
    the limit for align and alignat (and the *ed and "ed" versions) really depends more on the width of the page. the important thing to remember is that they are defined as "left-right" pairs, so only the "even" &s will give you a neat left-alignment. – barbara beeton Dec 9 '16 at 21:29

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.