9
\$\begingroup\$

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?

\$\endgroup\$
4
  • 3
    \$\begingroup\$ Looks like a bug indeed \$\endgroup\$ Nov 9, 2017 at 21:32
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ Nov 9, 2017 at 21:34
  • 1
    \$\begingroup\$ Maybe because \eqalign is plain-tex not LaTeX? \$\endgroup\$
    – morbusg
    Nov 10, 2017 at 21:10
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – Anakhand
    Apr 23, 2019 at 10:31

0

You must log in to answer this question.

Browse other questions tagged .