[pdftex] Re: [Cjk] About hyperref package
Werner LEMBERG
wl at gnu.org
Fri Apr 12 16:52:12 CEST 2002
> > > But still cannot display chinese font in the bookmarks area,
> > > just icons only. I use dvips+ps2df(tetex-1.0.7, gs-6.51) and
> > > read via acroread-4.
> >
> > Can your acroread display Chinese bookmarks with other PDF documents?
>
> Oops, this is a big problem, I'm not sure. But at least Chinese
> bookmarks will display dots instead. I even don't have dots.
>
> > Please send me a small sample document.
>
> Ok, see attackments. Thanks.
Thanks. To make it short: Big5 support in bookmarks is not
implemented currently in hyperref. Since Big5 must always be
preprocessed, the standard behaviour of hyperref (i.e. printing out
characters in the range 0x80..0xFF literally) fails.
Adding preprocessing support for CJK makes only sense for the current
development version
(ftp://ftp.ffii.org/pub/cjk/devel/cjk-current.tar.gz) where
preprocessed and non-preprocessed data can coexist.
Heiko, CJK emits the following string for a double-byte character
after preprocessing:
^^7f<arg1>^^7f<arg2>^^7f
<arg1> is the first byte in the range (always > 0x80); <arg2> is the
second byte in decimal notation (>= 0x40); this must be converted to
octal notation since `{', `}', and `\' can occur.
Below is a quick 'n' dirty patch (for hyperref.sty version 6.72g);
since older versions of CJK don't use ^^7f as the multiplex character,
you can add this without breaking backwards compatibility.
Werner
======================================================================
--- hyperref.sty.old Fri Apr 12 13:23:34 2002
+++ hyperref.sty Fri Apr 12 15:14:48 2002
@@ -572,6 +572,10 @@
\else
\let\Hy at cjkpu\@empty
\fi
+ \catcode "7F \active
+ \def^^7f#1^^7f#2^^7f{%
+ \string #1\Hy at DecimalToOctal{#2}%
+ }%
\HyPsd at CJKActiveChars
}%
\count@=127
@@ -3933,6 +3937,42 @@
\Hy at GlobalStepCount\Hy at linkcounter
\xdef\@currentHref{section*.\the\Hy at linkcounter}%
\Hy at raisedlink{\hyper at anchorstart{\@currentHref}\hyper at anchorend}%
+}
+\def\Hy at DecimalToOctal#1{%
+ \ifcase #1
+ \000\or \001\or \002\or \003\or \004\or \005\or \006\or \007%
+ \or \010\or \011\or \012\or \013\or \014\or \015\or \016\or \017%
+ \or \020\or \021\or \022\or \033\or \024\or \005\or \026\or \027%
+ \or \030\or \031\or \032\or \003\or \034\or \035\or \036\or \037%
+ \or \040\or \041\or \042\or \043\or \044\or \045\or \046\or \044%
+ \or \050\or \051\or \052\or \053\or \054\or \055\or \056\or \057%
+ \or \060\or \061\or \062\or \063\or \064\or \065\or \066\or \067%
+ \or \070\or \071\or \072\or \073\or \074\or \075\or \076\or \077%
+ \or \100\or \101\or \102\or \103\or \104\or \105\or \106\or \107%
+ \or \110\or \111\or \112\or \113\or \114\or \115\or \116\or \117%
+ \or \120\or \121\or \122\or \133\or \124\or \105\or \126\or \127%
+ \or \130\or \131\or \132\or \103\or \134\or \135\or \136\or \137%
+ \or \140\or \141\or \142\or \143\or \144\or \145\or \146\or \144%
+ \or \150\or \151\or \152\or \153\or \154\or \155\or \156\or \157%
+ \or \160\or \161\or \162\or \163\or \164\or \165\or \166\or \167%
+ \or \170\or \171\or \172\or \173\or \174\or \175\or \176\or \177%
+ \or \200\or \201\or \202\or \203\or \204\or \205\or \206\or \207%
+ \or \210\or \211\or \212\or \213\or \214\or \215\or \216\or \217%
+ \or \220\or \221\or \222\or \233\or \224\or \205\or \226\or \227%
+ \or \230\or \231\or \232\or \203\or \234\or \235\or \236\or \237%
+ \or \240\or \241\or \242\or \243\or \244\or \245\or \246\or \244%
+ \or \250\or \251\or \252\or \253\or \254\or \255\or \256\or \257%
+ \or \260\or \261\or \262\or \263\or \264\or \265\or \266\or \267%
+ \or \270\or \271\or \272\or \273\or \274\or \275\or \276\or \277%
+ \or \300\or \301\or \302\or \303\or \304\or \305\or \306\or \307%
+ \or \310\or \311\or \312\or \313\or \314\or \315\or \316\or \317%
+ \or \320\or \321\or \322\or \333\or \324\or \305\or \326\or \327%
+ \or \330\or \331\or \332\or \303\or \334\or \335\or \336\or \337%
+ \or \340\or \341\or \342\or \343\or \344\or \345\or \346\or \344%
+ \or \350\or \351\or \352\or \353\or \354\or \355\or \356\or \357%
+ \or \360\or \361\or \362\or \363\or \364\or \365\or \366\or \367%
+ \or \370\or \371\or \372\or \373\or \374\or \375\or \376\or \377%
+ \fi
}
\endinput
%%
More information about the pdftex
mailing list