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