Skip to main content
29 votes

The scope of \newcommand is the entire page

It pains me to break this thread by fixing the issue, but here we are. :) We are now inserting \begingroup and \endgroup ...
Adam Lear's user avatar
  • 100
27 votes

When is it ok to use \newcommand and \DeclareMathOperator?

I don't think there exist general guidelines. However there are some characteristics of this site and of MathJax that together suggest, at least to me, a certain set of rules: The relevant ...
celtschk's user avatar
  • 43.6k
18 votes

When is it ok to use \newcommand and \DeclareMathOperator?

While celtschk already mentioned this in their answer, I think this deserves highlighting: There is a way to use MathJax macros safely in SE posts: Add ...
Ilmari Karonen's user avatar
13 votes
Accepted

Can custom TeX/MathJax commands be defined by default for a site?

Yes, this is possible. You can run a list of commands in the header of the documents that define a list of macros. I have that on my website, so I can always write ...
Asaf Karagila's user avatar
  • 396k
13 votes

Should titles be included in begingroup..endgroup (similarly as posts and comments)?

Proposal: Defining macros in the titles should be strongly discouraged and we should ask Stack Exchange to add them to blacklisted phrases in the titles.1 This would mean blacklisting: ...
12 votes
Accepted

Is there some way to include some default text quickly in a post?

I'm not certain exactly what you are looking for. There are a few ways which I can see interpreting what you're asking for. How to implement it, or what to use, is going to depend on what you want and ...
Makyen's user avatar
  • 103
12 votes
Accepted

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

A linked question contained some malicious code in the title. I've removed it.
Sera Gunn's user avatar
  • 27.5k
10 votes

Should I fix my 175 posts that use \newcommand without \begingroup?

In my opinion, the obvious solution would be to gradually edit all and only those posts where you have redefined a predefined LaTeX-MathJax command. The reasons are as follows: If anyone wants to ...
user21820's user avatar
  • 59k
6 votes

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

One of the links from Greyes' question is: Simple trig problem- whose URL is actually math.stackexchange.com/questions/885521/renewcommand-tan-sin-renewcommand-arctan-arcsinsimple-trig-problem which ...
Peter Phipps's user avatar
  • 3,076
6 votes

How to define string remap in MathJax

You can define macros in MathJax. As far as I can tell, you cannot use numbers in macro names. For example, this defines a macro called \Rsq which then types $\...
Martin Sleziak's user avatar
4 votes
Accepted

Request for Hyperbolic $ \sech \,x $ inclusion in MathJax

To make my comments into an answer: Firstly, you can define it manually, so \operatorname{sech}(x) renders as $\operatorname{sech}(x)$. A more fancy way is to put <...
user1729's user avatar
  • 31.3k
3 votes

Defining New Commands Renders As Empty Space

This seems to work. It's a bit ugly, but still.
fweth's user avatar
  • 3,574
3 votes

Is there some way to include some default text quickly in a post?

As an alternative to the Clipboard Managers mentioned by Makyen: Many people these days have a password manager. If it can autotype based on the active window and copy into the clipboard, it can take ...
Sudix's user avatar
  • 3,705
3 votes
Accepted

The \newcommand question is farfetched, but $\LaTeX$ typing still takes ages

So if I understand your post correctly, the problem you see is that answering takes a long time and the reason is that you don't have macros automatically at your disposal. (Of course, for other users ...
Martin Sleziak's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible