6

OK:

\documentclass[14pt]{extarticle}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{zi4}

\begin{document}
\Huge \texttt{I need only latin here} % I see Inconsolata here
\end{document}

Not OK:

\documentclass[14pt]{extarticle}

\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{zi4}

\begin{document}
\Huge \texttt{I need only latin here}
\end{document}

The latter one differs only in babel option russian and yields strange result: CM font in some bright version.

Any suggestions on how to fix this? (Namely, use both, Inconsolata and russian option for babel.)

PS I'm using TeX Live 2015.

2
  • There's no support for Cyrillic in Inconsolata. Do you only need Latin characters in the monospaced font?
    – egreg
    Jul 31, 2015 at 19:09
  • @egreg yes, I do. Jul 31, 2015 at 19:16

1 Answer 1

10

When the russian option is in force, the output font encoding is set to T2A and there's no support for this encoding with Inconsolata and LaTeX uses a fallback font

LaTeX Font Warning: Font shape `T2A/zi4/m/n' undefined
(Font)              using `T2A/cmr/m/n' instead on input line 8.

If you only need Latin characters in the monospaced font, the best is to define a new command:

\documentclass[14pt]{extarticle}
\usepackage[OT1,T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{zi4}

\newcommand{\latinttfamily}{\fontencoding{OT1}\ttfamily}
\DeclareTextFontCommand{\ltexttt}{\latinttfamily}

\begin{document}
\Huge Спасибо \ltexttt{abc}
\end{document}

One could also redefine \texttt.

enter image description here

0

You must log in to answer this question.

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