Fonts & Character SetsChange OT1 Font Encoding to another one

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Post Reply
shep
Posts: 6
Joined: Sun Oct 14, 2012 6:39 pm

Change OT1 Font Encoding to another one

Post by shep »

Hello,

I would like to try to typeset in Cyrillic. I would like to use inputenx package. The problem seems to be related to OT1 encoding. I think I need T2A. How can I activate it?

The typical error I get is

Code: Select all

! LaTeX Error: Command \dh unavailable in encoding OT1.
And my typical preamble, the one I test at this moment is

Code: Select all

\documentclass[article, 12pt]{article} %dvips,elsarticle
%\usepackage[T2A]{fontenc}
\usepackage[cp858]{inputenx}
\usepackage[english]{babel}%

Cheers,
shep

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
shep
Posts: 6
Joined: Sun Oct 14, 2012 6:39 pm

Change OT1 Font Encoding to another one

Post by shep »

Hi, I've got some news. I m getting no more error messages using this preamble.

Code: Select all

\documentclass[article, 12pt]{article} 
\usepackage[ukrainian,english]{babel}%,ukranian
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenx}
But, I've got no any text output: the article is in Latin so far, but the title and the authors are in Cyrillic. So in PS and PDF outputs I've got only math formulas visible, but no text, no cites, nothing. Any ideas what may be wrong?


Thanks,
shep
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

Change OT1 Font Encoding to another one

Post by justdeath »

Hello, shep.

You should use the inputenc package like this:

Code: Select all

\documentclass[10pt, a4paper]{article}
\usepackage{cmap}
\usepackage[T1, T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english, bulgarian]{babel}

\begin{document}
Some text on English. Някакъв текст на български.
\end{document}
That is, if you use the UTF-8 encoding. Otherwise replace it by the required encoding and make sure the file is encoded like this - use Notepad++ or Notepad2 to check.

The cmap package allows for Adobe Reader to search the document in Cyrillic.

Also, I have read somewhere that this is the preferred loading order: fontenc, inputenc, babel.

Lastly, the main language *must* be loaded last. That is, if you want table of contents, chapter, etc on your language, you should use babel like this:

Code: Select all

\usepackage[english, bulgarian, ukrainian]{babel}
jd
Post Reply