This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Footnote and ulink's in Acrobat Reader PDFscreated by openjade


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]