Date: Mon, 8 Nov 2004 20:16:32 -0500
Reply-To: Don Henderson <donaldjhenderson@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Don Henderson <donaldjhenderson@HOTMAIL.COM>
Subject: Re: ODS + RPOC REPORT+ _webout and how to keep the amount of
spaces between words intact?
In-Reply-To: <8C8C5311A9AB3E4E934AA466F2AC031B538D31@exchange.atherogenics.com>
Content-Type: text/plain; charset="us-ascii"
The default behavior of HTML when displayed browsers is to suppress multiple
spaces to a single space. This is not something that you have any control
over.
If you want to preserve spaces you have three (and possibly more) choices:
1. Use the deprecated <PRE> . . . . </PRE> tags. Multiple spaces within PRE
tags are not compressed, e.g.,
COMMENT='<PRE>ECG_B=QT/(RR/1000)**1/2 ECG_F=QT/(RR/1000)**1/3
RR=VR/60</PRE>'
2. Don't use spaces at all - use the HTML attribute (where both the &
and the ; are part of the value. stands (I believe) for non-breakable
space. So if you want, for example the string to be displayed with two
embedded blanks, you would assign it as follows in your sas code:
COMMENT=' ECG_B=QT/(RR/1000)**1/2
ECG_F=QT/(RR/1000)**1/3 RR=VR/60 '
and note that since this string is enclosed in single quotes SAS won't
attempt to resolve what it might think is a macro variable reference.
3. Generate a PDF rather than HMTL output (this does make generating links
much more difficult however).
For both options 1 and 2 you might have to also tell ODS to not encode the <
> tags.
When you say you did it before was that generating HTML displayed by a
browser?
HTH,
-don h
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Igor
Kurbeko
Sent: Monday, November 08, 2004 5:23 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: ODS + RPOC REPORT+ _webout and how to keep the amount of spaces
between words intact?
Hi, guys.
I use ODS + PROC REPORT + _webout.
ods html body=_webout (dynamic) rs=none style=sasweb
headtext="<pre><style type='text/css'>table
{color:#FFFFFF;background-color:#800080}</style>
<script language='JavaScript'
src=/stars/headstuff_graph.js></script></pre>";
.........................................
else if name='test' then COMMENT=' ECG_B=QT/(RR/1000)**1/2
ECG_F=QT/(RR/1000)**1/3 RR=VR/60 ' ;
And I'd like to keep the spaces between terms in the pattern above.
But the are compressed in the final output like this:
ECG_B=QT/(RR/1000)**1/2 ECG_F=QT/(RR/1000)**1/3 RR=VR/60
I was able to do it before but something has changed. (Is Monospace
font?)
Any suggestions on how to fix it?
Thanks
Igor Kurbeko
Clinical Programmer Analyst
678 336 4328
ikurbeko@atherogenics.com <mailto:ikurbeko@atherogenics.com>
<mailto:ikurbeko@atherogenics.com>
If a man will begin with certainties, he shall end in doubts