I have just started using latex and I am trying to display Japanese characters on a beamer presentation.
I use Miktex on a Windows 7 OS.
I have tried every possible example file and tutorial that I found using xelatex of pdflatex, installed all sorts of packages to enable Japanese support and downloaded dozens of japanese fonts. After hours of bug-fixing, I always end up with obscure errors leading to unanswered posts on forgotten threads…
In my most successful attempt, I used xelatex with this file ->
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage{CJKutf8}
\begin{document}
\begin{CJK}{UTF8}{min}abc 因子の部屋\end{CJK}
\end{document}
This file doesn't give me error messages, but the output on the pdf file is just "abc" (the japanese is not displayed). I also get this warning:
LaTeX Font Warning: Font shape `OT1/cmss/m/n' in size <4> not available
(Font) size <5> substituted on input line 8.
And nothing else that looks like an error. As I said before, I failed all other foolproof methods/tutorials found here an there on the web (I even crashed my whole PC just by updating a Miktex package), so please be patient with me… Thank you!
EDIT: I don't think this is a duplicate because I tried all that was written in the "duplicate" question and a dozen others before I posted mine, and it did not solve the problem. For the liked "duplicate" example, I got this error message:
Font shape `C70/min/m/n' undefined
Which is apparently because Miktex for windows 7 lacks some font files for ms mincho that I already downloaded and are still not recognized.
Best Answer
This code should work, using TeXworks editor.
Note that I use
\listfiles
command to list all the files included, with file dates and versions. You can check the list produced by your computer, compare it with my list below, to see whether you are using out-of-dateexpl3
orfontspec
packages.If you do use an old package, update it.
For MiKTeX, use the Update utility or Package Manager:
For TeX Live, use TeX Live Manager instead.