# A possible bug regarding MathJax, previews, and the arctangent/tangent functions?

For context, I was making a tweak to GReyes' answer on this question, just cleaning up some formatting with the trigonometric functions. Specifically, I was turning arctan to \arctan and tan to \tan in the MathJax code.

Below is the code in the post and the preview that resulted (blue boxes highlighting the relevant bits):

In short, the functions in the preview become sine/arcsine functions instead of tangent/arctangent.

On playing around, I noticed this does not happen if I instead put \cos or \arccos, or \sec, \csc, or \cot. Only \tan and \arctan would render as sine and arcsine.

What's more intriguing - and confusing! - is that this glitch seems localized only to this question. Playing around on other answers (obviously not saving my edits), I can't reproduce the effects of the glitch. But, another answer to that same question has the tangent/arctangent functions rendering as intended - though on opening it up to edit it, the same glitch arises without me so much as changing a letter!)

Yet other questions that involve tangent/arctangent functions don't seem to be affected: this one and this one for example.

Does anyone have any idea what might be causing this glitch? I feel like it might just be something on my end, but I honestly don't know.

I admit that I don't know MathJax/LaTeX particularly well - I'm terrible at programming and coding in general, and only know what I do of these from experience and seeing other posts - so maybe there's something dumb I'm overlooking. In which case if this is just a waste of time, sorry.


## 2 Answers

A linked question contained some malicious code in the title. I've removed it.

• math.meta.stackexchange.com/questions/4130/… effectively includes instructions on how to cause this bug. I can't help wondering if it's wise to keep them (and this) around. Jan 28 '19 at 1:53
• @timtfj As the most recent answer in the question you linked explains, this has been already resolved for posts and comments. Probably some kind of similar fix can be used for titles - after that newcommand and similar commands should be "safe". (In fact, I did not notice this recent change - it was pointed out to me by quid in our recent conversation in chat about this problem.) Jan 28 '19 at 10:35
• This asker apparently also included the same malicious code in their one other post. I have a feeling that the purpose of these posts was just to "trick" people trying to answer the question. A real comedian... Jan 28 '19 at 23:14

One of the links from Greyes' question is: Simple trig problem- whose URL is actually
which looks suspicious but my HTML skills are limited so this might be a red herring.