From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/34309 Path: news.gmane.org!not-for-mail From: "Zhichu Chen" Newsgroups: gmane.comp.tex.context Subject: Re: \pdfannot and \tooltip won't work with Chinese characters Date: Tue, 17 Apr 2007 20:52:34 +0800 Message-ID: <769ba7780704170552q23c2872ahb263c8b7852777db@mail.gmail.com> References: <769ba7780704102151j32030d30v9282e3bd9fd91d12@mail.gmail.com> <769ba7780704122324p797ac6f7qed0da9ceb8ba26cb@mail.gmail.com> <4624B00E.8050103@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0330657529==" X-Trace: sea.gmane.org 1176814381 8598 80.91.229.12 (17 Apr 2007 12:53:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Apr 2007 12:53:01 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 17 14:52:54 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1HdnB0-0007ag-He for gctc-ntg-context-518@m.gmane.org; Tue, 17 Apr 2007 14:52:54 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 99E7120253; Tue, 17 Apr 2007 14:52:53 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01477-07-3; Tue, 17 Apr 2007 14:52:46 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 87FED20085; Tue, 17 Apr 2007 14:52:46 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7D57C20085 for ; Tue, 17 Apr 2007 14:52:43 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01477-07-2 for ; Tue, 17 Apr 2007 14:52:39 +0200 (CEST) Original-Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by ronja.ntg.nl (Postfix) with ESMTP id 5EAAB1FD2A for ; Tue, 17 Apr 2007 14:52:39 +0200 (CEST) Original-Received: by wr-out-0506.google.com with SMTP id 36so1873228wra for ; Tue, 17 Apr 2007 05:52:36 -0700 (PDT) Original-Received: by 10.115.110.6 with SMTP id n6mr100218wam.1176814354585; Tue, 17 Apr 2007 05:52:34 -0700 (PDT) Original-Received: by 10.114.103.11 with HTTP; Tue, 17 Apr 2007 05:52:34 -0700 (PDT) In-Reply-To: <4624B00E.8050103@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:34309 Archived-At: --===============0330657529== Content-Type: multipart/alternative; boundary="----=_Part_71561_15238385.1176814354525" ------=_Part_71561_15238385.1176814354525 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Hans, It works. But only the /Contents part was converted correctly, the /T part is still not so good. So I redefined your \doPDFinsertcomment macro and changed the third line from ======================== \doifelsenothing{#1} {\let\PDFidentifier\empty} {\def\PDFidentifier{/T (#1)}}% ======================== to ======================== \doifelsenothing{#1} {\let\PDFidentifier\empty} {\sanitizePDFencoding#1\to\PDFcommenttitle\def\PDFidentifier{/T \ifPDFunicode <\PDFcommenttitle>\else (\PDFcommenttitle)\fi}}% ======================== Now it's OK for me. I hope there's a more clever way that I don't need to copy such long codes to my source file. On 4/17/07, Hans Hagen wrote: > > Zhichu Chen wrote: > > Hi > > > > I've been looking at some core codes and the PDF reference, still have > no > > idea. > > > > Somehow, I was told that LaTeX can do such things using "hyperref" > > package > > and \pdfstringdef\temp{???}, then \pdfannot{... /Contents(\temp) ...} > > should > > be OK. > > > can you try > > \PDFunicodetrue > > Hans > > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- Sincerely yours, Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ---------------------------------------------------------------- ------=_Part_71561_15238385.1176814354525 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Thanks Hans,
 
It works. But only the /Contents part was converted correctly, the /T part is still not so good. So I redefined your \doPDFinsertcomment macro and changed the third line from
========================
   \doifelsenothing{#1}
     {\let\PDFidentifier\empty}
     {\def\PDFidentifier{/T (#1)}}%
========================
to
========================
   \doifelsenothing{#1}
     {\let\PDFidentifier\empty}
     {\sanitizePDFencoding#1\to\PDFcommenttitle\def\PDFidentifier{/T \ifPDFunicode <\PDFcommenttitle>\else (\PDFcommenttitle)\fi}}%
========================
 
Now it's OK for me. I hope there's a more clever way that I don't need to copy such long codes to my source file.
 
 
On 4/17/07, Hans Hagen <pragma@wxs.nl> wrote:
Zhichu Chen wrote:
> Hi
>
> I've been looking at some core codes and the PDF reference, still have no
> idea.
>
> Somehow, I was told that LaTeX can do such things using "hyperref"
> package
> and \pdfstringdef\temp{???}, then \pdfannot{... /Contents(\temp) ...}
> should
> be OK.
>
can you try

\PDFunicodetrue

Hans



-----------------------------------------------------------------
                                         Hans Hagen | PRAGMA ADE
             Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                            | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context



--
Sincerely yours,
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
---------------------------------------------------------------- ------=_Part_71561_15238385.1176814354525-- --===============0330657529== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============0330657529==--