5

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.

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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