# mathscr tighter space between the letters

I use \mathscr to write a math symbol made of two letter. My problem is that they are slightly far away from each other. Is there any way to bring them slightly more close to each other?

\usepackage{mathrsfs}

\begin{align}
\mathscr{SM}
\end{align}


• since all single letters in math mode are intentionally spaced as if they are one-letter variables, the short answer is, no, it's not possible to get them closer together automatically. however, you can define a control sequence, say \scrSM with explicit backspacing to achieve the spacing you think is appropriate. something like \newcommand{\scrSM}{\mathscr{S\kern-6mu M}}. ("mu" is intended to be "math units"; i may have misremembered the name of the unit, and i am not in a position to check. also, you will probably have to experiment with the number of units; i'm just guessing.) – barbara beeton Oct 10 '17 at 1:18
• 1mu=1/18 em, so -6mu=-1/3 em=\!\!. – Bernard Oct 10 '17 at 1:31
• @Bernard -- while your observation is completely true, i have a sneaky feeling that the "most acceptable" spacing may be something like 6.5mu, in other words, not an integral number of small skips. i can't check this until tomorrow, since i don't have a working tex system on my laptop. – barbara beeton Oct 10 '17 at 1:46
• @barbarabeeton, -6.5mu gives error Illegal unit of measure (pt inserted). but -6mu or -3pt are totally fine. – ar2015 Oct 10 '17 at 3:46
• If you are using mu unit then you must write \mkern, no \kern. This is the reason of the error mentioned above. – wipet Oct 10 '17 at 5:13

You can somewhat reduce the spacing by typesetting the letters as text, rather than math, because TeX will always add the italic correction next to each character in \mathscr, given that the rsfs10 font has the interword space parameter set to zero (like the standard math symbol font): the CLI command

> tftopl rsfs10.tfm


produces a human readable version of the TFM file, which starts with

(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 17517417571)
(FONTDIMEN
(SLANT R 0.707001)
(SPACE R 0.0)
(STRETCH R 0.0)
(SHRINK R 0.0)
(XHEIGHT R 0.233333)
)


and we also find

(CHARACTER C S
(CHARWD R 0.867665)
(CHARHT R 0.7)
(CHARIC R 0.191895)
(COMMENT
(KRN O 177 R 0.3333435)
)
)


so after S almost 2pt are added (the value is multiplied by the design size and the scale factor the font is loaded with). This is even more than the amount the script S protrudes from its bounding box:

As I said, you can typeset the multiletter combination as text:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathrsfs}

\newcommand{\multiscr}[1]{\text{\usefont{U}{rsfs}{m}{n}#1}}

\begin{document}

$\multiscr{SM}\ne\mathscr{SM}$

\end{document}


The italic correction here is not added. If you deem the space to be still too wide, you need to add a kern yourself, say

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathrsfs}

\newcommand{\SM}{\mathscr{S\mspace{-8mu}M}}

\begin{document}

$\SM\ne\multiscr{SM}\ne\mathscr{SM}$

\end{document}