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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1145 views
  • 0 likes
  • 2 in conversation