This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Re: Footnote and ulink's in Acrobat Reader PDFscreated by openjade
- From: Doug du Boulay <ddb at R3401 dot msl dot titech dot ac dot jp>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Thu, 27 Feb 2003 10:13:42 +0900
- Subject: Re: DOCBOOK-APPS: Re: Footnote and ulink's in Acrobat Reader PDFscreated by openjade
- References: <Pine.LNX.4.33L2.0302260938150.18408-100000@vipe.technion.ac.il>
- Reply-to: ddb at R3401 dot msl dot titech dot ac dot jp
On Wednesday 26 February 2003 16:39, Shlomi Fish wrote:
> On Wed, 26 Feb 2003, Shlomi Fish wrote:
> > On Wed, 26 Feb 2003, Doug du Boulay wrote:
> > > On Tuesday 25 February 2003 17:40, Shlomi Fish wrote:
> > > > Hi!
> > > >
> > > > I'm trying to create nice, functional Acrobat Reader PDFs with
> > > > openjade. (i.e: db2pdf). Now, I get valid PDFs except for the
> > > > following problems:
> > > >
> > > > 1. <footnote>'s are displayed as a number after the text, and I
> > > > cannot find their text anywhere (nor is the number clickable).
> > > I seem to be getting the same results as you. Having looked at your PDF
> > > you will find (as I do) that all your footnotes are at the very end of
> > > the chapter. I haven't checked the stylesheet code yet but I used the
> > > following definition, without success.
Did some googling on this and it seems this may be the best anyone can do via
openjade and jadetex. IIUC the alternative behaviour is a completely separate
section for notes at the end of the document.
Apparently the magic is burried in the tex backend of openjade and accessed via
(declare-flow-object-class page-footnote
docbook.dsl: "UNREGISTERED::Sebastian Rahtz//Flow Object Class::page-footnote")
I think the problem is something to do with having separate flows for body text and
footnotes. There was some mention that you can hack the jadetex PageFootnote
macro, but I don't know tex well enough to even contemplate it.
Maybe someone who knows can actually fill in the details here (please...)?
> > I'm not using any stylesheet (at least not now).
> >
> > > (define %bop-footnotes%
> > > ;; Make "bottom-of-page" footnotes?
> > > #t)
> > >
> > > When you have a hundred odd page chapter and the footnotes all turn up
> > > at the end (and not at bop!), finding where the notes originate from is
> > > rather difficult :-/
> > >
> > > > 2. <ulink>'s are not clickable or marked in blue.
> > >
> > > In case you missed it, Kevin Dunn just posted a fix for that to the
> > > list a few hours ago!
>
> Actually, his fix does the opposite thing - it makes sure a ulink marked
> with htmlonly is not rendered as a ulink in the PDF... And I want my
> ulinks to be hyperlinks in the PDF as well.
>
Ah crap. I misunderstood the latex \url{} command!
ok. did some experimenting.
The following seems to work for me (only in print/tex/ you understand)
(declare-flow-object-class formatting-instruction
"UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")
(element ulink
(let ((type (attribute-string (normalize "type"))))
(if (equal? type "htmlonly")
(sosofo-append
(process-children) ;; Wrote the text
)
(sosofo-append
(make formatting-instruction data: "\\href{" )
(literal (attribute-string (normalize "url")) )
(make formatting-instruction data: "}{" )
(process-children) ;; Wrote the text with its format (HTML anchor)
(make formatting-instruction data: "}" ) )
)
)
)
Then a latex \href{url}{text} seems to rendered in a beautiful shade of puke!
no idea how to change that.
Actually this formatting-instruction instruction is pretty cool because it just
solved another one of my problems - getting an underline on default arguments!
(if default-arg
(make formatting-instruction data: "\\underline{" )
(empty-sosofo) )
.....
(if default-arg
(make formatting-instruction data: "}" )
(empty-sosofo) )
Thanks for the tip Kevin!
Cheers
Doug