ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \pdfannot and \tooltip won't work with Chinese characters
@ 2007-04-11  4:51 Zhichu Chen
  2007-04-13  6:24 ` Zhichu Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Zhichu Chen @ 2007-04-11  4:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 792 bytes --]

Hi everybody,

Since \inmargin won't break through pages and I've tried everything but
still can't make it, I bended. Now I want to comment some words with
\pdfannot. It seems that this command don't support Chinese very well, the
annotations appeared like "lookaheaduchar 73" and something. Then I turned
to \tooltip, and this time it showed nothing.

Can anybody help me?

-- 
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
----------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 1400 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \pdfannot and \tooltip won't work with Chinese characters
  2007-04-11  4:51 \pdfannot and \tooltip won't work with Chinese characters Zhichu Chen
@ 2007-04-13  6:24 ` Zhichu Chen
  2007-04-17 11:31   ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Zhichu Chen @ 2007-04-13  6:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1552 bytes --]

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.


On 4/11/07, Zhichu Chen <zhichu.chen@gmail.com> wrote:
>
> Hi everybody,
>
> Since \inmargin won't break through pages and I've tried everything but
> still can't make it, I bended. Now I want to comment some words with
> \pdfannot. It seems that this command don't support Chinese very well, the
> annotations appeared like "lookaheaduchar 73" and something. Then I turned
> to \tooltip, and this time it showed nothing.
>
> Can anybody help me?
>
> --
> 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
> ----------------------------------------------------------------
>



-- 
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
----------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 3261 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \pdfannot and \tooltip won't work with Chinese characters
  2007-04-13  6:24 ` Zhichu Chen
@ 2007-04-17 11:31   ` Hans Hagen
  2007-04-17 12:52     ` Zhichu Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2007-04-17 11:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \pdfannot and \tooltip won't work with Chinese characters
  2007-04-17 11:31   ` Hans Hagen
@ 2007-04-17 12:52     ` Zhichu Chen
  2007-04-17 13:02       ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Zhichu Chen @ 2007-04-17 12:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2069 bytes --]

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
----------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 4042 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \pdfannot and \tooltip won't work with Chinese characters
  2007-04-17 12:52     ` Zhichu Chen
@ 2007-04-17 13:02       ` Hans Hagen
  2007-04-18  0:41         ` Zhichu Chen
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2007-04-17 13:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Zhichu Chen wrote:
> 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.
just patch spec-fdf 

i changed it here so it will be in the next release 

(which reminds me that for luatex i need to make a driver file dealing with such issues) 

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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: \pdfannot and \tooltip won't work with Chinese characters
  2007-04-17 13:02       ` Hans Hagen
@ 2007-04-18  0:41         ` Zhichu Chen
  0 siblings, 0 replies; 6+ messages in thread
From: Zhichu Chen @ 2007-04-18  0:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2214 bytes --]

Hi, Hans

It may be useless, but I really hope I can pass some options to the comment.
e.g., use \comment[color=blue][title]{some contents} will make "some
contents" blue. So I think we can use /RC instead of /Contents.


On 4/17/07, Hans Hagen <pragma@wxs.nl> wrote:
>
> Zhichu Chen wrote:
> > 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.
> just patch spec-fdf
>
> i changed it here so it will be in the next release
>
> (which reminds me that for luatex i need to make a driver file dealing
> with such issues)
>
> 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
----------------------------------------------------------------

[-- Attachment #1.2: Type: text/html, Size: 3944 bytes --]

[-- Attachment #2: Type: text/plain, Size: 139 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-04-18  0:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-11  4:51 \pdfannot and \tooltip won't work with Chinese characters Zhichu Chen
2007-04-13  6:24 ` Zhichu Chen
2007-04-17 11:31   ` Hans Hagen
2007-04-17 12:52     ` Zhichu Chen
2007-04-17 13:02       ` Hans Hagen
2007-04-18  0:41         ` Zhichu Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).