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: section titles as links,turning off in non-htmloutput


---------- Original Message ----------------------------------
From: Doug du Boulay <ddb at R3401 dot msl dot titech dot ac dot jp>
Reply-To: ddb at R3401 dot msl dot titech dot ac dot jp
Date:  Mon, 24 Feb 2003 13:34:25 +0900

>On Monday 24 February 2003 03:37, ed nixon wrote:
>> I may have painted myself into a corner while trying to create some
>> (hopefully) intuitive navigation functionality in a sdocbook article I'm
>> working on. I've added a ULINK element to the TITLE for SECTION. Of
>> course it works as expected and like a charm when I'm generating my html


I have done something similar. I want the title of my book to be a ulink to the official website in the html version. For the pdf version I don't want it to be a ulink. In my pdf dsl customization, I have:

;; *** URLs ***
;; Use of the "url" package for LaTeX
;; Original : dblink.dsl
(element ulink
  (let ((type (attribute-string (normalize "type"))))
    (if (equal? type "htmlonly")
      (sosofo-append
        (process-children)                ;; Wrote the text
      )
      (sosofo-append
        (process-children)                ;; Wrote the text with its format (anchor in HTML)
        (make formatting-instruction      ;; Wrote : " (\url{" + theUrl + "})"
         data: (string-append " (\\url{" (attribute-string (normalize "url")) "})")))
    )
  )
)

Note that I am using the url package. If you are not, just leave the part below "Wrote the text with its..." as it is in the original. In my html customization, the ulink definition is unchanged and the "type" attribute is ignored.

Whenever I want a ulink to be a link in the html I use something like:

<ULINK URL="../" TYPE="htmlonly">My text goes here</ULINK>

In the pdf, "My text goes here" appears in the current font with no extraneous decoration. In the html, it is a hyperlink.

--
Kevin M. Dunn
Professor of Chemistry
Hampden-Sydney College
--


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