The key to the problem is that, when you use CJK
package, you must specify the input encoding and the CJK font family, either using CJK
environment or using \CJKencoding
, \CJKfamily
commands; and you must make sure that you have installed the fonts. (CJK fonts are not always fully installed.)
The different TeX distributions have different CJK fonts installed.
In MiKTeX (as you use), cjk-fonts
package myoungjo
Type1 fonts but there seems no .tfm
files and LaTeX font definition (.fd
) files to support these files. I can't make any working example without modifying the files, sorry.
In TeX Live, with UTF-8 encoding and uhc
font package installed, there is only mj
font family available for Korean. (While gbsn
, gbsn
for Chinese and bsmi
, bkai
for Japanese.)
Here is an example using UTF8
input encoding (differernt from KS
as you used):
% UTF-8 encoding, compile with pdflatex / latex+dvips / latex+dvipdfmx, TeX Live 2012\documentclass{article}\usepackage{CJK}\begin{document}The following should be in Korean\begin{CJK}{UTF8}{mj}안녕하세요\end{CJK}The previous should be in Korean\end{document}
If you use KS
input encoding (standard KS X 1001:1992, KS C 5601-1992, see document CJK.txt
), there are more fonts available, but you may have to install the hlatex-fonts package manually. It is an advanced topic for most users, I won't explain too much here.
There are few English documents about CJK
package and other package supporing CJK scripts, but you may access the TeX groups/forums/sites in China, Japan or Korea to get more information.
I am a Chinese, thus I know very little about native Korean font support in LaTeX. Maybe you can search about HLaTeX. And I know the Korean TeX User Group (KTUG) has their own modified TeX Live distribution with much more Korean fonts pre-installed, and there is HLaTeX. (We Chinese do this too.) You may think about installing these TeX distributions.
As an alternative, you may consider using XeLaTeX with our xeCJK
package. An example:
% UTF-8 encoding, compile with xelatex, TeX Live 2012\documentclass{article}\usepackage[space]{xeCJK} % space option is useful for Korean\setCJKmainfont{Batang} % a Windows font\begin{document}The following should be in Korean안녕하세요The previous should be in Korean\end{document}
Note: xeCJK
is originally designed for Chinese, but also support Japanese and Korean (we hope it will be better). There is indeed a native Korean XeTeX package xetexko
, available on KTUG, but I know nothing about it.