If in <programlisting> width="some-value" is specified, it won't be 
rendered the same way having the <programlisting> within <programlistingco> 
as without <programlistingco> as parent: the verbatim font size doesn't get 
smaller with wider widths.


So I changed the following in my print/dbcallou.dsl:


(define ($callout-verbatim-display$ indent line-numbers?)
;aumueller: inserted from dbverb.dsl
   (let* ((width-in-chars (if (attribute-string (normalize "width"))
                             (string->number (attribute-string (normalize "width")))
                             %verbatim-default-width%))
         (fsize (lambda () (if (or (attribute-string (normalize "width"))
                                   (not %verbatim-size-factor%))
                               (/ (/ (- %text-width% (inherited-start-indent))
                                     width-in-chars)
                                  0.7)
                               (* (inherited-font-size)
                                  %verbatim-size-factor%))))
         (vspace (if (INBLOCK?)
                     0pt
                     (if (INLIST?)
                         %para-sep%
                         %block-sep%))))

;aumueller: remove the old stuff
;  (let* ((width-in-chars (if (attribute-string "width")
;                            (string->number (attribute-string "width"))
;                            80)) ;; seems like a reasonable default...
;        (fsize (lambda () (if %verbatim-size-factor%
;                              (* (inherited-font-size) %verbatim-size-factor%)
;                              (/ (/ (- %text-width% (inherited-start-indent))
;                                    width-in-chars) 0.7)))))

     (make paragraph
          space-before: (if (INLIST?) %para-sep% %block-sep%)
          space-after:  (if (INLIST?) %para-sep% %block-sep%)
          font-family-name: %mono-font-family%
          font-size: (fsize)
          font-weight: 'medium
          font-posture: 'upright
          line-spacing: (* (fsize) %line-spacing-factor%)
          start-indent: (inherited-start-indent)
          lines: 'asis
           input-whitespace-treatment: 'preserve
          quadding: 'start
          ($callout-linespecific-content$ indent line-numbers?))))
) ;aumueller


Reply via email to