Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [newcommand]

For questions related to defining own macros (using \newcommand and similar commands) in MathJax.

13
votes
2answers
450 views

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

Recently SE.QuantumComputing started private beta (bit of a misnomer, as users can join freely), and we started a $\mathrm{\TeX}$-tutorial Meta discussion like the one found here at SE.Math. Since ...
21
votes
1answer
495 views

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

A little over 4 years go I discovered that MathJax supports the $\LaTeX$ command \newcommand, and started to use it in my own answers and questions: this makes ...
2
votes
0answers
97 views

\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" ...
44
votes
2answers
1k views

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

As some of you may know, you can use \newcommand and \DeclareMathOperator to create new TeX macros. For example, ...
1
vote
0answers
140 views

MathJax no longer respects `\newcommand` definitions from questions in other posts

In a question of mine I used e.g. $\newcommand{curl}{\operatorname{curl}}$ to define $\curl$ being rendered as $\newcommand{curl}...
46
votes
4answers
2k views

The scope of \newcommand is the entire page

LaTeX on this site supports \newcommand and \renewcommand. This is very nice, but I noticed that the scope of these definitions ...