2
$\begingroup$

In a question of mine I used e.g. $\newcommand{curl}{\operatorname{curl}}$ to define $\curl$ being rendered as $\newcommand{curl}{\operatorname{curl}}\curl$. Back when I posted the question, answers and comments to that question where also capable of using the thus declared command. But now, using $\curl$ elsewhere results in a red $\color{red}{\backslash\text{curl}}$.

I realize this is actually the opposite of the old \def definitions linger, which states some very valid why \newcommand should usually not be global, so this request will probably be or . Therefore this :

What is the proper way to provide mathjax \newcommands that might help answerers and commenters in typesetting their response?

Should they simply have to copy-paste the definition which might become outdated due to a fix (e.g. in spacing)? Especially comments will suffer from this due to the character limit. Should we an option to accept global \newcommands or something else? A simple $\usefrom{postid}{commandname}$, e.g. $\usefrom{337971}{curl}$ could also work, though that'd probably be a hassle to implement...

$\endgroup$
7
  • $\begingroup$ I suppose you mean the \curls in your answer and this comment. I currently see them rendered as one would expect (image of post, image of comment), and see no local definitions in either. $\endgroup$
    – user642796
    Apr 6, 2017 at 6:58
  • 1
    $\begingroup$ Are you perchance using Ilmari Karonen's Stack Overflow Unofficial Patch (SOUP), which includes a client-side "fix" to the global definitions bug? (See this meta.math post.) $\endgroup$
    – user642796
    Apr 6, 2017 at 6:59
  • $\begingroup$ @arjafi Oh, I do. Never noticed that "fix" before. Thanks :) $\endgroup$ Apr 6, 2017 at 7:06
  • 1
    $\begingroup$ I'm voting to close this question as off-topic because it's caused by the Stack Overflow Unofficial Patch $\endgroup$ Apr 6, 2017 at 7:07
  • 1
    $\begingroup$ You can just delete your question... $\endgroup$ Apr 6, 2017 at 7:34
  • 7
    $\begingroup$ Well, I don't think it should be closed or deleted. I believe this question might be helpful for other people. $\endgroup$
    – Surb
    Apr 6, 2017 at 9:25
  • 1
    $\begingroup$ Tobias Kienzler and @arjafi: I agree with Surb's comment that it is possible that this question could be useful for other users and it is better to keep it here. In my opinion a better option than closing would be expanding arjafi's comment to an an answer. (In that way when somebody faces the same problem and finds this post, the information will be displayed more prominently.) $\endgroup$ Apr 20, 2017 at 4:10

0

You must log in to answer this question.

Browse other questions tagged .