Error about improperly formatted code appears when attempting to format LaTeX as math

In an answer, I tried to post the following math:

\eqalign{ d &= \log_{10}(\frac{\alpha^n - \beta^n}{\alpha - \beta}) \\ &= \log_{10}(\alpha^n - \beta^n) - \log_{10}(\alpha - \beta) \\ &= \log_{10}(\alpha^n) - \log_{10}(1 - \frac{\beta^n}{\alpha^n}) - \log_{10}({\alpha - \beta)} \\ &\le \log_{10}(\alpha^n) - \log_{10}(1 - \frac{\beta^2}{\alpha^2}) - \log_{10}({\alpha - \beta)} \\ &< \log_{10}(\alpha^n) + 0.07 - 0.34 \\ &< \log_{10}(\alpha^n) = \frac{\log_\alpha(\alpha^n)}{\log_\alpha(10)} = \frac{n}{\log_\alpha(10)} < \frac{n}{4.78} < \frac n 4 }


I want to format this LaTeX code as math using MathJax, as I learned from the advanced help. The preview looks correct, but Stack Exchange rejects my post with the error:

Your post appears to contain code that is not properly formatted as code.

I can only get around the error if I format this math as code, not as math.

Is this a bug, or am I doing something wrong?

• Looks like a bug indeed – Mathieu Guindon Nov 9 '17 at 21:32
• I was able to remove the indentation for you in Rev 2. I think that the validation may be enforced for only some users, based on their reputation score. – 200_success Nov 9 '17 at 21:34
• Maybe because \eqalign is plain-tex not LaTeX? – morbusg Nov 10 '17 at 21:10
• Another bodge-fix I've found is trying to shuffle the source code formatting a bit: putting the final $$ at the end of the last line and the first $$ on the same line as the first code line. – Anakhand Apr 23 at 10:31