# Japanese and Cyrillic text side by side

I want to write a document in Latex containing Japanese and Cyrillic characters. I have tried many example documents, but so far all have either failed to compile, or have compiled without the Japanese and Cyrillic text appearing.

Any of the sample documents here, for example, will not compile properly: Japanese and Russian Characters in the same Document

Should TeXworks be able to compile these immediately after installation, or is there something else necessary that I am missing?

• Are you compiling with XeLaTeX or LuaLaTeX? – Werner Jul 11 '14 at 23:32
• What did the error message read when the compilation failed? – a user Jul 11 '14 at 23:48
• As for the examples in the link above, all of them compile but the resulting pdf only has the English characters (in LuaLaTex and XeLaTex). – Ben Jul 14 '14 at 0:12
• Perhaps I was only having compiling issues before I knew to use LuaLaTex or XeLaTex instead of pdfLatex; I am having difficulty finding examples with compiling issues now. – Ben Jul 14 '14 at 0:17
• @initialsbd: The examples in the link above use old CJK support which needs pdfLaTeX or LaTeX+Dvips to compile. – Leo Liu Jul 26 '14 at 14:42

Here is a full example using XeLaTeX:

% !TEX program = XeLaTeX
% !TEX encoding = UTF-8
\documentclass{article}

% Setting up Latin and Cyrillic fonts
\usepackage{fontspec}
\setmainfont{CMU Serif}
\setsansfont{CMU Sans Serif}
\setmonofont{CMU Typewriter Text}

% Setting up Japanese fonts
\usepackage{xeCJK}
\setCJKmainfont{ipam.ttf}
\setCJKsansfont{ipag.ttf}

% Side by side
\usepackage{paracol}

\begin{document}

\title{日本語 and Русский side by side}
\author{Leo Liu}
\maketitle

% I know nothing about Russian and Japanese, these are meaningless sentences.
\begin{paracol}{2}

\switchcolumn
Я научился кататься на велосипеде, когда мне было шесть лет.
\switchcolumn*

\switchcolumn
Я научился жить без неё.
\end{paracol}

\end{document}