5

I am currently trying to get the align environment to work as I want it to work.

\begin{align}
&& a \cdot c + b &= 0\\
\Leftrightarrow && a \cdot c &= -b\\
\end{align}

This code will align the equivalent sign in the middle of the left half and the equal sign in the middle of the right half. What I actually want is that the equivalent sign is on the outer left of the page and the formula is in the middle of the remaining page. How can this be done and is this even encouraged? Or is there a better way to align formula with equivalent and equal signs?

0

2 Answers 2

3

Here are two options:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
  a \cdot c + b &= 0 \\
  \Leftrightarrow \qquad a \cdot c &= -b
\end{align}

\begin{align}
  a \cdot c + b &= 0 \\
  \llap{$\Leftrightarrow$ \qquad} a \cdot c &= -b
\end{align}

\begin{align}
  a \cdot c + b &= 0 \\
  a \cdot c &= -b \refstepcounter{equation}\tag*{(\theequation)\llap{\makebox[\linewidth][l]{$\Leftrightarrow$}}}
\end{align}
\end{document}

The first sets the \Leftrightarrow a distance of \qquad from the second equation. The second does the same, but removes any influence of \Leftrightarrow in terms of the horizontal spacing. The third sets it as part of the \tag* in order to position it on the left of the text block boundary.

The text block boundary is obtained by using the showframe package; not included in the above MWE.

3
  • I like both, thx!
    – Kamairo
    Jul 11, 2014 at 18:14
  • The first two are ambiguous, the third is abominable. ;-)
    – egreg
    Jul 11, 2014 at 20:54
  • While the first two works in this particular case, the solution is limited because it will get hard to align a third line of equivalence. Maybe better to use the alignat environment.
    – Daniel
    Apr 16, 2020 at 12:38
5

The first construction I propose below is sometimes used in a blackboard; for a written document, I'd suggest using the natural language and \shortintertext from mathtools:

\documentclass[11pt]{article}
\usepackage{mathtools} 
\usepackage{graphicx}

\begin{document}

\begin{align}
a \cdot c + b &= 0 \\
&\rotatebox[origin=c]{-90}{$\Leftrightarrow$} \notag \\ 
a \cdot c &= -b
\end{align}

\begin{align}
a \cdot c + b &= 0 \\
\shortintertext{if and only if}
a \cdot c &= -b
\end{align}

\end{document}

enter image description here

3
  • Definitly options if theres only 2 or 3 formula.
    – Kamairo
    Jul 11, 2014 at 18:14
  • @Kamairo it's nor to demerit Werner's answer (he gives what you asked for), but take into account that in all my years as a mathematician I've never ever seen that way to represent the equivalence between two expressions, specially the one with the sign flushed to the margin. Jul 11, 2014 at 18:18
  • Or precede the equations by “the two following equations are equivalent”; I agree with the idea of avoiding symbols.
    – egreg
    Jul 11, 2014 at 20:55

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.