# Why doesn't my italics work?

Why doesn't my XeLaTeX document turn this word into italics? I simply can't figure it out.

\documentclass[12pt,letterpaper]{article}
\usepackage{ifpdf}
\usepackage{mla}
\usepackage[T2A]{fontenc}
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\singlespacing
\usepackage{endnotes}
\usepackage{hyperref}
\begin{document}
\emph{hi}
\end{document}

-
Using \usepackage{fontspec} works for me. –  Harish Kumar Dec 14 '12 at 2:20
You should never load the inputenc package with XeTeX or LuaTeX. You should also not likely be loading the fontenc package unless you know what you're doing. Use fontspec instead. See Using XeLaTeX instead of pdfLaTeX. –  Alan Munn Dec 14 '12 at 2:20
@AlanMunn Looks like the basis of an answer to me :-) –  Joseph Wright Dec 14 '12 at 8:53

Let's see why it doesn't work.

The mla package says \usepackage{times} (which is not recommended), so that the default font family is, in LaTeX jargon, ptm, which corresponds to Times.

However, the Times font family that's chosen in this way has no cyrillic version, so when you typeset your document you get

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


Since no font in the T2A (cyrillic) encoding is defined for the ptm family, LaTeX switches to the default. This happens at \begin{document}. When\emph is found, the following message is issued

LaTeX Font Warning: Font shape T2A/ptm/m/it' undefined
(Font)              using T2A/ptm/m/n' instead on input line 11.


and the reason is just the same: no T2A encoded italic font exists in the T2A family.

If you want to use the standard Computer Modern fonts for your document, just say, after \usepackage{mla},

\renewcommand{\sfdefault}{cmss}
\renewcommand{\rmdefault}{cmr}
\renewcommand{\ttdefault}{cmtt}


and don't use XeLaTeX. With pdflatex you must remember to add

\usepackage[utf8]{inputenc}


if you want to input cyrillic characters directly (or use another input encoding for cyrillic).

With XeLaTeX you don't load fontenc and inputenc. And you have to use fontspec to choose a system font with cyrillic glyphs coverage.

-

You should never load the inputenc package with XeTeX or LuaTeX. You should also not likely be loading the fontenc package unless you know what you're doing. Use the fontspec` package instead. See Using XeLaTeX instead of pdfLaTeX for more details.

-