I have my document with Russian text. Formerly, it was stored as UTF-8 without BOM and compiled with LaTeX. All worked fine with the following preamble:
\documentclass[11pt,a4paper,final]{moderncv}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\renewcommand{\rmdefault}{cmr} % Шрифт с засечками
\renewcommand{\sfdefault}{cmss} % Шрифт без засечек
\renewcommand{\ttdefault}{cmtt} % Моноширинный шрифт
But some utilities were not able to identify UTF-8 because of BOM absence, so I added it. From now on LaTeX was unable to compile the document, because of BOM. I switched to XeTeX and replaced preamble:
\documentclass[11pt,a4paper,final]{moderncv}
% Resolving "Failed to convert input string to UTF16" error. See http://tex.stackexchange.com/q/66722/24133
\usepackage[unicode,pdfencoding=auto]{hyperref}
\usepackage{polyglossia} %% загружает пакет многоязыковой вёрстки
\setdefaultlanguage[spelling=modern]{russian} %% устанавливает главный язык документа
\setotherlanguage{english} %% объявляет второй язык документа
\setmainfont{CMU Serif} %% задаёт основной шрифт документа
\setsansfont{CMU Sans Serif} %% задаёт шрифт без засечек
\setmonofont{CMU Typewriter Text} %% задаёт моноширинный шрифт
%\renewcommand{\rmdefault}{cmr} % Шрифт с засечками
%\renewcommand{\sfdefault}{cmss} % Шрифт без засечек
%\renewcommand{\ttdefault}{cmtt} % Моноширинный шрифт
But in this case I got several problems:
- Fonts are slightly different
- Italic is missing!
- Quotes
<<
&>>
are not parsed
See image before and after:
How to resolve these issues? I suppose that if I can tell XeTeX to use the same non-unicode fonts as LaTeX, it will help.
Please, advice on all the issues, since I need them all to be fixed.
PS I'm using MiKTeX 2.9 (x64) under Windows 7 (x64).
Update Example for LaTeX, where everything is fine:
\documentclass[11pt,a4paper,final]{moderncv}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\renewcommand{\rmdefault}{cmr}
\renewcommand{\sfdefault}{cmss}
\renewcommand{\ttdefault}{cmtt}
\moderncvstyle{classic}
\moderncvcolor{green}
\name{Михаил \vspace{0.5ex} \\}{Матросов}
\begin{document}
\section{Свои проекты и вклады}
\cvitem{2014}{
\httplink[\textbf{C++ User Group, Russia}]{meetingcpp.ru}, \emph{Докладчик} \newline{}
Доклад \httplink[<<С++ без new и delete>>]{meetingcpp.ru/?p=250}.
}
\end{document}
And example for XeTeX, with the mentioned issues (document body hasn't changed):
\documentclass[11pt,a4paper,final]{moderncv}
% Resolving "Failed to convert input string to UTF16" error. See http://tex.stackexchange.com/q/66722/24133
\usepackage[unicode,pdfencoding=auto]{hyperref}
\usepackage{polyglossia}
\setdefaultlanguage[spelling=modern]{russian}
\setotherlanguage{english}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}
\moderncvstyle{classic}
\moderncvcolor{green}
\name{Михаил \vspace{0.5ex} \\}{Матросов}
\begin{document}
\section{Свои проекты и вклады}
\cvitem{2014}{
\httplink[\textbf{C++ User Group, Russia}]{meetingcpp.ru}, \emph{Докладчик} \newline{}
Доклад \httplink[<<С++ без new и delete>>]{meetingcpp.ru/?p=250}.
}
\end{document}