This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
[docbook] Admonitions
- From: "R Sanchez" <reven at reven dot org>
- To: <docbook at lists dot oasis-open dot org>
- Date: Tue, 1 Apr 2003 18:31:38 +0200
- Subject: [docbook] Admonitions
Hi
I've managed to create PDF's with admonitions using the following code
(found on one of Norm's dsssl docs) in a customized style.sheet:
(define %admon-graphics%
#t)
(define admon-graphic-default-extension
".pdf")
(define %admon-graphics-path%
"/usr/share/sgml/docbook/dsssl-stylesheets/images/")
(define ($admon-graphic$ #!optional (nd (current-node)))
(cond ((equal? (gi nd) (normalize "tip"))
(string-append %admon-graphics-path%
(string-append "tip"
admon-graphic-default-extension)))
((equal? (gi nd) (normalize "note"))
(string-append %admon-graphics-path%
(string-append "note"
admon-graphic-default-extension)))
((equal? (gi nd) (normalize "important"))
(string-append %admon-graphics-path%
(string-append "important"
admon-graphic-default-extension)))
((equal? (gi nd) (normalize "caution"))
(string-append %admon-graphics-path%
(string-append "caution"
admon-graphic-default-extension)))
((equal? (gi nd) (normalize "warning"))
(string-append %admon-graphics-path%
(string-append "warning"
admon-graphic-default-extension)))
(else (error (string-append (gi nd) " is not an admonition.")))))
(define ($admon-graphic-width$ #!optional (nd (current-node)))
;; Admonition graphic file width
0.9mm)
The problem is that I get the following output:
AAA
AAA
AAA Remember that a file name must be stated
instead of
AAA
AAA <bold>Notice</bold>
AAA Remember that a file name must be stated
I've checked "dbadmon.dsl" and tried to figure out how it worked. I found
the line
(title? (not (node-list-empty? title)))
and started to play with it. When the line is commented, I get admons
printed without graphic (and several minor errors). So I tried seting the
"title?" variable to true, like:
(title? #t)
And that did it OK. The only problem were "peril" admons, that printed
without any graphic.
Could some one help me with this? Is there a shorter way arround it. I would
like the admon name to print next to the graph and the admon content beneath
it.
Thanks,
Reven
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-help at lists dot oasis-open dot org