BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
werwer
Fluorite | Level 6

Dear all,

 

I am trying to add RTF control words to an RTF file created with TAGSETS.RTF. I am trying both through the titles and with the text command in the ODS statement, but in both cases the backslashes are escaped inside the RTF file.

 

ods tagsets.rtf file='test.rtf' ;
ods tagsets.rtf text='{\plain\f1\b0\i0\tc\v Invisible text, in TOC   \tcf67 \tcl1 }';
title1 '\ulth this should be a double underlined title'; 
proc contents data=sashelp.class short;
run; 
ods tagsets.rtf close;

 For example the RTF file will show \\ulth and the title will not be underlined.

 

The code works fine with ODS RTF, but I need the extra features of ODS TAGSETS.RTF. According to http://www.mwsug.org/proceedings/2010/dataviz/MWSUG-2010-67.pdf, this should just work. If I replace all double backslashes by single ones inside the RTF file, the RTF file works as expected.

 

Any help welcome! Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You may need to investigate use of ODS ESCAPECHAR and the DEST and RAW functions.

 

Maybe

ODS ESCAPECHAR='^';

ods tagsets.rtf text= ^{dest [rtf] ^{raw \plain\f1\b0\i0\tc\v Invisible text, in TOC   \tcf67 \tcl1}};

 

View solution in original post

2 REPLIES 2
ballardw
Super User

You may need to investigate use of ODS ESCAPECHAR and the DEST and RAW functions.

 

Maybe

ODS ESCAPECHAR='^';

ods tagsets.rtf text= ^{dest [rtf] ^{raw \plain\f1\b0\i0\tc\v Invisible text, in TOC   \tcf67 \tcl1}};

 

werwer
Fluorite | Level 6

Thanks a lot, this indeed is the trick. I found that there is no need for the ^{dest [rtf] ... } if one only wants the RTF output.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1252 views
  • 0 likes
  • 2 in conversation