# \newcommand does and does not work in titles

\newcommand within a question has in my experience failed to work in titles.

In this question when I hit "reload", I see the backslash and Th in red; i.e. it doesn't work. But when I click on "edit" and then "save", then it does work. This can mislead people who edit questions.

• If anyone is confused by this, the reason for the difference in behaviour is that when you use $\newcommand$ while editing it loads the macros into memory and when you add new mathjax to the page it remembers those macros. When you reload the page it clears those macros and new macros only effect elements on the page below where they are defined. – Trevor Gunn Jun 28 '17 at 21:03
• @T.Gunn : This leaves the question of whether there is any reasonable way to edit the title of that question that does not violate the rule agains using more than 150 characters. – Michael Hardy Jun 28 '17 at 21:18
• One could accept the slight inelegance of $Th(K_1)$ and $Mod(K_1)$. One could use Unicode. One could chose a different title altogether. Seem all more or less reasonable. Though Unicode is maybe too much of a hassle. – quid Jun 28 '17 at 21:39
• Even of it did, it won't be a good idea, since these commands are not defined for the front page, or search results, or user profiles. – Asaf Karagila Jun 30 '17 at 6:04
• I edited the page so that the subject line says Th$(K_1)$ and Mod$(K_1),$ with "Th" and "Mod" not in MathJax at all. – Michael Hardy Jun 30 '17 at 15:09