# Producing Script r In LaTeX Expressions

When we have so many letters already, why would one need this fancy little Script r? While typesetting mathematical expressions that govern our (beautiful & elegant) physical universe, often one runs out of symbols and as such, it becomes necessary to use the same letter/character in different styles to convey the intended meaning. Electrodynamics and Gravitation are just a couple such fields that often use – fortunately or unfortunately – a variation of alphabet r, called the script r. I did try to generate this elusive script r in LaTeX for quite a few years and failed miserably every time. However a few days ago, Dr. Cantrell was looking for a way to accomplish the same and as such revived my almost forgotten interest in script r.

### Script r – MS Windows

A little bit of Google-ing led me to a discussion forum. The method described there [included below for completeness sake] works just fine in Microsoft Windows running [a full installation of] MiKTeX and WinEdt.

1 2 3 4 5 6 \usepackage{calligra} \DeclareMathAlphabet{\mathcalligra}{T1}{calligra}{m}{n} \DeclareFontShape{T1}{calligra}{m}{n}{<->s*[2.2]callig15}{}   % A new, shorthand command/macro to generate 'script r' \newcommand{\scriptr}[1]{\ensuremath{\mathcalligra{#1}}}

### Script r – Mac OS

While the code that generates is the same as in Microsoft Windows [MiKTeX/WinEdt], there are few things that ones need to do to get this elusive thing. First off, download the following three files and save them on Desktop.

Open a Terminal and type the following:

mkdir -p ~/Library/texmf/tex/latex mkdir -p ~/Library/texmf/fonts/mf   cp ~/Desktop/calligra.sty ~/Library/texmf/tex/latex/ cp ~/Desktop/calligra.mf ~/Library/texmf/fonts/mf/ cp ~/Desktop/callig15.mf ~/Library/texmf/fonts/mf/   sudo texhash

Once these steps were followed, I was able to successfully compile LaTeX document and generate script r using TeXShop as well as texmaker.

### Script r – Linux

While the code that generates is the same as in Microsoft Windows [MiKTeX/WinEdt], just like in Mac OS, there are few things that ones need to do to get this elusive thing. First off, download the following three files and save them on Desktop [it should, however, be noted that I did a full/maximal installation of Linux (Red Hat Enterprise/CentOS) and as such, LaTeX (with all necessary dependencies) was installed by default].

Open a Terminal and type the following as root:

mkdir -p /usr/local/share/texmf/tex/calligra/ mkdir -p /usr/local/share/texmf/fonts/source/public/calligra/   cp ~/Desktop/calligra.sty /usr/local/share/texmf/tex/calligra/ cp ~/Desktop/calligra.mf /usr/local/share/texmf/fonts/source/public/calligra/ cp ~/Desktop/callig15.mf /usr/local/share/texmf/fonts/source/public/calligra/   texhash

Add the following line to individual user’s .bashrc and source it before proceeding ahead.

## 2 Replies to “Producing Script r In LaTeX Expressions”

1. Harsha says:

How about Xetex? Font inclusion is very simple there

2. Mikl says:

Hey,

This is a great start, in that you can at least get a script r. But, theres no distiction between the bold one and the normal one, which makes it hard to use in physics text, where it usually denotes a vector.

One way to get acces to both a normal script r and a bold one is through the safly-not-open.source mtpro2 fonts.