1

The following MWE cannot be compiled. You can see the error messages by yourself.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{CJKutf8}
\usepackage{pst-eucl}

\def\kor#1{%
\begin{CJK}{UTF8}{mj}
#1%
\end{CJK}}

\begin{document}
\begin{pspicture}(7,8)
    \pstGeonode[PointName={\kor{지}},PosAngle=90](3,3){A}
    %\rput(3,3){\kor{웅}}
\end{pspicture}

\end{document}

PointName cannot accept CJK characters. How to fix it?

2

CJK package defines CJK symbols as macros. So there are some problems in special cases.

Anyway, you can always use this trick:

\documentclass{article}
\usepackage{CJK}
\usepackage{pst-eucl}
\newsavebox\korbox
\begin{document}
\begin{CJK}{UTF8}{mj}
\begin{pspicture}(7,8)
\sbox\korbox{지}
\pstGeonode[PointName={\usebox\korbox},PosAngle=90](3,3){A}
\sbox\korbox{웅}
\pstGeonode[PointName={\usebox\korbox},PosAngle=90](5,3){B}
\end{pspicture}

\end{CJK}
\end{document}

BTW, you don't need to use CJKutf8 package unless you need \usepackage[utf8]{inputenc}. And you can use CJK environment globally, it's safe.

  • what package do I need to allow the characters to flow from top to bottom instead of the normal (flowing from left to right)? – kiss my armpit May 13 '13 at 1:16
  • @Bugbusters: You can't do that. You should rotate the characters and rotate the page. See Vertical Chinese text with XeTeX – Leo Liu May 13 '13 at 4:12
  • @Bugbusters: For Japanese, there is pTeX which do vertical typesetting well. There're also Korean packages, but I'm not familar with them. – Leo Liu May 13 '13 at 4:18
  • Then when do we need to use \usepackage[utf8]{inputenc}\usepackage{CJKutf8}? And what is the difference between using \usepackage{CJK}... \begin{CJK}{UTF8}{mj}...\end{CJK} and \usepackage[utf8]{inputenc}\usepackage{CJKutf8}...\begin{CJK}{UTF8}{mj}...\end{CJK}? – kiss my armpit Nov 16 '13 at 7:24
  • 2
    @cyanide-basedfood: There are various character encodings used for Chinese/Japanese/Korean. UTF-8 encoding is just one of them. CJK package need to know the encoding of the source file to process the CJK characters properly. – Leo Liu Aug 13 '14 at 2:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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