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
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}};
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}};
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.
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!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: