[Tex/LaTex] How to write kanji characters in the document

cjkmiktex

I'm trying to type some japanese characters in my document. In particular, I'll have to write some movie's name this way:

Godzilla (ゴジラ, Gojira, Ishirō Honda, 1954)

I sadly found out that I just can't write Kanji characters in latex. It appears I have to use the package CJK, but something isn't working and I can't understand how to make it work.

The CJK package seems to be installed in my computer, since if I just type something like this:

\documentclass{article}

\usepackage{CJK}
\usepackage{lipsum}

\begin{document}

\lipsum

\end{document}

It works. If the CJK wasn't there it would give me an error like

File `CJK.sty' not found. \usepackage

The problem is that if I try to paste the example code I find in the CJK documentation, which is the following:

\documentclass{article}

\usepackage{CJK}
\usepackage{pinyin}

\begin{document}
\begin{CJK}{Bg5}{fs}

我很喜歡吃中國飯。
\Wo3 \hen3 \xi3\huan1 \chi1\Zhong1\guo2\fan4.
I like to eat Chinese foodvery much.

\end{CJK}
\end{document}

I get the following errors:

Argument of \CJK@XX has an extra } æå
Paragraph ended before \CJK@XX was complete æå
Argument of \CJK@XX has an extra } æå¾åæ
Paragraph ended before \CJK@XX was complete æå¾åæ
Argument of \CJK@XX has an extra } æå¾åæ­¡åä
Paragraph ended before \CJK@XX was complete æå¾åæ­¡åä
Argument of \CJK@XX has an extra } æå¾åæ­¡å中åé
Paragraph ended before \CJK@XX was complete æå¾åæ­¡å中åé
Argument of \Wo has an extra } \Wo
Paragraph ended before \Wo was complete \Wo

I looked for other discussions and couldn't understand how to just make this work. Also, I'm not interested in that pinyin package that the example suggests; I just need the CJK package so I can type Kanji characters. It may be something related to the encoding, BG5, or the font, but the CJK documentation just says that there are different encodings and fonts, without indicating the codes to use them. This means that I can't try to play with them to see if it's just a matter of encoding and fonts.

I don't have a clue about how to proceed forth, so I'll copy you the message log, which by the way goes wild when I try to compile the document:

Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode
"test".tex

Running miktex-makemf.exe…

miktex-makemf: The ntufsm source file could not be found. Running
hbf2gf.exe…

hbf2gf (CJK ver. 4.8.0) Couldn't find `ntufsm.cfg' miktex-maketfm: No
creation rule for font ntufsm43.

Running miktex-makemf.exe…

miktex-makemf: The ntufsm source file could not be found. Running
hbf2gf.exe…

hbf2gf (CJK ver. 4.8.0) Couldn't find `ntufsm.cfg' miktex-maketfm: No
creation rule for font ntufsm19.

Running miktex-makemf.exe…

miktex-makemf: The ntufsm source file could not be found. Running
hbf2gf.exe…

hbf2gf (CJK ver. 4.8.0) Couldn't find `ntufsm.cfg' miktex-maketfm: No
creation rule for font ntufsm08.

Running miktex-makemf.exe…

miktex-makemf: The ntufsm source file could not be found. Running
hbf2gf.exe…

hbf2gf (CJK ver. 4.8.0) Couldn't find `ntufsm.cfg' miktex-maketfm: No
creation rule for font ntufsm15.

Running miktex-makemf.exe…

miktex-makemf: The ntufsm source file could not be found. Running
hbf2gf.exe…

hbf2gf (CJK ver. 4.8.0) Couldn't find `ntufsm.cfg' miktex-maketfm: No
creation rule for font ntufsm02.

Running miktex-makemf.exe…

miktex-makemf: The ntufsm source file could not be found. Running
hbf2gf.exe…

hbf2gf (CJK ver. 4.8.0) Couldn't find `ntufsm.cfg' miktex-maketfm: No
creation rule for font ntufsm41.

Process exited with error(s)

I also uploaded the log file on 2shared; maybe you can deduce something from it:
http://www.2shared.com/file/hdD5oY4I/test.html

Thank you in advance to anyone who'll help me.

EDIT:

This questions doesn't have anything to do with this other question. While in that case the problem was not having the kanji characters shown properly, in my case I am receiving a big amount of problems related to the CJK packages.

As cfr said, I also found out that the problem may be some missing font. I downloaded the CJK-font package, which is a "fake" package, since it just contains six fonts which I'd have to install manually, via a very complex procedure that the latex manual I've got via the installation doesn't cover properly.

I also found out that MiKTeX should include a ipaex package, as shown here. That package should provide the fonts I need, but if I type a \usepackage{ipaex} it doesn't work (it says it can't find ipaex.sty), nor I can find documentation about what are the actual names or short-names of those fonts, which would allow me to use them by temporarily changing the font family in the document. The same goes for CJK-fonts: it says it can't find cjk-fonts.sty, even though, according to MiKTeX, it's present in the MiKTeX installation since 2004.

So I'm still trying to type those characters, and I have "just" a couple of days to discover how to do so.

Best Answer

an example with xelatex:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{Code2000}
\begin{document}

我很喜歡吃中國飯。
Godzilla (ゴジラ, Gojira, Ishirō Honda, 1954)

\end{document}

The free TrueType font Code2000 is available in the www but you can use any other font with cjk characters.

enter image description here