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] | [List Home]


Subject: Re: [docbook-apps] admon graphics: GIF vs PNG


Hello Mike and all:

If you want to work with optional extensions for admonition graphics,
the $admon-graphic$  definition should be as it appears in the dbparam
file located in the "print" subdirectory. Here is it:

(define ($admon-graphic$ #!optional (nd (current-node)))
  ;; REFENTRY admon-graphic
  ;; PURP Admonition graphic file
  ;; DESC
  ;; Given an admonition node, returns the name of the graphic that should
  ;; be used for that admonition.
  ;; /DESC
  ;; AUTHOR N/A
  ;; /REFENTRY
  (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.")))))

I don't know why the definition in the "html" subdirectory is different (it
uses the "gif" extension only.

Puts that definition in you customizing parameters file.

Hope this helps.
Best regards,
Juan R. Migoya
Spain

Mike Mueller wrote:

>On Thursday 21 August 2003 04:32, Juan R. Migoya wrote:
>  
>
>>Mike Mueller wrote:
>>    
>>
>
>  
>
>>>2. If I should use the .pngs, then is there a recipe for modifying the
>>>DSSSL?
>>>      
>>>
>>In dbparam.dsl:
>>
>>(define admon-graphic-default-extension
>>".png")
>>    
>>
>
>I tried this and it did not work.
>
>With your help I was able see that dbparam.dsl and the DSSSL in the Cogent 
>reference both contain admon graphics path controls.  Closer inspection of 
>the Cogent file has a comment stating results similar to mine regarding the 
>admon-graphic-default-extension control.
>
>When I changed "warning.gif" to "warning.png" in dbparam.dsl, the warning.png 
>icon was used.
>
>I guess I'll substitute "png" for "gif" in dbparam.dsl unless I'm this is 
>wrong. (I'm doing this in the html version.)
>
>Here is the relevent section from the Cogent reference at
>http://developers.cogentrts.com/cogent/prepdoc/pd-customizingthedssslstylesheets.html:
>
>;; This overrides the default .gif extension for print admontions.
>(define ($admon-graphic$ #!optional (nd (current-node)))
>  (cond ((equal? (gi nd) (normalize "tip"))
> (string-append %admon-graphics-path% "tip.png"))
>((equal? (gi nd) (normalize "note"))
> (string-append %admon-graphics-path% "note.png"))
>((equal? (gi nd) (normalize "important"))
> (string-append %admon-graphics-path% "important.png"))
>((equal? (gi nd) (normalize "caution"))
> (string-append %admon-graphics-path% "caution.png"))
>((equal? (gi nd) (normalize "warning"))
> (string-append %admon-graphics-path% "warning.png"))
>(else (error (string-append (gi nd) " is not an admonition.")))))
>
>;; Identify the default extension for admonition graphics. This allows
>;; backends to select different images (e.g., EPS for print, PNG for
>;; PDF, etc.)  It doesn' seem to be working, so we used the override above.
>(define admon-graphic-default-extension ".png")
>
>  
>
<snip>





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