15

In mathematical writing I often use \ell when I need an 'ell' variable, because l looks like a 1. In fact, I expect this is why the symbol exists :).

Now, it often happens that my \ell stands for (l)eft, and I would like to have a symbol for an 'r' variable that stands for (r)ight.

Is there a simple way to make a cursive looking r?

3
  • 2
    the easiest way would be to find a script font with lowercase letters and a slope compatible with the slope of the \ell. such an alphabet is present in the stix fonts, and i'm sure someone else can identify a few others. unfortunately, most "traditional" script alphabets are too heavily sloped, and the most "common" script alphabets designed for use with tex have only uppercase letters. Aug 28, 2013 at 18:20
  • I'm surprized there is no link to that blog post nor to that post in this thread.
    – Clément
    Apr 8, 2016 at 4:38
  • See @sylvain's answer here: Script-r Symbol Jan 19, 2021 at 10:40

2 Answers 2

10

The "Mathematical Script Small R" is just a Unicode character, so if you can enter it in your editor, and you have a font that includes a suitable representation, then it's as simple as this:

\documentclass[a4paper]{article}
\usepackage{fontspec}
\setmainfont{STIXGeneral}
\begin{document}
small r: 𝓇  there.
\end{document}

I'm using MacVim and xelatex with TexLive 2013 here and I get this

small curly r

On the Mac you can get the symbol from the character viewer. This is the information it gives about it.

𝓇
MATHEMATICAL SCRIPT SMALL R
Unicode: U+1D4C7 (U+D835 U+DCC7), UTF-8: F0 9D 93 87

And if entering the character from the viewer is too laborious you can always define a little macro for it:

\def\arr{\hbox{𝓇}}

(This feels vaguely like something for http://www.talklikeapirate.com/)

4
  • If it is intended for use in maths one shouldn't use \hbox around it but load amsmath and put it inside of \text to get correct scaling etc.
    – Skillmon
    Dec 5, 2019 at 19:33
  • @skillmon, can you put your answer up with a minimum working example? Jan 19, 2021 at 10:19
  • How do you call your \def? Can you provide a minimum working exampe? Jan 19, 2021 at 10:21
  • @MichaelLevy better would be \usepackage{amsmath}\newcommand*\arr{\text{𝓇}} and then you could use it with $d = \pi\arr$ or something like that.
    – Skillmon
    Jan 19, 2021 at 10:57
3

The unicode-math package provides this as either \mathscr{r} or \mscrr. Thruston’s solution of pasting 𝓇 will also work. Any complete math font should contain it.

By default, \mathscr and \mathcal are the same alphabet, so you might want to load a different alphabet from the default as your \mathscr. XITS Math and STIX Two Math, for example, provide one as a stylistic set.

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

\defaultfontfeatures{ Scale=MatchLowercase, Ligatures = TeX }
\setmainfont{XITS}[Scale = 1.0]
\setmathfont{XITS Math}
\setmathfont[range={scr, bfscr}, StylisticSet=1]{XITS Math}

\begin{document}
\(\mathscr{r} \mathcal{r}\)
\end{document}

Script and calligraphic r

3
  • Package: unicode-math 2018/02/02 vv0.8l Unicode maths in XeLaTeX and LuaLaTeX ! unicode-math error: "not-pdftex" ! ! Cannot be run with pdfLaTeX! ! Use XeLaTeX or LuaLaTeX instead. ! ! See the unicode-math documentation for further information. ! ...| LaTeX does not know anything more about this error, sorry. | | Try typing <return> to proceed. | If that doesn't work, type X <return> to quit. |............................................... ) ! Undefined control sequence. Jan 19, 2021 at 10:25
  • 1
    Please advise on why I have received this error. Please speak plainly. Jan 19, 2021 at 10:26
  • 2
    @MichaelLevy You’re using PDFTeX. This code only works in lualatex or xelatex.
    – Davislor
    Jan 19, 2021 at 14:43

You must log in to answer this question.

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