Subject: Re: Help with color From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sun, 24 Jan 1999 21:26:53 -0800 |
At 99/01/24 13:49 -0500, Didier PH Martin wrote: >I am searching in the DSSSL spec how to set a background color but couldn't >find any reference about it. For example, I want to set a paragraph >background to a certain color how do I do that? I found how to set text >color but didn't found how to set the background color. My _guess_ is using an inlined box background's colour ... but either I'm wrong or one of the RTF-back end or Word won't process the RTF file I create with the script shown below. I'm suspecting RTF/Word because if I go into Word with the end result below and I manually change the shading of the paragraph with the coloured text, it is coloured between the margins and not just behind the letters. If Word did support character-oriented shading, then I suspect the code below would work. Can someone try the code below with another back end, please? I'm curious now myself, not having had to do this before, and I don't have any other back ends installed. Thanks! .......... Ken T:\ftemp2>type test.sgm <!DOCTYPE doc [ <!ELEMENT doc - O ( para | cpara | c2para )+> <!ELEMENT para - O ( #PCDATA )> <!ELEMENT cpara - O ( #PCDATA )> <!ELEMENT c2para - O ( #PCDATA )> ]><doc> <para>The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. <cpara>The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. <para>The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. <c2para>The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. <para>The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. T:\ftemp2>type test.dsl <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"> (declare-initial-value font-size 15pt) (declare-initial-value min-leading 0pt) (define *rgb-color-space* (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB")) ;color tables at http://www.CraneSoftwrights.com/resources (define aqua (color *rgb-color-space* (/ 0 255) (/ 255 255) (/ 255 255))) (define crimson (color *rgb-color-space* (/ 220 255) (/ 20 255) (/ 54 255))) (element para ;a regular paragraph (make paragraph (process-children))) (element cpara ;a coloured paragraph (make box display?: #f box-type: 'background background-color: aqua (make paragraph color: crimson (process-children)))) (element c2para ;a coloured paragraph done differently (make paragraph color: crimson (make box display?: #f box-type: 'background background-color: aqua (process-children)))) (default ;handle all elements not explicitly handled (process-children)) ; end of file T:\ftemp2>jade -f test.err -c p:\jade\jadecurr\catalog -t rtf test.sgm T:\ftemp2>type test.err T:\ftemp2> -- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/d/ Box 266, V: +1(613)489-0999 Kars, Ontario CANADA K0A-2E0 F: +1(613)489-0995 Training: http://www.CraneSoftwrights.com/d/schedule.htm Resources: http://www.CraneSoftwrights.com/d/resources.htm Shareware: http://www.CraneSoftwrights.com/d/shareware.htm DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Help with color, Didier PH Martin | Thread | Re: Help with color, Horst Kucharczyk |
Help with color, Didier PH Martin | Date | Re: Help with color, Horst Kucharczyk |
Month |