I realize similar questions have been asked before but I am not satisfied with any of the answers I've seen. I would like to use the Cyrillic letter Ш to denote a particular group in mathematics. Most solutions involve using OT2 or T2A encoding; for example, at http://math.berkeley.edu/~vojta/tex/samp-l/sha.html. However, this makes the other text in the document look bad.

For example, using the solution above, I get

enter image description here

while I would like to have

enter image description here

The first seems to be shaded strangely and the characters don't seem to align right.

Does anyone know how I can write the character Ш (in math mode) without changing the default font for the rest of the text?

  • Welcome to TeX.SX! Did you see tex.stackexchange.com/questions/14633/…? The "shading" is probably due to the fact that you don't have the Type1 Cyrillic font. What TeX distribution are you using? – egreg Jul 19 '13 at 20:13
  • @egreg Hi egreg, I did see that but I'm not completely satisfied. I would really like to use the default text, and the code there changes it to something quite like the first image. I am using MikTeX 2.9. Thank you! – user33931 Jul 19 '13 at 20:17
  • The quality of the image is not really good. Can you add a minimal example of code? – egreg Jul 19 '13 at 20:18
  • @egreg I am using the code from math.berkeley.edu/~vojta/tex/samp-l/sha.html – user33931 Jul 19 '13 at 20:20
  • I don't see any blurring or "shading", both with Vojta's code and mine. Did you install the CM-Super package (for the T2A solution)? I really don't know what MiKTeX package provides the Type1 fonts for OT2. – egreg Jul 19 '13 at 20:27

for someone who wants to use just one or two cyrillic letters in math, in a computer modern setting, the old wncy fonts are still distributed in tex live as part of the amsfonts collection, in type 1 format. (but they don't require use of the amsfonts package.)

this is the recommendation in the ams author faq.

I want to use some cyrillic letters for math variables, but there isn't any LaTeX support for cyrillic in the AMSfonts packages. How do I do it?

The following four lines will load the upright cyrillic font and define \Sh to access the letter "Sha".


The location of a cyrillic letter in the wncyr font can be found by looking at the chart in the AMSFonts User's Guide or at a font chart created by TeXing the file testfont.tex (included in every TeX system).

the user's guide can be accessed with texdoc amsfonts or texdoc amsfndoc.

|improve this answer|||||
  • This is exactly what's done in math.berkeley.edu/~vojta/tex/samp-l/sha.html that the OP linked, with the only difference that the U encoding is used instead of OT2. – egreg Jul 20 '13 at 7:06
  • 4
    @egreg -- true, but this doesn't require fontenc. (some of us still live and work in the "dark ages".) – barbara beeton Jul 20 '13 at 13:41

In a modern TeX installation, and if you want to use any other font, you either want to declare your symbol font in TU/Unicode (where it is in the slot "0448) or, if you are using 8-bit legacy fonts, in the T2A encoding (where it is in slot "F8). This should have character class mathalpha if it should be a letter, or mathop if it is supposed to be typeset like ln x.

Another approach that works regardless of what encoding you use is to wrap an arbitrary text command inside \text from amsmath.


\defaultfontfeatures{Scale = MatchLowercase}
\setmainfont{CMU Serif}[Scale = 1.0]

\newcommand\sh[1]{\ensuremath{\mathop{\text{\normalfont ш}}#1}}

\[ \sh(x), \sh y

Font sample

This is a little more complicated in PDFTeX, but still works transparently with any font. For example, \usepackage{type1ec} to use CM-Super, or \usepackage{cmlgc} to use CM extended, or the font of your choice.

\usepackage[T2A, T1]{fontenc}
\usepackage[utf8]{inputenc} % The default since 2018.

\newcommand\sh[1]{\ensuremath{\mathop{\text{\normalfont\fontencoding{T2A}\selectfont ш}}#1}}

\[ \sh(x), \sh y

PDFTeX font sample

|improve this answer|||||
  • Why does \sh take an argument? That doesn't seem to be necessary at all. – Henri Menke Dec 30 '19 at 3:24
  • @HenriMenke You’re right, you could eliminate it. – Davislor Dec 30 '19 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.