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]

Handling graphics properly in an admonition


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


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