2

I need to use Cyrillic (russian) monospaced font.

I chose courier and added

\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}
3
  • There's no cyrillic support for pcr family.
    – Leo Liu
    Commented Aug 17, 2012 at 1:18
  • Leo Liu, could you recommend some other mono-spaced font?
    – klm123
    Commented Aug 17, 2012 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. Commented Oct 18, 2012 at 15:26

1 Answer 1

5

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}

result


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.

10
  • I know about verbatim:). I need to draw bold or underlined letters.
    – klm123
    Commented Aug 17, 2012 at 1:27
  • @klm123: I don't understand. You said you need monospaced font, and this is monospaced font. Use \texttt is also OK.
    – Leo Liu
    Commented Aug 17, 2012 at 1:45
  • Can I make some of my text bold in verbatim space?
    – klm123
    Commented Aug 17, 2012 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.
    – Leo Liu
    Commented Aug 17, 2012 at 1:53
  • 2
    @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.
    – Leo Liu
    Commented Aug 17, 2012 at 2:04

You must log in to answer this question.

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