29

I am currently writing a paper where I mention the R programming language. I've seen some papers use a special symbol for R, but I can't figure out how to get it. Here's an example.

How do I get that symbol?

0

3 Answers 3

39

It is just \textsf{R}, or even \textbf{\textsf{R}}

3
  • Thanks that works! I am getting a font warning when I use this in a section title although the symbol is properly rendered, is there any way to fix it?
    – wizplum
    Mar 27, 2013 at 16:08
  • 2
    Presumably because you configure your titles in such a way that the combination does not make sense. In most cases these font warnings can be ignored. For instance, there is most likely no sans serif small caps.
    – daleif
    Mar 27, 2013 at 16:51
  • Thanks! An old thread on R-help said it should be a standard serif font (i.e., \newcommand{\R}{R}), but \textsf{R} is what I'm used to seeing. I don't think I have seen \textbf{\textsf{R}} anywhere, though.
    – Nagel
    Dec 20, 2019 at 13:59
4

You can download the R logo from here and then include the following line in your preamble:

\newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.png}}

Then you can just write wherever you want:

\Rlogo

And the result should look like the following:

enter image description here

For additional info: here.

Good luck!

2
  • Nice try! ;) however you specify a fixed height, but the font size may change May 7, 2020 at 8:18
  • 1
    Yes, it's not an ellegant way to do it but in most cases - at least in academic journals - this way you can solve it just fine. Besides, you can easily include the official link to R: href{r-project.org}{\Rlogo} May 12, 2020 at 8:38
0

Another idea is to use the fontsawesome5 package with \faRProject.

A minimal example should be:

\documentclass{article}
\usepackage{fontawesome5}

\begin{document}

\faRProject

\end{document}

This link should be also interesting to revise if fontawesome5 package is not available

3
  • 2
    To make this answer more acceptable, please provide an example showing the output. The command you cite isn't shown in the documentation posted on CTAN. Jul 15, 2020 at 14:28
  • @barbarabeeton The \faRProject command is documented page 30 of fontsawesome5.pdf. Jul 15, 2020 at 14:52
  • @PaulGaborit Barbara mentions in chat (she's having some system errors on the site) that she looked in the wrong fontawesome manual (without the 5), but it is still best to include an image to the answer
    – daleif
    Jul 15, 2020 at 17:03

You must log in to answer this question.

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