Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
There's no cyrillic support for pcr family. –  Leo Liu Aug 17 '12 at 1:18
    
Leo Liu, could you recommend some other mono-spaced font? –  klm123 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. –  wasteofspace Oct 18 '12 at 15:26
add comment

1 Answer

up vote 4 down vote accepted

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.

share|improve this answer
    
I know about verbatim:). I need to draw bold or underlined letters. –  klm123 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. –  Leo Liu Aug 17 '12 at 1:45
    
Can I make some of my text bold in verbatim space? –  klm123 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. –  Leo Liu Aug 17 '12 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 Aug 17 '12 at 2:04
show 5 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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