Subject: Re: How can i use paragraph color ? From: Richard Light <richard@xxxxxxxxxxxxxxxxx> Date: Wed, 15 Jul 1998 09:40:36 +0100 |
In message <199807150600.BAA27845@xxxxxxxxxxxxxxxxxxx>, Brandon Ibach <bibach@xxxxxxxxxxxxxx> writes >Jun Seong Hak said: >> >> I am a beginner of DSSSL. >> >> I have some questions. >> >> Q1) I would like to use blue color to all p element. >> >> In SGML Document : >> <p> text..... </p> >> >> In DSSSL file : >> (element p >> (make paragraph >> space-before : 6p)) >> > Can't really help here, though I think you'd need to declare the >color space (RGB) using (color-space ...), then use that in a (color >...) function as the value of the "color" property in your paragraph >(which the paragraph itself wouldn't care about, but the characters in >it would). > Can someone who knows what they're talking about help here? :) >(I'd kinda like to know, too... :) Unfortunately, the DSSSL standard >only briefly touches on this stuff, and leaves several important >details out, instead referring us to another standard (SPDL, I think). That's right, Brandon. Here is a snippet from my TEI-Lite style sheet, with a declaration for *blue* added: (define *rgb-color-space* (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB")) (define *midnight-blue-color* (color *rgb-color-space* (/ 25 255) (/ 25 255) (/ 112 255))) (define *grey* (color *rgb-color-space* (/ 2 255) (/ 2 255) (/ 2 255))) (define *blue* (color *rgb-color-space* (/ 0 255) (/ 0 255) (/ 255 255))) I tried passing simple numerical values (0, 0 and 1) to define 'blue' in RGB colour space, but Jade wasn't happy with that and insisted on having some maths to do! It looks as though with this particular colour space you need to provide a function for each aspect of the colour that resolves to a value between 0 and 1. Having made these colour declarations, you can use them as the value of the color characteristic: (element P (make paragraph color: *blue* ... and other characteristics ... (process-children-trim))) Richard Light. Richard Light SGML/XML and Museum Information Consultancy richard@xxxxxxxxxxxxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: How can i use paragraph color ?, Brandon Ibach | Thread | Re: How can i use paragraph color ?, G. Ken Holman |
Re: How can i use paragraph color ?, Brandon Ibach | Date | Re: problem with jadetex and pdftex, Sebastian Rahtz |
Month |