This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Handling graphics properly in an admonition
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: Handling graphics properly in an admonition
- From: Richard Sharpe <sharpe at ns dot aus dot com>
- Date: Wed, 18 Jul 2001 23:33:57 +0930
- Reply-to: rsharpe at ns dot aus dot com
Hi,
I finally coded up admonitions as a table, and I get reasonable results.
The only problem is if I have two in a row. I do not get the right
separation between them.
Here is the code:
(define ($graphical-admonition$)
(let* ((adm (current-node))
(title (select-elements (children adm)
(normalize "title")))
(title? (not (node-list-empty? title)))
(adm-title (if title?
(with-mode title-sosofo-mode
(process-node-list (node-list-first title)))
(literal (gentext-element-name adm))))
(graphic (make external-graphic
display?: #f
position-point-y: (+ %bf-size% 2pt)
entity-system-id: ($admon-graphic$)))
(f-child (node-list-first (children (current-node))))
(r-child (node-list-rest (children (current-node)))))
(make table
space-before: %block-sep%
space-after: %block-sep%
table-width: (- %text-width% (inherited-start-indent))
(make table-column
width: ($admon-graphic-width$))
(make table-column
width: 10pt)
(make table-column
width: (- %text-width%
(+ (inherited-start-indent)
($admon-graphic-width$)
10pt)))
(make table-row
(make table-cell
graphic)
(make table-cell
(make line-field
field-width: 5pt
field-align: 'center
(empty-sosofo)))
(make table-cell
(process-children))))))
--
Richard Sharpe, rsharpe@ns.aus.com, LPIC1
www.samba.org, www.ethereal.com, SAMS Teach Yourself Samba
in 24 Hours, Special Edition, Using Samba
------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-apps-request@lists.oasis-open.org