I am trying to get the equation below to display a big curly braces with 4 conditional equations but my latex is giving me error 'File not found'.
\documentclass{article}
\usepackage{amsmath}
\begin{equation}
H^'(\theta)_{mn}=
\begin{cases}
\frac{x_i-x_j}{d_{ij}}, & \text{if \theta_n = x_i}.\\
\frac{x_j-x_i}{d_{ij}}, & \text{if \theta_n = x_j}.\\
\frac{y_i-y_j}{d_{ij}}, & \text{if \theta_n = y_i}.\\
\frac{y_j-y_i}{d_{ij}}, & \text{if \theta_n = y_j}.\\
0, & \text{otherwise}.
\end{cases}
\end{equation}
\end{document}
\text{if \theta_n = y_j}
is wrong, it should be\text{if $\theta_n = y_j$}
as the equation part needs math mode and\text
sends you to text mode.! LaTeX Error: Missing \begin{document}.
not file not found. Are you sure you get a file error?