5

We can write Cyrillic letter Ш by the following.

%definition of Sha 
\usepackage[OT2,T1]{fontenc}
\DeclareSymbolFont{cyrletters}{OT2}{wncyr}{m}{n}
\DeclareMathSymbol{\Sha}{\mathalpha}{cyrletters}{"58}

How can I write Ж in latex ?

Thank you for your help.

Cf. The following is the first part of my code.

\documentclass[11pt,english]{smfart} 
\usepackage[T1]{fontenc}
\usepackage[english,francais]{babel}
\usepackage{amssymb,url,xspace,smfthm} %Definition of Sha
\usepackage[OT2,T1]{fontenc}
\DeclareSymbolFont{cyrletters}{OT2}{wncyr}{m}{n}
\DeclareMathSymbol{\Sha}{\mathalpha}{cyrletters}{"58}

\usepackage{amsthm} 
\theoremstyle{definition}
\newtheorem{definition}{Definition} 
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Cor} 
\usepackage{amsmath,amssymb,amsfonts,amscd}
\usepackage[dvipdfmx]{graphicx} 
\usepackage{tikz}
\usepackage{enumitem} 
\usepackage{tikz-cd} 
\usepackage{mathtools}
\tolerance 400 \pretolerance 200

2 Answers 2

11

You run, from a terminal, pdflatex nfssfont

This is pdfTeX, Version 3.141592653-2.6-1.40.26 (TeX Live 2024) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/nfssfont.tex
LaTeX2e <2023-11-01> patch level 1
L3 programming layer <2024-03-14>
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/article.cls
Document Class: article 2023/05/17 v1.4n Standard LaTeX document class
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/size10.clo))
No auxiliary output files.

**********************************************
* NFSS font test program version <v2.2e>
*
* Follow the instructions
**********************************************

(/usr/local/texlive/2024/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
Input external font name, e.g., cmr10
(or <enter> for NFSS classification of font):

\currfontname=


*** NFSS classification ***

Font encoding [T1]:

\encoding=OT2
(/usr/local/texlive/2024/texmf-dist/tex/latex/cyrillic/ot2enc.def
(/usr/local/texlive/2024/texmf-dist/tex/latex/base/ot2enc.dfu))
Font family [cmr]:

\family=wncyr
Font series [m]:

\series=
Font shape [n]:

\shape=
Font size [10pt]:

\size=
(/usr/local/texlive/2024/texmf-dist/tex/latex/cyrillic/ot2wncyr.fd)
Now type a test command or \help for help [ \table \bye ]:

\action=
[1{/usr/local/texlive/2024/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] )</us
r/local/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/
local/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb></usr/loc
al/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></usr/loca
l/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb></usr/local
/texlive/2024/texmf-dist/fonts/type1/public/amsfonts/cyrillic/wncyr10.pfb>
Output written on nfssfont.pdf (1 page, 86081 bytes).
Transcript written on nfssfont.log.

When after = there's nothing, it means you hit “return”. Now preview the PDF that has been produced.

enter image description here

Now you can easily find the required information: the character “Zhe” is at slot "11.

\documentclass[11pt,english]{smfart} 
\usepackage[OT2,T1]{fontenc}
\usepackage[english,francais]{babel}
\usepackage{url,xspace,smfthm}
%\usepackage{amsthm}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{mathtools}
%\usepackage{amscd}% <--- why?
\usepackage[dvipdfmx]{graphicx}
\usepackage{tikz}
\usepackage{tikz-cd} 
\usepackage{enumitem} 

\DeclareSymbolFont{cyrletters}{OT2}{wncyr}{m}{n}
\DeclareMathSymbol{\Sha}{\mathalpha}{cyrletters}{"58}
\DeclareMathSymbol{\Zhe}{\mathalpha}{cyrletters}{"11}

\theoremstyle{definition}
\newtheorem{definition}{Definition} 
\newtheorem{lem}{Lemma}
\newtheorem{cor}{Cor} 

\begin{document}

$\Sha+\Zhe$

\end{document}

I don't think you should load amsthm, because sfmthm does the same job. I also reorganized the preamble to have packages first and settings later: it's better maintainable this way and you can more easily spot duplicate calls (you had a few).

enter image description here

0
11

With lualatex you can use the characters as usual:

\documentclass[]{article}
\usepackage{libertinus}
\begin{document}
    
 Ш Ж \textsl{Ш Ж}

\end{document}

enter image description here

4
  • I added \usepackage{libertines}, but I cannot output Ж. I'm using overleaf. Apr 21 at 6:45
  • 2
    You have to remove all the old packages like fontenc and also use` lualatex` as compiler (from the menu). I have no problem with my example code on Overleaf.
    – user187802
    Apr 21 at 7:29
  • 2
    Is it impossible to write the latter in pdflatex ? Apr 21 at 7:37
  • 2
    If possible, I want to write \Sha as usual, and want to write Ж in pdflatex. Apr 21 at 7:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .