bug-texinfo
[Top][All Lists]
Advanced

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

pdf bookmarks still fail in 4.1


From: Werner LEMBERG
Subject: pdf bookmarks still fail in 4.1
Date: Fri, 08 Mar 2002 07:23:19 +0100 (CET)

Due to limited time I only tested 4.0k whether ANSI escapes are
stripped off correctly.

A few weeks ago I sent you an important patch for texinfo.tex to make
bookmarks work correctly for unnumbered sections.  It seems you
haven't received it (otherwise please explain why the patch isn't in
the package), so here is the mail again.  It is very unfortunate that
this is missing in 4.1.


    Werner


======================================================================


Below is a patch relative to \texinfoversion{2001-07-31.06} (coming
with texinfo 4.0d) which fixes problems with pdf bookmark generation.

  . As mentioned earlier, unnumbered [sub[sub]]sections caused
    incorrect bookmarks: The counters for the number of bookmark
    subentries haven't been increased properly.

  . A rather fatal bug was a missing `@' in the definition of
    \pdfmkpgn; all bookmarks links will fail without this fix.


    Werner


PS: Until now I haven't had time to download the latest texinfo
    version for testing the HTML stuff.  BTW, where can I get diff
    files for the archives?

======================================================================

--- texinfo.tex.orig    Tue Jul 31 15:47:00 2001
+++ texinfo.tex Sun Jan 27 10:01:17 2002
@@ -946,7 +946,7 @@
       \pdfrefximage \pdflastximage
     \fi}
   \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}}
-  address@hidden
+  \def\pdfmkpgn#1{#1}
   \let\linkcolor = \Blue  % was Cyan, but that seems light?
   \def\endlink{\Black\pdfendlink}
   % Adding outlines to PDF; macros for calculating structure of outlines
@@ -970,11 +970,11 @@
       \def\chapentry ##1##2##3{}
       \def\unnumbchapentry ##1##2{}
       \def\secentry ##1##2##3##4{\advancenumber{chap##2}}
-      \def\unnumbsecentry ##1##2{}
+      \def\unnumbsecentry ##1##2##3{\advancenumber{chap##2}}
       \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}}
-      \def\unnumbsubsecentry ##1##2{}
+      \def\unnumbsubsecentry ##1##2##3##4{\advancenumber{sec##2.##3}}
       \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}}
-      \def\unnumbsubsubsecentry ##1##2{}
+      \def\unnumbsubsubsecentry 
##1##2##3##4##5{\advancenumber{subsec##2.##3.##4}}
       \input \jobname.toc
       \def\chapentry ##1##2##3{%
         \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}}
@@ -982,16 +982,16 @@
         \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
       \def\secentry ##1##2##3##4{%
         \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}}
-      \def\unnumbsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+      \def\unnumbsecentry ##1##2##3{%
+        \pdfoutline goto name{\pdfmkpgn{##3}}{##1}}
       \def\subsecentry ##1##2##3##4##5{%
         \pdfoutline goto 
name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}}
-      \def\unnumbsubsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+      \def\unnumbsubsecentry ##1##2##3##4{%
+        \pdfoutline goto name{\pdfmkpgn{##4}}{##1}}
       \def\subsubsecentry ##1##2##3##4##5##6{%
         \pdfoutline goto name{\pdfmkpgn{##6}}{##1}}
-      \def\unnumbsubsubsecentry ##1##2{%
-        \pdfoutline goto name{\pdfmkpgn{##2}}{##1}}
+      \def\unnumbsubsubsecentry ##1##2##3##4##5{%
+        \pdfoutline goto name{\pdfmkpgn{##5}}{##1}}
       \input \jobname.toc
     \egroup\fi
   }}
@@ -3592,7 +3592,8 @@
 \def\unnumberedseczzz #1{%
 \plainsecheading {#1}\gdef\thissection{#1}%
 \toks0 = {#1}%
-\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry{\the\toks0}}}%
+\edef\temp{\noexpand\writetocentry{\realbackslash unnumbsecentry%
+  {\the\toks0}{\the\chapno}}}%
 \temp
 \unnumbnoderef
 \nobreak
@@ -3631,7 +3632,7 @@
 \plainsubsecheading {#1}\gdef\thissection{#1}%
 \toks0 = {#1}%
 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsecentry%
-                                    {\the\toks0}}}%
+  {\the\toks0}{\the\chapno}{\the\secno}}}%
 \temp
 \unnumbnoderef
 \nobreak
@@ -3672,7 +3673,7 @@
 \plainsubsubsecheading {#1}\gdef\thissection{#1}%
 \toks0 = {#1}%
 \edef\temp{\noexpand\writetocentry{\realbackslash unnumbsubsubsecentry%
-                                    {\the\toks0}}}%
+  {\the\toks0}{\the\chapno}{\the\secno}{\the\subsecno}}}%
 \temp
 \unnumbnoderef
 \nobreak
@@ -3956,11 +3957,11 @@
       \hyphenpenalty = 10000
       \advance\baselineskip by 1pt % Open it up a little.
       \def\secentry ##1##2##3##4{}
-      \def\unnumbsecentry ##1##2{}
+      \def\unnumbsecentry ##1##2##3{}
       \def\subsecentry ##1##2##3##4##5{}
-      \def\unnumbsubsecentry ##1##2{}
+      \def\unnumbsubsecentry ##1##2##3##4{}
       \def\subsubsecentry ##1##2##3##4##5##6{}
-      \def\unnumbsubsubsecentry ##1##2{}
+      \def\unnumbsubsubsecentry ##1##2##3##4##5{}
       \openin 1 \jobname.toc
       \ifeof 1 \else
         \closein 1
@@ -4022,16 +4023,16 @@
 
 % Sections.
 \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}}
-\def\unnumbsecentry#1#2{\dosecentry{#1}{#2}}
+\def\unnumbsecentry#1#2#3{\dosecentry{#1}{#3}}
 
 % Subsections.
 \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}}
-\def\unnumbsubsecentry#1#2{\dosubsecentry{#1}{#2}}
+\def\unnumbsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
 
 % And subsubsections.
 \def\subsubsecentry#1#2#3#4#5#6{%
   \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}}
-\def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}}
+\def\unnumbsubsubsecentry#1#2#3#4#5{\dosubsubsecentry{#1}{#5}}
 
 % This parameter controls the indentation of the various levels.
 \newdimen\tocindent \tocindent = 3pc



reply via email to

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