Questions tagged [newcommand]

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

Filter by
Sorted by
Tagged with
55
votes
5answers
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 ...
46
votes
2answers
2k 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, ...
14
votes
1answer
375 views

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

Question. Is there something which would make possible to quickly include predefined text in a new post I start writing. (For example, some bookmarklet for this - with a bookmarklet, one click could ...
10
votes
2answers
208 views

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 ...
12
votes
2answers
588 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 ...
14
votes
1answer
448 views

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

Not too long ago, a Stack Exchange software was changed in such way that macros defined in a post are valid only inside that post (similarly for comments). It was announced in an answer on this meta: ...
5
votes
1answer
64 views

How to define string remap in MathJax

For example if there is a lot of $R^2$ and $C^2$ in a post, how to map the plain text R2 to $R^2$ only in this post like: ...
1
vote
0answers
154 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}...