3

Which package has a similar looking fancy R or does anyone know how to make one? (Note: the line underneath the R is just the notebook paper... this is from a scanned set of notes).

enter image description here

  • Where you have seen this symbol? Thank you. – Sebastiano Mar 24 at 19:03
  • 1
    The closest I could find on the web is Lauren Script font, but requires using fontspec. – Bernard Mar 24 at 19:25
  • @Bernard Hello very kind. In fact I don't see any correlation with the classic LaTeX fonts. – Sebastiano Mar 24 at 19:26
  • 1
    No, if you have to use it, it has to be imported. The simplest is via xelatex or lualatex + fontspec. Of course any font can be adapted for use with LaTeX, but it takes quite some tome to do. – Bernard Mar 24 at 19:32
  • 1
    @user2154420...check this: tex.stackexchange.com/a/481251/120578 – koleygr Mar 24 at 19:58
6

My answer is by using tikz (but with simple lines and not fill to add effect of width):

\documentclass{article}
\usepackage{amsmath,amsfonts}
\usepackage{tikz}
\usetikzlibrary{}
\newcommand{\fancyR}{\sbox1{\vbox{R}}\sbox2{\hbox{R}}\tikz[inner sep=0pt,outer sep=0pt]{\coordinate (A);\draw[-,black,line width=0.55pt,scale=0.75]([shift={({\the\wd2/2},0)}]A) to[out=180,in=0] ++(-{\the\wd2/2},{3*(\the\ht1+\the\dp1)/5)}) to[in=90,out=180]++({-\the\wd2/5},{-(\the\ht1+\the\dp1)/8})
to[in=270,out=270]++({\the\wd2/2},{7*(\the\ht1+\the\dp1)/12})
to[in=0,out=90]++(-{7*\the\wd2/20},{3*(\the\ht1+\the\dp1)/12})
to[in=90,out=180]++(-{13*\the\wd2/24},-{11*(\the\ht1+\the\dp1)/12})
to[in=180,out=270]++({3*\the\wd2/12},{-4*(\the\ht1+\the\dp1)/10})
to[in=270,out=0]++({11*\the\wd2/48},{(\the\ht1+\the\dp1)/3})
to[in=300,out=90]++(-{3*\the\wd2/13},{11*(\the\ht1+\the\dp1)/12})
to[in=40,out=120]++(-{6*\the\wd2/10},-{1*(\the\ht1+\the\dp1)/6});
}}
\begin{document}
$\mathbb{R}$R\fancyR{}$R$
\end{document}

Output:

enter image description here

  • 1
    See what happens when you do {\Huge $\mathbb{R}$R\fancyR{}$R$} and then consider using line width=0.06em instead. BTW, you could drop all of the \sbox, \wd and \dp stuff in favor of relative units, see tex.stackexchange.com/a/480818/121799. (And what is \usetikzlibrary{} good for?) – user121799 Mar 25 at 23:08
  • Thanks @marmot... I have already read that post. My idea was the relative height and width too, but didn't thought to use em or ex because I tried to use the actual R's lengths (I know this is not exactly working!). The answer was posted somehow faster than should and I forgot to use line width too in relation with my measured sizes. Of course I could have save the lengths too instead of retyping. I will edit soon. Thanks. (\tikzlibrary{} just left there and loads features about nothing :P ) – koleygr Mar 25 at 23:29
8

In the modern toolchain with unicode-math, you can set any TrueType or OpenType font as your script alphabet (or calligraphic, or a new alphabet). For this example, I downloaded the OTF version of Odelette by Adi Marwah into a subdirectory of my project folder named fonts.

\documentclass[varwidth]{standalone}
\usepackage{unicode-math}

\defaultfontfeatures{Scale = MatchUppercase}
\setmathfont{Latin Modern Math}
\setmathfont[Path = ./fonts/, range = scr]{Odelette.otf}

\begin{document}
\[ \mathscr{R} \subset \mathscr{T} \]
\end{document}

Odelette sample

  • 1
    Upvoted you. :-). In fact to have the similar R we must go out the "classic" font LaTeX using font .ttf or otf. – Sebastiano Mar 25 at 15:49
  • 1
    @Sebastiano Thanks! The R from Stardust Adventure looks even more like the handwriting, but in my opinion Odelette looks pretty reasonable as a math alphabet. It comes down to personal taste. – Davislor Mar 25 at 21:09
  • I always vote positively efforts, what I'm trying to make understand to users of Physics.SE. If you are registered you will find a -5 :-) on my question. Rigid thinking makes me sad. – Sebastiano Mar 25 at 21:17
  • @Sebastiano I don’t believe I’m registered there, but I’ve been on SX communities where, if I tried to actually help a new user, I got flamed for making it harder to efficiently delete and remove “bad questions.” TeX.SX is much friendlier! – Davislor Mar 25 at 21:21
  • I agree with you at the 100%. – Sebastiano Mar 25 at 21:25
6

Here are two fancy R options:

enter image description here

You can consult Table 307: Math Alphabets on page 119 of the comprehensive list for other options.

  • 1
    Looks like mtpro2 curly font to me :-) – Sebastiano Mar 24 at 19:23
  • @user2154420: I posted my answer before koleygr's comment. Your question did not indicate any knowledge of standard sources such as the comprehensive list. If you don't find this answer helpful, fine. But please refrain from insulting me (or other users on this site). We are only trying to be helpful. – Sandy G Mar 25 at 2:35
  • Your message came to me :-( Then I knew just afterwards. But then I read the previous comments that didn't refer to me. I'm not the type to insult or offend. My upvoted. – Sebastiano Mar 25 at 13:00
  • 2
    In fact, none of the alphabets in table 307 of the comprehensive lists contains an "R" with this shape. The mathpro2 curly font (as identified by @Sebastiano) is the closest that I know, but this font is commercial and must be paid for. (And that is the reason it's not in the comprehensive list.) The letter may also be in other commercial fonts that I'm not familiar with. The graphicdesign.stackexchange site might be helpful in this respect. – barbara beeton Mar 25 at 13:40
  • 1
    @Sebastiano: Very wise. Thank you for the advice. Tanti auguri! – Sandy G Mar 25 at 20:20
3

If you could obtain a higher-res image of it, or better still an image in vector format, then this approach would work for most situations. However, it is impervious to things like \textit, \textcolor, etc.

\documentclass{article}
\usepackage{scalerel}
\newcommand\fancyR{\scalerel*{\includegraphics{fancyR}}{R}}
\begin{document}

$ab\fancyR c \scriptscriptstyle ab\fancyR c$

$ y = x^{\fancyR}$

$ab\fancyR c \quad\scriptscriptstyle ab\fancyR c$

$x_{\fancyR} = 0$
\end{document}

enter image description here

  • No Steven :-):-) is very ugly! Bleah :-(. – Sebastiano Mar 25 at 15:51
  • @Sebastiano It is ugly because the original provided by the OP was low resolution. When provided in high resolution, or as a vector image, a much better result ensues: tex.stackexchange.com/questions/224357/… – Steven B. Segletes Mar 25 at 15:53
  • Yeah, I know. You don't have to justify yourself. I was just smiling as each of us tries to do everything possible to get the best for the user. I'm sorry he offended Sandy, however. – Sebastiano Mar 25 at 16:01
  • @Sebastiano No offense was taken. I thought I detected your tongue in your cheek, but wasn't 100% sure. You are right...as it stands, it is very ugly! – Steven B. Segletes Mar 25 at 16:20
  • 1
    @Sebastiano Correct. I am not talking about vectorinzing a rastor image, but rather creating a vector master image, created with lines and arcs, rather than pixels. That or a hi-def rastor image to start with. – Steven B. Segletes Mar 25 at 16:39
3

I prefer this from (mt2pro) (the image is taken from this link https://www.pctex.com/mtpro2.html):

https://www.pctex.com/mtpro2.html

\documentclass[12pt]{book}
\usepackage[mtpccal]{mtpro2}
\begin{document}
\[
\mathcal{R}
\]
\end{document}

If you prefer there is also this font TeX Gyre Pagella Math for the character bit curly R.

enter image description here

\documentclass{article}
\usepackage{unicode-math}
\newcommand{\nR}{\mathversion{Pagella} $\mathscr{R}$}
\setmathfont[version=Pagella]{TeX Gyre Pagella Math}

\begin{document}
\nR
\end{document}
  • Is there a way to define the first R locally? I like it, but I also use the usual mathcal{R} in this document. – user2154420 Mar 28 at 14:46
  • @user2154420 Unfortunately, the first R is a paid character, as the very good barbarian beeton has already written to you. There would be a chance and it works great but it's off-topic here. – Sebastiano Mar 28 at 16:08
3

Apart from the traditional \mathcal{R} and \mathsrc{R} mentioned in other answers (with appropriate packages, of course), consider using xelatex with the font GL-Suetterlin:

image of all the letters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.