How to write this maths symbol below:
I search in enter link description here, but it said \R and $\R$ but is not working.
How to write this maths symbol below:
I search in enter link description here, but it said \R and $\R$ but is not working.
like this ?
\documentclass[10pt]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
$f:\mathbb{R}^{m+1}\rightarrow \mathbb{R}^{q}$
\end{document}
The standard way is to use the package amsfonts and then \mathbb{R} to produce the desired symbol. Many people who use the symbol frequently will make a macro, for example
\newcommand{\R}{\mathbb{R}}
Then the symbol can be produced in math mode using \R. Note also, the proper spacing for functions is achieved using \colon instead of :.
\documentclass{article}
\usepackage{amsfonts}
\newcommand{\R}{\mathbb{R}}
\begin{document}
$f\colon\R^{m+1}\to\R^q$
\end{document}
\colon seems way to small to me. Now, I'm not sure if I've been conditioned by bad practice or what, but a quick explanation or further reading on why that's the correct spacing would be appreciated
– steve
May 26 '20 at 21:04
Like the other answers say, \mathbb{R} is the code for this, and one of the many packages that define it is amssymb. However, that is not always the package you want.
In 2020, I would recommend that you use unicode-math, LuaLaTeX, and the modern toolchain when you can, and 8-bit legacy packages when you have to. It defines more symbols, with more consistency, than is even possible with any combination of legacy packages. Every OpenType math font contains its own version of \mathbb, or you can use any font you want. The list of symbols contains multiple font specimens.
If you do want to use PDFTeX and legacy packages, a good way to load math alphabets is the mathalpha package, which provides a consistent interface with scaling. The manual also has a comprehensive list of the available math typefaces. For other alphabets (such as sans-serif, Greek, bold italic and so on), isomath is an excellent way to load them.
\mathbb{R}you're looking for, included in e.g. the packageamssymb) – steve May 26 '20 at 20:38\mathbb{R}is for handwritten maths (bb = blackboard bold) and that\mathbf{R}is for typeset maths. (Who argued that? Knuth? Halmos? I forgot.) See https://en.wikipedia.org/wiki/Blackboard_bold . Perhaps it was Serre. – lhf May 26 '20 at 21:28\mathbbisn't all that easy to find in that question. Detexify only offers dsfonts; the Comprehensive Symbols List shows only "ABC" fromamsfonts. Those references are great for real symbols, but not for various alphabet styles. A better source is needed for math alphabets. (Although this is a duplicate, having been asked many times before, if one doesn't know that this is "blackboard bold", a good dup is hard to find. – barbara beeton May 27 '20 at 01:56