[Cjk] Re: ERROR: Argument of \HyPsd@GetTwoBytes has an extra }.

Hongyi Zhao hongyi.zhao at gmail.com
Sat Feb 17 12:06:28 CET 2007


>From: Werner LEMBERG <wl at gnu.org>
>Date: 2007-2-16 下午3:47
>Subject: Re: ERROR: Argument of \HyPsd at GetTwoBytes has an extra }.
>To: hongyi.zhao at gmail.com
>> Now, I revise the CASthesis package which is originally written by
>> Ling-Yun Wu <lywu at amt.ac.cn >, in order to use your CJKutf8.sty to
>> generate bookmarks, I revise the following lines in CASthesis.cls
>> file: [...]
>
>Sorry, I don't have time to analyze that in detail -- additionally,
>you've commented out CJKutf8.sty, so I'm not sure what to do.
>
>Please produce an example as short as possible (ideally just a few
>lines) which I can further investigate.

Oops, I don't know why my fetchmail hasn't receive this email
automatically for me, feel so sorry for reply late.

The attached is my example file.  I will describe my new problems in
detail.

The problem I asked for you in the last email have been solved, but I don't knowwhy the problem will disappear just by adjusting the options of ivoking hyperref.  In addition, I also find the new problems in using hyperref with CJKutf8, I describe all of them in the following:

1.  The following lines are the preamble parts of my example file in
the attachment:

=============
\documentclass[12pt,a4paper]{article}
\usepackage{CJKutf8}
\usepackage[T1]{fontenc}
\usepackage[dvipdfm]{hyperref}
\begin{document}
\begin{CJK}{UTF8}{bsmi}
  \tableofcontents
    \hypersetup{unicode=true,CJKbookmarks=false,pdfauthor={赵弘毅},
                  pdftitle={中文 PDF outline 测试}}
=============

I find that there has some conflicts between the invoke options *unicode*
and *CJKbookmarks*, in short, in order to obtain correct chinese
bookmarks with the CJKutf8 and hyperref, the *unicode* must lies in
the *\usepackage* section like this: 

\usepackage[unicode,dvipdfm]{hyperref}

and the *CJKbookmarks* option shouldn't be used at all.

That is, in order to obtain the right chinese bookmarks, I should
write the above preamble lines of my file like this:

===================
\documentclass[12pt,a4paper]{article}
\usepackage{CJKutf8}
\usepackage[T1]{fontenc}
\usepackage[unicode,dvipdfm]{hyperref}
\begin{document}
\begin{CJK}{UTF8}{bsmi}
  \tableofcontents
    \hypersetup{pdfauthor={赵弘毅},
                  pdftitle={中文 PDF outline 测试}}
===================

Furthmore, I have read the hyperref's manual, but I cann't still
understand the above things I described, and in the hyperref's manual,
I cann't find any explains that the option *unicode* cann't be used
with the option *CJKbookmarks* simultaneously.

2.  In my mind, I remember that you have told my that in order to
obtain the right chinese bookmarks, the statemants *\usepackage[T1]{fontenc}* 
should be used, but I find the if I comment out this line in my
example, I can obtain the right chinese bookmarks also. 

Thanks in advance.

---
Hongyi Zhao (赵弘毅)
GnuPG DSA: 0xD108493B

老子道德经:第三章
是以圣人之治:虚其心,实其腹;弱其志,强其骨。
常使民无知无欲,使夫智者不敢为也。
为无为,则无不治。
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utf8pdfbk.tex.tar.bz2
Type: application/octet-stream
Size: 954 bytes
Desc: not available
Url : http://lists.ffii.org/pipermail/cjk/attachments/20070217/09d17221/utf8pdfbk.tex.tar.obj


More information about the Cjk mailing list