[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: dsssl 1.76 print: programlistingco'sverbatim-font-size diffs to programlisting's
On Thu, Mar 14, 2002 at 05:39:33PM +0100, david aumueller wrote: > 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. I have reported this in the sourceforge bug-system, with my own fix (don't have time to compare with yours right now, though) https://sourceforge.net/tracker/?func=detail&aid=517520&group_id=21935&atid=373747 I've sent a patch for this and other things to Norm directly - I attach it, it may be useful to others, until it gets integrated in a new release. -- Yann Dirson <Yann.Dirson@fr.alcove.com> http://www.alcove.com/ Technical support manager Responsable de l'assistance technique Senior Free-Software Consultant Consultant senior en Logiciels Libres Debian developer (dirson@debian.org) Développeur Debian
- From: Yann Dirson <ydirson@kasba.alcove-fr>
- To: Norman Walsh <ndw@nwalsh.com>
- Date: Thu, 21 Feb 2002 16:37:19 +0100
Hi Norm, While packaging 1.75 for Debian 2.2, I integrated my fixes for #517520 and #444794. Here is the diff. Regards, -- Yann Dirson <Yann.Dirson@fr.alcove.com> http://www.alcove.com/ Technical support manager Responsable de l'assistance technique Senior Free-Software Consultant Consultant senior en Logiciels Libres Debian developer (dirson@debian.org) Développeur Debian--- docbook-stylesheets-1.75.orig/print/dbcallou.dsl +++ docbook-stylesheets-1.75/print/dbcallou.dsl @@ -180,25 +180,35 @@ (process-node-list c))))))))) (define ($callout-verbatim-display$ indent line-numbers?) - (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%) + (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))))) + width-in-chars) 0.7) + (* (inherited-font-size) + %verbatim-size-factor%)))) + (vspace (if (INBLOCK?) + 0pt + (if (INLIST?) %para-sep% %block-sep%)))) (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?)))) + 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))) + ($callout-linespecific-content$ indent line-numbers?)))) -;; EOF dbcallout.dsl \ No newline at end of file --- docbook-stylesheets-1.75.orig/print/dblists.dsl +++ docbook-stylesheets-1.75/print/dblists.dsl @@ -56,19 +56,43 @@ (define (COSTEP) 1.5pi) -;; Improve spacing on lists, remove extra space before.. +;; - Improve spacing on lists, remove extra space before.. ;; Suggested by Adam Di Carlo, adam@onshore.com +;; - Put the title itself outside the displaygroup, so that +;; nested lists look correct. Yann Dirson, ydirson@alcove.fr (define ($list$) - (make display-group - start-indent: (if (INBLOCK?) - (inherited-start-indent) - (+ %block-start-indent% (inherited-start-indent))) - space-after: (if (INLIST?) %para-sep% %block-sep%))) + (make sequence + (process-node-list + (select-elements (children (current-node)) + (normalize "title"))) + (make display-group + start-indent: (if (INBLOCK?) + (inherited-start-indent) + (+ %block-start-indent% (inherited-start-indent))) + space-after: (if (INLIST?) %para-sep% %block-sep%) + + (process-node-list (node-list-filter-by-not-gi + (children (current-node)) + (list (normalize "title"))))))) (element itemizedlist ($list$)) (element (itemizedlist title) (make paragraph + use: title-style + (process-children))) + +;; +;; Don't start a block element for itemizedlist or orderedlist title +;; just inside a listitem, so that it looks correct +;; + +(element (listitem itemizedlist title) + (make sequence + use: title-style + (process-children))) +(element (listitem orderedlist title) + (make sequence use: title-style (process-children)))
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC