bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bad PDF bookmarks with "active" characters


From: Bob Wilson
Subject: bad PDF bookmarks with "active" characters
Date: Sat, 27 Apr 2002 21:07:13 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020310

I recently started using texinfo.tex from texinfo version 4.2, and I discovered a problem in the PDF bookmarks generated by pdftex. If the bookmark text contains certain "active" characters, you get funny TeX macros in the bookmark. This shows up, for example, in the GNU binutils document for the chapter entitled "c++filt". To test the extent of the problem, I renamed this chapter "c++filt\~^_|<>$".

Here is what I got for the bookmark text when using the pdftexinfo file from RedHat 6.2 (labelled as version 1999-03-26.17):

c++filt{\}penalty @M ^_|<>$

Not too bad -- the backslash and tilde didn't come out right but everything else is OK.

Now here is what I get with version 4.2 of texinfo:

address@hidden address@hidden address@hidden@char address@hidden@char address@hidden@gtr}$

Only the underscore and dollar are not messed up. The plus characters are obviously the biggest problem since those appear in the original document.

My TeX skills are rather limited. I managed to come up with a patch to fix the plus characters, but it bothers me that it isn't consistent with the existing hacks to handle underscores and braces and that it doesn't handle the other characters. It seems like it would be much better to solve this problem in a general way, but I have no idea how to do it. Anyway, here is my patch.

*** texinfo.tex.orig    Sat Apr 27 20:56:08 2002
--- texinfo.tex Sat Apr 27 21:00:43 2002
***************
*** 989,994 ****
--- 989,995 ----
        \closein 1 
        \indexnofonts
        \def\tt{}
+       \catcode`+=\other
        \let\_ = \normalunderscore
        % Thanh's hack / proper braces in bookmarks  
        \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace

reply via email to

[Prev in Thread] Current Thread [Next in Thread]