1

I know that a standard way of defining the real number system in LaTeX is via a command in preambles as:

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

Is there any better way using some special fonts? Your help is appreciated. I need this command for writing my control lecture notes. Thanks..

An user here suggested to me to post some image of the symbol \R as needed. Hence I added an image, thanks.. The Symbol R

6
  • 2
    that is using a special font, what is your actual question? There are lots of available fonts just as there are for any other font choice, no one is better than another. The markup is \mathbb{R} in any case the choice of actual font is elsewhere, just as \mathbf{R} gives a bold R in whatever font is set up for bold. Mar 23, 2022 at 9:05
  • 1
    What kind of output are you looking for? (if you already have e.g. an image of the desired resulting character, just includegraphics it in.)
    – user202729
    Mar 23, 2022 at 9:10
  • I like to know if the looks of \R can be made better with the help of some special fonts? Thanks..
    – Dr. Sundar
    Mar 23, 2022 at 9:10
  • Maybe look through tex.stackexchange.com/questions/58098/… or Which OpenType Math fonts are available? - TeX - LaTeX Stack Exchange and pick one that looks good.
    – user202729
    Mar 23, 2022 at 9:12
  • 5
    "better" is entirely subjective, you are asking if blue can be made better by choosing green, you could ask the same question about every letter in the document. Font choice does not usually make sense looking at one letter at a time, you need to choose a harmonising set for the whole document. If the rest of your document is sans serif you may want to choose a double struck sans serif font, if you are using a math font based on times you may want a double struck times based font, .... If you have the R you showed in a digital form such as a PDF you can probably use exactly that font Mar 23, 2022 at 9:26

2 Answers 2

1

The real symbol R of your first image is given from TeX Gyre DejaVu Math, version=dejavu; see this example in LuaLaTeX.

\documentclass[12pt]{article}
\usepackage{unicode-math}
\setmathfont{TeX Gyre DejaVu Math}[version=dejavu]

\newcommand{\R}{\mathbb{R}}
\begin{document}

\mathversion{dejavu}  $\R$

\end{document}

enter image description here

0

I found an easy way to do it and I like to share it with all..

A good solution is to define a new command in the preamble:

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

There is no need to put \R under $ ... $ in this command.

I tested it and the result suits my needs of writing notes..

\documentclass[12pt]{article}
\newcommand{\R}{\ensuremath{\mathbb{R}}}

\usepackage{pxfonts}

\begin{document}

 \R   - The real number system

\end{document}  

enter image description here

1
  • 2
    \ensuremath isn't really recommended, and doesn't help here, you will lose a space after \R (as your image shows) so you would need \R\ in which case it is as easy to use $\R$ and not use \ensuremath in the definition. The pxfonts version you show is fine if you like it but absolutely nothing like the R you showed in the question, it just has a stroke on the left, no one would suggest that given your sample R image which doubles the curve and the stroke at the right as well. Mar 23, 2022 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .