Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Recently i've been involved in writing document in Korean. I've managed to install the hangul package and write the following statement :

\usepackage{hangul} % pretty simple

everything was fine until I tried to print the document I wrote : All the korean characters went like shuffled ascii chars (unreadable indeed). If I try to copy/paste from the pdf to a notepad instance, the character are as if they were printed (therefore something really similar to that : "öÎÇoe¿e@/¾úò¶|ÎÇoD¥2ÎÇoDÐ Wu|{èà" - don't feel insulted).

I'm not used with fontenc and inputenc & co. Where should i focus my figuring-out ?

I have the following settings :

  • MiKTeX 2.9
  • Using TeXstudio
  • My document is UTF-8 (from TeXstudio editor options, not using any statements of input encoding in the document)

The structure of my document is as follow :

\documentclass{article}

\usepackage{hangul}

\begin{document}
안녕, 한국어 이해할 수 있습니까?
\end{document}
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I've finally been using XeTeX to perform the task. That doesn't really answer my question, but as an alternative, I've been using XeLaTeX as the processing program.

I've installed from scratch W32TeX (TeX for Windows) following the installation steps from this link : http://w32tex.org/ .

And after a few little head-knocks, everything works just fine. When I copy/paste characters from the PDF into a basic notepad, the Korean characters are well displayed (it was the main searched-result of my question).

  • My document is UTF-8
  • I compile my .tex file using xelatex command (no extra paramaters) :

    xelatex <filename.tex>

My simplified file looks like :

\documentclass{article}

\usepackage[space]{xeCJK}
\setCJKmainfont{Batang}
\title{한국어 파일}
\date{}
\begin{document}
\maketitle
\end{document}

the result

It compiles with just few warnings in the console (probably for debug verbose as some part of the bundle is continuously in development).

Ps : When I first tried to compile my .tex file, xelatex gave me a warning about fontspec, I don't quite remember what it said but no font were probably loaded so the processed PDF ain't show no Korean character. In order to cache the Korean font of your system you need to write fc-cache -v in the cmd. After that step xelatex outputs the PDF file with no trouble.

Ps.2 : If you want to specify personal folder where your custom or downloaded fonts stand, you need to peek into texmf/font/conf/local.conf and add your folder(s) with the appropriate syntax : <dir>|absolute path|</dir> . Don't forget to cache the font with the latter command!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.