Petter Reinholdtsen <p...@hungry.com> wrote:

> Btw, the links in the PDF document have changed for me with this
> change.  Now they have red boxes around the clickable area when I view
> them in okular.  Is this intended?

No, unfortunately this means that the patch ignores the \hyperparam and
\hyperparamadd settings.  Thus let's give it a second try [1] (I'm new
to the area of TeX expansion, I raelly wish TeX would be as easy to
understand as Python is...)

@Petter: Please let me know if it works for you.
@BenoƮt: Please let me know if there is a better / more elegant
         solution.

[1] 
Author: Andreas Hoenen <andr...@hoenen-terstappen.de>
Description: Hotfix for BTS report #683166:
In the PDF document structure don't include chapters after a book part
in the part.
--- a/xsl/part.xsl
+++ b/xsl/part.xsl
@@ -11,6 +11,7 @@
   <xsl:text>%&#10;</xsl:text>
   <xsl:call-template name="mapheading"/>
   <xsl:apply-templates/>
+  <xsl:text>%&#10;\bookmarksetup{startatroot}&#10;</xsl:text>
 </xsl:template>
 
 <xsl:template match="part/docinfo"/>
--- a/latex/style/dbk_hyper.sty
+++ b/latex/style/dbk_hyper.sty
@@ -14,17 +14,23 @@
     \def\hyperparamadd{}
   }{}
   \ifpdf
-    \usepackage[pdftex,plainpages=false,\hyperparam,\hyperparamadd]{hyperref}
+    \usepackage{bookmark,hyperref}
+    \edef\pdfhypersetup{\noexpand\hypersetup{pdftex,plainpages=false,\hyperparam,\hyperparamadd}}
+    \pdfhypersetup
     \def\hyperlabel#1{\hypertarget{#1}{}}
   \else\ifxetex
-    \usepackage[xetex,plainpages=false,\hyperparam,\hyperparamadd]{hyperref}
+    \usepackage{bookmark,hyperref}
+    \edef\xehypersetup{\noexpand\hypersetup{xetex,plainpages=false,\hyperparam,\hyperparamadd}}
+    \xehypersetup
     \def\hyperlabel#1{\hypertarget{#1}{}}
   \else
-    \usepackage[dvips,plainpages=false,\hyperparam,\hyperparamadd]{hyperref}
+    \usepackage{bookmark,hyperref}
+    \edef\dvihypersetup{\noexpand\hypersetup{dvips,plainpages=false,\hyperparam,\hyperparamadd}}
+    \dvihypersetup
     \def\hyperlabel#1{\Hy@raisedlink{\hyper@anchorstart{#1}\hyper@anchorend}}
   \fi\fi
 }{
-  \usepackage{hyperref}
+  \usepackage{bookmark,hyperref}
   \def\hyperlabel#1{}
 }
 
Regards, Andreas
-- 
Andreas Hoenen <andr...@hoenen-terstappen.de>
GPG: 1024D/B888D2CE
     A4A6 E8B5 593A E89B 496B
     82F0 728D 8B7E B888 D2CE

Attachment: pgpbVnazKaSo1.pgp
Description: PGP signature

Reply via email to