I have what feels like an very odd problem.

My goal is to simply create a simple single line equation of the following form:

(equation) (text) (equation)

I tried several approaches to achieve this with the align environment, provided by the amsmath package.

My first approach looked something like this:

  a &= b & \text{or} & a &= b 

However it returns:


If I replace the text in the middle this problem becomes easily solvable by just putting an extra '&' in its middle. Also having multiple lines seem to solve it. Yet I couldn't find a way to achieve this in this very setting. Any Ideas?

Thank you very much for your help!

  • Try using the aligned environment instead of align. Note that it has to be in mathmode: \[ \begin{aligned}\end{aligned} \] – Andreas Storvik Strauman Apr 13 '18 at 15:17
  • 1
    alignis for alignment, while you say you want to create a single line. What about simple and plain \[ a=b \qquad\text{or}\qquad a=b\]? – campa Apr 13 '18 at 15:24

What you missed is that you need 5 & for 3 alignment points: each column of alignment, except the first, requires one & to start a new column, and another & to mark the alignment point inside that column:



\begin{document} %

  a &= b & & \text{or} & a &= b


enter image description here


I suggest you use the following setup:

\usepackage{amsmath} % for '\text' macro
 a = b  \qquad \text{or} \qquad  c = d

If \qquad doesn't provide enough horizontal separation, give \qquad\quad or \qquad\qquad a try.

If you don't need the equation to be numbered, replace equation with equation*.

Note that there's little point in deploying the heavy-duty machinery of the align environment, since no alignment across rows is going to be performed, right?

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.