The SAS Output Delivery System and reporting techniques

TEXTDECORATION not compatible with ODS RTF?

Reply
Occasional Contributor
Posts: 8

TEXTDECORATION not compatible with ODS RTF?

Hi Everyone,

 

I am creating an rtf document and am trying to write out a mathematical expression using ods rtf text.  I'm trying to generate x-bar, an X with a bar above it.  I figured this could be easily acheived using ODS RTF TEXT and a textdecoration = overline styling option.  When I run this as a RTF, I do not get the overline; however, the PDF does show the overline.  I use many styling options and have not had what appears to be compatibility issues.  Seems like textdecoration works with ODS PDF, but not ODS RTF.  Am I correct?  Is there a workaround for me to create an X-bar (note: I've already tried unicode but was not able to find an x-bar in the character map)?

 

Any suggestions or advice is greatly appreciated.

 

Best,

Chris

 

 

/*RTF creation*/
ODS ESCAPECHAR = '~';
ODS RTF FILE = "Temp.RTF"; 
ODS RTF TEXT="~{style [just=r textdecoration=overline color=red]Here is some random overlined text.}"; 
ODS RTF CLOSE;

/*PDF creation*/
ODS ESCAPECHAR = '~';
ODS PDF FILE = "Temp.PDF" ; 
ODS PDF TEXT="~{style [just=r textdecoration=overline color=red]Here is some random overlined text.}"; 

ODS PDF CLOSE;

 

 

SAS Super FREQ
Posts: 9,423

Re: TEXTDECORATION not compatible with ODS RTF?

Hi:

  This was what I got when I used the {unicode} function with ODS ESCAPECHAR, but I also needed to use the Arial Unicode MS font for the overline and caret to look correct:

xbar_rtf.png

Using this code:

ods escapechar='^';

ods rtf file='c:\temp\xbar_phat.rtf';
proc report data=sashelp.class(obs=3);
compute before _page_ / style={font_face="Arial Unicode MS"};
  line 'xbar should be: x^{unicode 0304}';
  line ' ';
  line 'phat should be: p^{unicode 0302}';
endcomp;
run;
ods rtf close;

Hope this helps,

Cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 147 views
  • 0 likes
  • 2 in conversation