1
$\begingroup$

I'm running mathjax locally in a browser, from the following minimalist file:

<!DOCTYPE html><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<html>
<title> MathJax Bug?</title>
<head>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>
</head>
<body>

$$
\def\Test1#1#2{{ #1, #2 }}
\Test1{aa}{bb}
\def\Test2#1#2{{ #1, #2 }}
\Test2{aa}{bb}
$$

$$
\def\Test1#1#2{{ #1, #2 }}
\def\Test2#1#2{{ #1, #2 }}
\Test1{aa}{bb}
\Test2{aa}{bb}
$$

</body>
</html>

(You can simply copy the code above to a file bug.htm, then open that.)

What works: The first "\$\$...\$\$". It displays "aa,bbaa,bb" in the browser.

What doesn't work: The second "\$\$...\$\$". It displays the raw four lines of code: "\def...{bb}"

My error or a MathJax bug?

If a bug, is there a workaround?

EDIT WITH ANSWER

It turns out that it was my own ignorance: In TeX, macro names can only contain letters, not numbers. Changing Test1 and Test2 to TestA and TestB works.

$\endgroup$

closed as off-topic by quid Jul 22 at 17:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Mathematics Stack Exchange or the software that powers the Stack Exchange network within the scope defined in the help center." – quid
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ While the MathJax developers are monitoring this forum, it is not where you should submit bug reports for MathJax. At best, we expect that MathJax related bug reports will be related to its integration and usage on this website. $\endgroup$ – Asaf Karagila Jul 22 at 15:57
  • $\begingroup$ Hi @AsafKaragila. The issue tracker at Github is down. Also, I don't know if it's a bug or me making a mistake. $\endgroup$ – Job Stancil Jul 22 at 15:59
  • 1
    $\begingroup$ My private repositories also seem down at the moment. But just because the advertising website is down, doesn't mean that this is a proper site to place a "for sale: used car" ad. $\endgroup$ – Asaf Karagila Jul 22 at 16:01
  • $\begingroup$ Well, I hope my question doesn't read like an ad... ;) I honestly worry it is my own error, because I'm no MathJax pro. $\endgroup$ – Job Stancil Jul 22 at 16:03
  • 1
    $\begingroup$ Github's twitter says that everything is back to normal. Try again. $\endgroup$ – Asaf Karagila Jul 22 at 16:29
  • $\begingroup$ I just did. I'll leave it here, in case someone sees a user error (by me). If developers decide it is a a bug, I'll rewrite this question here as a known bug or delete. $\endgroup$ – Job Stancil Jul 22 at 16:31
  • 2
    $\begingroup$ The question is possibly on-topic on Stack Overflow see its mathjax tag stackoverflow.com/questions/tagged/mathjax $\endgroup$ – quid Jul 22 at 17:26
  • 1
    $\begingroup$ I've learned one thing... MathJax is an AJAX library for representing math using traditional LaTeX style commands. $\endgroup$ – Roddy MacPhee Jul 22 at 17:44
  • 1
    $\begingroup$ I found the answer elsewhere, and added it to the original questions (since the question is on hold, I cannot answer). If you feel this is off-topic (I did find several MathJax questions here), feel free to delete. $\endgroup$ – Job Stancil Jul 23 at 6:23

Browse other questions tagged .