"sh" gets rendered as "7" using OT2

This is from memory (I don't have access to a TeX system at the moment).

In 1982 or thereabouts, I developed the code for the input of Cyrillic according to the transliteration system used by Math. Reviews. The Russian letters represented by multiple Latin letters were implemented as ligatures. Non-Russian letters were implemented as ligatures of one Latin letter plus a digit (I don't remember the MR equivalent, if any).

One letter is represented in transliteration by four Latin letters -- "shch" (I don't have access to a Cyrillic alphabet either at present). This required several ligaturing steps, and to avoid conflicts with "real" letters (there are more letters in the Russian alphabet than in the Latin one), used digits as interim values. So "shc" becomes "7", which, when followed by "h", becomes the intended distinct Russian/Cyrillic letter.

That explains the "7".

The problem described here is the result of the difficulty in planning for the possibility that "sh" can be followed by "c1" in a non-Russian Cyrillic text. It's a situation that can't easily be handled by TeX's ligaturing mechanism, but application of `/' (which explicitly disables ligatures) provides the necessary separation.

I don't believe that this exceptional situation is properly documented in the amsfonts user's guide, which is the canonical reference for this font. (I haven't checked, but in any case, the official policy is that the amsfonts fonts and user's guide will no longer be updated.)


A workaround is to load fontspec and enter your text in Unicode.

\documentclass{article}
\usepackage[paperwidth=10cm]{geometry} % Solely to make the MWE fit on TeX.SX.
\usepackage{babel} % Needed for hyphenation.
\usepackage{fontspec}
\usepackage{microtype} % Allows font expansion.

\babelprovide[import, main]{serbian-cyrillic}

\setmainfont{CMU Serif}[Scale = 1.0,
                        Ligatures = {Common, TeX},
                        Script = Cyrillic,
                        Language = Serbian]

\begin{document}

Овим једначинама се са великом прецизношћу може описати кретање тела
\textbf{при нерелативистичким брзинама,} тј. при брзинама много мањим
од брзине светлости.

\end{document}

CMU Serif Font Sample

The above works with LuaLaTeX in TeX Live 2019. Unfortunately, TeX Live 2018 ships with a broken version of microtype and you will need to apply a workaround to get this example to compile, or comment out the line %\usepackage{microtype} and accept uglier hyphenation.

If you need to use PDFLaTeX for a Serbian document, you will want to load a legacy 8-bit encoding that supports it, either T2A or X2, along with a Type 1 font package that supports the encoding. Otherwise, you’ll get a blurry, mismatched bitmap font. This example selects the CM-super fonts (by loading the T1 encoding) and then Babel for localization and hyphenation:

\documentclass{article}
\usepackage[paperwidth=10cm]{geometry} % Solely to make the MWE fit on TeX.SX.
\usepackage[T1,T2A]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc} % The default since 2018
\usepackage{babel} % Needed for hyphenation.

\babelprovide[import, main]{serbian-cyrillic}

\begin{document}

Овим једначинама се са великом прецизношћу може описати кретање тела
\textbf{при нерелативистичким брзинама,} тј. при брзинама много мањим
од брзине светлости.

\end{document}

CM-super font sample