# Big Curly braces in Latex with

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}
$$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{document}

• What errors you're getting? Also, add a compilable code so people can run it with less effort. Jan 17, 2017 at 15:17
– Kola
Jan 17, 2017 at 15:20
• You also have maths inside the \text commands argument. Jan 17, 2017 at 15:26
• \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. Jan 17, 2017 at 15:29
• You should get the error ! LaTeX Error: Missing \begin{document}. not file not found. Are you sure you get a file error? Jan 17, 2017 at 15:45

Multiple errors (e.g., no \begin{document}, H^' and maths inside \text command arguments) and a style issue. Here's one that works fine for me:
\documentclass{article}
$$H'(\theta)_{mn}= \begin{cases} (x_i-x_j)/d_{ij}, & \text{if } \theta_n = x_i.\\ (x_j-x_i)/d_{ij}, & \text{if } \theta_n = x_j.\\ (y_i-y_j)/d_{ij}, & \text{if } \theta_n = y_i.\\ (y_j-y_i)/d_{ij}, & \text{if } \theta_n = y_j.\\ 0, & \text{otherwise}. \end{cases}$$

• To make a whole code block display as a block, rather than using backtick delimiters, highlight the block and click on the {} icon atop the edit box. Internally, it indents those lines 4 spaces, but what is displayed is the block displayed in code form. I edited your answer to do this. Jan 17, 2017 at 15:50