0

In an article about defining new commands I saw an example

\newcommand{\R}{\mathbb{R}}

The set of real numbers are usually represented by a blackboard bold capital r: ( \R ).

What do brackets \( and \) do here? Are they required to call user-defined commands? But I am not using any brackets while using built-in commands like

\textbf{commands} 

Can I write my custom command so that I can also use it without any brackets, like

\R

not

\( \R \)
Dims
  • 153
  • 1
    \(...\) is an alternative (newer) syntax for math mode, only available in latex, instead of TeX's $...$. It provides a couple of extra checks. The command \mathbb can only be used in mathmode, so is needed when using this particular macro – Andrew Swann Dec 19 '21 at 11:36
  • Cf. https://tex.stackexchange.com/q/510/15925 – Andrew Swann Dec 19 '21 at 11:45
  • In the general case, you can search for it in the books. This one can be found in the LaTeX unofficial reference manual – user202729 Dec 19 '21 at 12:33

1 Answers1

2

Typing \( \R \) is the same thing as typing $ \R $, and the \mathbf command is allowed only in math mode. Therefore, you will get an error if you use it outside that mode.