Re: DocBook Modular Stylesheets 1.08 beta 2

Subject: Re: DocBook Modular Stylesheets 1.08 beta 2
From: Norman Walsh <norm@xxxxxxxxxxxxx>
Date: Mon, 23 Mar 1998 06:08:05 -0500
/ "Jordi Mulet" <jmulet@xxxxxxxxxx> was heard to say:
| We have downloaded the last version of the style-sheet and we haqve two
| problems:
|     - At line 424 we obtain error messages. We have changed the line to
| font-weigth: weigth  and the problem is out.

Er, yeah, I left that (debug) in there by mistake...

|     - The cell formatting doesn't work.
|     Note:
|         - We haven't seen any process-cell-contents on the new definition of
| dbtable.
|         - Your code works perfectly in the former version ( color and
| font-size control of cells included)

The whole process-cell-contents setup was actually a fairly ugly
hack.  I think I've got a better solution in place now (although
I just noticed that I forgot to make the correspondng changes in
the HTML stylesheet).

To get back the functionality that you had before, you have to
move the PI checking into the $process-cell$ function:


(define ($process-cell$ entry overhang)
  (let* ((colnum    (cell-column-number entry overhang))
;;	 (celldebug (debug (string-append 
;;			  (number->string (cell-column-number entry overhang))
;;			  " "
;;			  (data entry))))
	 (font-name (if (have-ancestor? "THEAD" entry)
			%title-font-family%
			%body-font-family%))
	 (weight    (if (have-ancestor? "THEAD" entry)
			'bold
			'medium))
	 (align     (cell-align entry colnum))
	 (fontsize  ($pi-font-size$ entry))
	 (fontcolor ($pi-font-color$ entry)))
    (make table-cell 
      column-number: colnum
      n-columns-spanned: (hspan entry)
      n-rows-spanned: (vspan entry)

      cell-row-alignment: (cell-valign entry colnum)

      cell-after-column-border: (if (cell-colsep entry colnum)
				    calc-table-cell-after-column-border
				    #f)
				     
      cell-after-row-border: (if (cell-rowsep entry colnum)
				 (if (last-sibling? (parent entry))
				     calc-table-head-body-border
				     calc-table-cell-after-row-border)
				 #f)

      cell-before-row-margin: %cals-cell-before-row-margin%
      cell-after-row-margin: %cals-cell-after-row-margin%
      cell-before-column-margin: %cals-cell-before-column-margin%
      cell-after-column-margin: %cals-cell-after-column-margin%
      start-indent: %cals-cell-content-start-indent%
      end-indent: %cals-cell-content-end-indent%
      (if (equal? (gi entry) "ENTRYTBL")
	  (make paragraph 
	    (literal "ENTRYTBL not supported."))
	  (make paragraph
	    font-family-name: font-name
	    font-weight: weight
	    quadding: align
	    font-size: (if fontsize fontsize (inherited-font-size))
	    color: (if fontcolor fontcolor (inherited-color))
	    (process-node-list (children entry)))))))


| Also, Is there any possibility to center all the table in a page  ( or
| control its position to the left or rigth of the page) The tables are always
| formatted to the left?

I'll add a parameter for that, in the meantime, you should be able to
achieve horizontal centering by adding:

  quadding: 'center

to the (make table) instruction in dbtable.dsl.

--norm


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • DocBook Modular Stylesheets 1.08 beta 2
    • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id KAA19957Sun, 22 Mar 1998 10:46:20 -0500 (EST)
      • <Possible follow-ups>
      • Rainer Feuerstein - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id WAA25886Sun, 22 Mar 1998 22:24:01 -0500 (EST)
        • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id FAA06873Mon, 23 Mar 1998 05:59:59 -0500 (EST)
      • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id DAA04807Mon, 23 Mar 1998 03:32:56 -0500 (EST)
        • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id GAA07217Mon, 23 Mar 1998 06:08:27 -0500 (EST) <=
      • Jordi Mulet - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id IAA08642Mon, 23 Mar 1998 08:48:02 -0500 (EST)