[Tex/LaTex] How to adjust the kerning around a forward slash in text

kerningtypography

In contrast to \texttt{typewriter} normal text is "connected". When using a forward slash, I get for y/. this:

y/.

while I would like to get something like that:

y$!$/$!$.

which can be accomplished by y$\!$/$\!$., but this is brute-force. Is there a better way to tell LaTeX to "connect" the forward slash with the adjacent characters?

(For fractions there is \sfrac of the xfrac package, but I do not want to typeset fractions here.)

MWE:

\documentclass{minimal}
\begin{document}
y/.

y$\!$/$\!$.
\end{document}

Best Answer

use of \! may be brute force, but that is what is recommended in the texbook (examples, in math, on p.169; for plain tex, \! doesn't work outside of math, so a negative \kern would be needed).

if this tight spacing were always wanted, a font designer could provide kerning pairs between "y" and slash and between slash and period, but i suspect this is unlikely to be popular.

Update:
As reminded by @Stephen, "LaTeX News", Issue 32, TUGboat 41:3 (2020), p.290 announced that all spaces formerly defined in amsmath were moved to the kernel, and are usable in both math and text. These are

\,    \thinspace
\!    \negthinspace
\: \> \medspace
      \negmedspace
\;    \thickspace
      \negthickspace 
Related Question