Menu

#181 callout ignores width of programlisting

closed-fixed
nobody
DSSSL (85)
5
2004-10-10
2002-02-14
Yann Dirson
No

In print stylesheets, the width attribute in
ProgramListing is ignored when the latter is inside a
ProgramListingCO.

[tested with patched 1.72, including a customisation
layer that brings latest changes from bdcallou.dsl]

Discussion

  • Yann Dirson

    Yann Dirson - 2002-02-18

    Logged In: YES
    user_id=38086

    I found the problem: ($callout-verbatim-display$) and
    ($verbatim-display$) are essentially the same codebase, but
    they got de-sync'd with time. FWIW, here is my version of
    ($callout-verbatim-display$), based on 1.72+.

    I suppose it would be better to factorize the code in a
    single function, with contents as a parameter (maybe a
    lambda parameter).

    ;; merged stuff from ($verbatim-display$)
    (define ($callout-verbatim-display$ indent line-numbers?)
    (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%))))
    (make paragraph
    use: verbatim-style
    space-before: (if (and (string=? (gi (parent))
    (normalize "entry"))

    (absolute-first-sibling?))
    0pt
    vspace)
    space-after: (if (and (string=? (gi (parent))
    (normalize "entry"))

    (absolute-last-sibling?))
    0pt
    vspace)
    font-size: (fsize)
    line-spacing: (* (fsize) %line-spacing-factor%)
    start-indent: (if (INBLOCK?)
    (inherited-start-indent)
    (+ %block-start-indent% (inherited-start-indent)))
    quadding: 'start
    ($callout-linespecific-content$ indent line-numbers?))))

     
  • Peter Eisentraut

    Logged In: YES
    user_id=178336

    Fixed in current CVS

     
  • Peter Eisentraut

    • status: open --> closed-fixed