Misplaced alignment tab character & (for \cases)

casesequationserrors

I'm using the \cases format to create the following equation:

enter image description here

by using:

\begin{equation}
\phi(x,y)=\begin{cases}
    
      <0, & \text{for}\  \Omega_1 \text{(Phase 1)} \\ 
      0, & \text{for}\  \Gamma \text{(Interface)} \\ 
      >0, & \text{for}\  \Omega_2 \text{(Phase 2)} 
    
    \end{cases}
 \label{eq.LS function}  
\end{equation}

Overleaf creates the equation but I receive the following error:
"Misplaced alignment tab character &"

I have not used the "&" anywhere in the text and it has been used only for equations.

Best Answer

I created the following minimal working example and tested it successfully on Overleaf. As user egreg already implied, your code does not show a problem so it is difficult to guess what the problem is on your end.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\phi(x,y)=\begin{cases}
      <0, & \text{for}\  \Omega_1 \text{ (Phase 1)} \\ 
      0, & \text{for}\  \Gamma \text{ (Interface)} \\ 
      >0, & \text{for}\  \Omega_2 \text{ (Phase 2)} 
    \end{cases}
\label{eq.LS function}  
\end{equation}

\end{document}

enter image description here