OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: Problems with paras in proper handling of admon graphics


Hi,

Yesterday I posted around a DSL function to handle admon graphics in a 
much better way to handle admon graphics.

It turns an admon into a table and allows me to position the graphic 
much better WRT to text along side of it.

However, I have a problem with multiple para's in an admon.

I can't seem to get %para-sep% space between paras, which makes it look 
ugly.

Here is what I currently have. Can anyone see the problems?

(mode admon-para-mode
   (element para
     (make display-group
       space-before: %para-sep%
       space-after: %para-sep%
       (literal "PARA")
       (process-children))))

; Make admon graphics look better ...
(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$)))
;        (paras     (node-list-first
;                    (select-elements (children (current-node))
;                                     (normalize "para"))))
          (f-child   (node-list-first (children (current-node))))
          (r-child   (node-list-rest (children (current-node)))))

     (make display-group
       space-before: %block-sep%
       space-after: %block-sep%
       (make table
	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
             (with-mode admon-para-mode
               (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



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC