SAS中操作RTF 格式


1.

就是ESCAPECHAR的使用

SAS ESCAPECHAR

可以用(*ESC*)代替,作用等同于escapechar=

title1 "~R/RTF'\brdrb\brdrhair'";
title2 "(*ESC*)R/RTF'\brdrb\brdrhair'";

title3 'This value is superscripted^{super 2} ';
title4 'This value is superscripted(*ESC*){super 2} ';

title1和title2等价

title3和title4等价

如果title1和2中那种插入下划线形式无效,可使用下述形式。

 

 

 

 2.

 上述意思是使用escapechar时候,不要使用/符号,因为/是个特殊的RTF character。

 

R是原始文本函数,/RTF指定只在RTF中生效。上述的^可以使用(*ESC*)代替。

 

Style

RTF Control Word Example Code
Italicize \i title '\i italicized title';
Underline \ul title '\ul underline title';
Double underline \dul title '\dul title';
New line \line title 'this is the first \line this is the second ';
Bullet \bullet title '\bullet bullet preceding title';
Emboss \embo title '\embo embossed title';
Engrave \impr title '\impr engraved title';
Subscript \sub title 'This is a subscript T\sub 1';
Superscript \super title 'This is a subscript T\super 2';
Outline \outl title '\outl This is outlined';
Shadow \shad title '\shad This is shadowed';
Strike \strike title '\strike This is striked';
double strike \strikedl  
dotted underline \uld title '\uld dotted underline';
Wave underline \ulw title '\ulw wave underline';
Thick underline \ulth title '\ulth thick underline';
foreground color \cfn title '\cf2 foreground color';
Font size in half points \fs24 title '\fs40 fonts increased';
Highlight \highlightN title '\highlight2';
Bold \b title '\b bold title';
Left aligned \ql title '\ql left aligned.
Right aligned \qr title '\qr right aligned.
centered \qc title '\qc left aligned.
用Notepad打开RTF文件,即可查看源码
data a;
a='aa~\line cc';
d1 = "(*ESC*)R/RTF'\i\b value value";
d2 = "(*ESC*)R/RTF'{\super value} value";*{之前的叫原始文本插入,这只有第一个value被打上格式,/RTF说只在rtf格式中生效; run;

 这是所有RTF标记的方法:Appendix B: Index of RTF Control WordsDocument Formatting Properties

SAS ESCAPECHAR_1


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM