# Cyrillic monospaced font

I need to use Cyrillic (russian) monospaced font.

\usepackage[T1]{fontenc}


and

{\fontfamily{pcr}\selectfont
blabla
}


and that "blabla" is displayed like usual text and there is warning:

LaTeX Font Warning: Font shape T2A/pcr/m/n' undefined using T2A/cmr/m/n' instead on input line 245.


How to fix this? At the end I would like to have cyrillic monospaced font with possibility to write bold or underlined words.

Update

here's minimal non-working example:

\documentclass[a4paper,11pt]{article}
\usepackage[cp1251]{inputenc}
\usepackage[russian]{babel}
\usepackage[T1]{fontenc}

\begin{document}
usual text

русский текст

{\fontfamily{pcr}\selectfont
curier?

курьер?
}

\end{document}

• There's no cyrillic support for pcr family. Aug 17 '12 at 1:18
• Leo Liu, could you recommend some other mono-spaced font? Aug 17 '12 at 1:25
• @klm123: if nothing else, you need \usepackage[T2A]{fontenc} if you want to print russian; your min.ex. has T1, which definitely won't work, despite the cyrillic input coding. Oct 18 '12 at 15:26

There's no cyrillic support for pcr family in TeX distributions. If you want to use Courier fonts in LaTeX, you may use some commercial fonts via XeLaTeX. For example, to use Courier New on Windows, you can use:

% UTF-8 encoding
% Use xelatex / lualatex to compile this
\documentclass{article}

\usepackage{fontspec}
\setmonofont{Courier New}

\begin{document}

\texttt{русский язык}

\end{document}


If you just want to use a monospaced font in LaTeX, you can use default font families. Then pdfLaTeX is sufficient.

% UTF-8 encoding
% Use pdflatex / latex+dvips / latex+dvipdfmx to compile this
\documentclass{article}

\usepackage[T1,T2A]{fontenc}
\usepackage[utf8x]{inputenc}

\begin{document}

% lh font families are used
\texttt{русский язык}

\end{document}


It is also OK if you use inputenc with cp1251 option and save this file in CP1251 encoding.

• I know about verbatim:). I need to draw bold or underlined letters. Aug 17 '12 at 1:27
• @klm123: I don't understand. You said you need monospaced font, and this is monospaced font. Use \texttt is also OK. Aug 17 '12 at 1:45
• Can I make some of my text bold in verbatim space? Aug 17 '12 at 1:47
• @klm123: So you need bold typewriter fonts? It seems cmtt family (and cmvtt and lcmtt) does not have this typeface, but slanted font and italic font are available. (I'll recheck.) Anyway, my first solution using XeLaTeX support bold, italic and bold italic typeface. Aug 17 '12 at 1:53
• @klm123: I hope so. If this help, you may upvote and accept this answer (and all other answers in you previous questions). I noticed you have never upvoted or accepted any answer. Aug 17 '12 at 2:04