30

I've been unable to find a concise answer anywhere else on the web. Since its only a few words, albeit crucial ones, that are in Korean I don't want to have to muck around with HLaTex or deviate from pdfLaTeX that I'm using at the moment.

4 Answers 4

29

Personally, I had a lot of trouble trying to get the CJK package to work. So I went on the KTUG website and found that they use the package kotex.

\documentclass{article}
\usepackage{kotex}
\begin{document}
안녕하세요!
\end{document}

Output

The good part about this was I was able to simply copy and paste hangul from websites into the LaTeX document and it worked fine. I only wanted a few words (my name) as well, so this option might be quicker and easier.

3
  • I was having Package inputenc Error: Unicode character (U+FFFD) (inputenc) not set up for use with LaTeX error. Your answer solved it and saved my time.
    – santobedi
    Commented Mar 19, 2019 at 9:33
  • Works for Mandarin and Japanese too.
    – Paul Jones
    Commented Aug 21, 2020 at 14:18
  • Thank you for your answer Commented Dec 5, 2021 at 20:09
17

You can use the CJK package. A little example (taken from CJKutf8.tex):

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{CJKutf8}
\usepackage[english]{babel}

\begin{document}

\begin{CJK}{UTF8}{mj}

  이 FAQ 은 자주 반복되는 질문과 그에 대한 대답을 간단명료한 양식으로
  모아 엮어졌습니다.

\end{CJK}

This FAQ list was made to summarize some frequently asked questions
and their answers in a convenient form.

\end{document}

7
  • 1
    there are so many different articles around about getting korean to work easily in latex, this worked extremely well and very easily Commented Mar 9, 2012 at 0:43
  • @Gonzalo When I tried to run the code in my machine. It is giving following error ! Font C70/mj/m/n/10/c7=uwmjc7 at 10.0pt not loadable: Metric (TFM) file not fo und.'. Can you suggest me on this. Thanking on advance
    – Ansu
    Commented Jun 24, 2013 at 7:16
  • @Ansu the font is missing in your system. Install it using the package manager of your LaTeX system. Commented Jun 24, 2013 at 14:03
  • @GonzaloMedina One more question What is the name of the package for the korean fonts?
    – Ansu
    Commented Jun 24, 2013 at 22:53
  • @Ansu the package is CJKutf8; your system seems to be missing some metric font file uwmjc7.tfm Commented Jun 24, 2013 at 23:06
1

Found a simpler way.

I had to input only a file name in Korean script (as per computer font name its "Gulim") while rest of the document is in English. Initially I could not get it compiled due to the font not set

What I did was to include as below under the input preamble (you can add the required fonts too in the same way) and yeah my job was done.

\usepackage{xeCJK}  
\setCJKmainfont{SimSun}  
\setCJKsansfont{SimHei}  
\setCJKmonofont{FangSong}  
\setCJKmainfont{Gulim}  

Hope it helps!! Cheers!

1
  • 3
    Why are you defining two \setCJKmainfont commands? Also, you should mention that this solution requires xelatex or lualatex.
    – Alenanno
    Commented Aug 25, 2016 at 10:27
0

In my experience, Will answer works for me.

If you want to install kotex package, you can use this repository URL in Tex Live Manager 2013.

http://ftp.ktug.org/KTUG/texlive/2013/

If you use other version, such as 2011, you can just change the number in URL.

Manual of this answer is written in below page (But written in Korean).

http://faq.ktug.org/faq/ko.TeX/instpack

You must log in to answer this question.